Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the preprocess linkerscript #333

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

rajames
Copy link
Contributor

@rajames rajames commented Sep 23, 2021

When building with arduino-cli and passing the --build-property flag the build process fails with a linkerscript syntax error, like below:

 /home/raul/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-non
 e-eabi/7.2.1/../../../../arm-none-eabi/bin/ld:/tmp/arduino-sketch-C67EA27C1A6288EDF2ADFFE6011F
 B7D3/linker_script.ld:1: ignoring invalid character '#' in expression
 /home/raul/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-non
 e-eabi/7.2.1/../../../../arm-none-eabi/bin/ld:/tmp/arduino-sketch-C67EA27C1A6288EDF2ADFFE6011F
 B7D3/linker_script.ld:1: syntax error
 collect2: error: ld returned 1 exit status

It appears the linkerscript contains build flags in #SOME-MACRO format.

Removing {build.extra_flags} fixes the issue.

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

Memory usage change @ 7f9ad83

Board flash % RAM for global variables %
arduino:mbed:envie_m4 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:nicla_sense 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board libraries/Scheduler/examples/MultipleBlinks
flash
% libraries/Scheduler/examples/MultipleBlinks
RAM for global variables
% libraries/doom/examples/Doom
flash
% libraries/doom/examples/Doom
RAM for global variables
% libraries/KernelDebug/examples/KernelDebug
flash
% libraries/KernelDebug/examples/KernelDebug
RAM for global variables
% libraries/Portenta_SDCARD/examples/TestSDCARD
flash
% libraries/Portenta_SDCARD/examples/TestSDCARD
RAM for global variables
% libraries/Portenta_Video/examples/Envie_video_coreboot
flash
% libraries/Portenta_Video/examples/Envie_video_coreboot
RAM for global variables
% libraries/RPC/examples/BootM4_from_SDRAM
flash
% libraries/RPC/examples/BootM4_from_SDRAM
RAM for global variables
% libraries/RPC/examples/RPC_m4
flash
% libraries/RPC/examples/RPC_m4
RAM for global variables
% libraries/RPC/examples/SerialPassthrough_RPC
flash
% libraries/RPC/examples/SerialPassthrough_RPC
RAM for global variables
% libraries/PDM/examples/PDMSerialPlotter
flash
% libraries/PDM/examples/PDMSerialPlotter
RAM for global variables
% libraries/Portenta_Camera/examples/CameraCaptureRawBytes
flash
% libraries/Portenta_Camera/examples/CameraCaptureRawBytes
RAM for global variables
% libraries/Portenta_Camera/examples/CameraMotionDetect
flash
% libraries/Portenta_Camera/examples/CameraMotionDetect
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
flash
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
flash
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
RAM for global variables
% libraries/ThreadDebug/examples/ThreadDebug
flash
% libraries/ThreadDebug/examples/ThreadDebug
RAM for global variables
% libraries/USBHOST/examples/KeyboardController
flash
% libraries/USBHOST/examples/KeyboardController
RAM for global variables
% libraries/USBHOST/examples/Shell
flash
% libraries/USBHOST/examples/Shell
RAM for global variables
% libraries/WiFi/examples/PortentaWiFiFirmwareUpdater
flash
% libraries/WiFi/examples/PortentaWiFiFirmwareUpdater
RAM for global variables
% libraries/WiFi/examples/WiFiWebClient
flash
% libraries/WiFi/examples/WiFiWebClient
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/AP_SimpleWebServer
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/AP_SimpleWebServer
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectNoEncryption
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectNoEncryption
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWEP
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWEP
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA2Enterprise
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA2Enterprise
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworks
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworks
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworksAdvanced
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworksAdvanced
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/SimpleWebServerWiFi
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/SimpleWebServerWiFi
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/CheckFirmwareVersion
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/CheckFirmwareVersion
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/FirmwareUpdater
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/FirmwareUpdater
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/SerialNINAPassthrough
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/Tools/SerialNINAPassthrough
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiChatServer
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiChatServer
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiPing
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiPing
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiSSLClient
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiSSLClient
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiStorage
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiStorage
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpNtpClient
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpNtpClient
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpSendReceiveString
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpSendReceiveString
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClient
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClient
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClientRepeating
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClientRepeating
RAM for global variables
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebServer
flash
% /home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebServer
RAM for global variables
% libraries/Nicla_System/examples/Blink_Nicla
flash
% libraries/Nicla_System/examples/Blink_Nicla
RAM for global variables
%
arduino:mbed:envie_m4 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:nano33ble 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:nicla_sense 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/RPC/examples/BootM4_from_SDRAM<br>flash,%,libraries/RPC/examples/BootM4_from_SDRAM<br>RAM for global variables,%,libraries/RPC/examples/RPC_m4<br>flash,%,libraries/RPC/examples/RPC_m4<br>RAM for global variables,%,libraries/RPC/examples/SerialPassthrough_RPC<br>flash,%,libraries/RPC/examples/SerialPassthrough_RPC<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%,libraries/Portenta_Camera/examples/CameraCaptureRawBytes<br>flash,%,libraries/Portenta_Camera/examples/CameraCaptureRawBytes<br>RAM for global variables,%,libraries/Portenta_Camera/examples/CameraMotionDetect<br>flash,%,libraries/Portenta_Camera/examples/CameraMotionDetect<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>flash,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>RAM for global variables,%,libraries/WiFi/examples/WiFiWebClient<br>flash,%,libraries/WiFi/examples/WiFiWebClient<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/AP_SimpleWebServer<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/AP_SimpleWebServer<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectNoEncryption<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectNoEncryption<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWEP<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWEP<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA2Enterprise<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ConnectWithWPA2Enterprise<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworks<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworks<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworksAdvanced<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/ScanNetworksAdvanced<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/SimpleWebServerWiFi<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/SimpleWebServerWiFi<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/CheckFirmwareVersion<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/CheckFirmwareVersion<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/FirmwareUpdater<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/FirmwareUpdater<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/SerialNINAPassthrough<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/Tools/SerialNINAPassthrough<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiChatServer<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiChatServer<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiPing<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiPing<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiSSLClient<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiSSLClient<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiStorage<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiStorage<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpNtpClient<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpNtpClient<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpSendReceiveString<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiUdpSendReceiveString<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClient<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClient<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClientRepeating<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebClientRepeating<br>RAM for global variables,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebServer<br>flash,%,/home/runner/Arduino/libraries/WiFiNINA/examples/WiFiWebServer<br>RAM for global variables,%,libraries/Nicla_System/examples/Blink_Nicla<br>flash,%,libraries/Nicla_System/examples/Blink_Nicla<br>RAM for global variables,%
arduino:mbed:envie_m4,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed:nano33ble,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,,,,,,,,
arduino:mbed:nanorp2040connect,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed:nicla_sense,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0

@facchinm facchinm merged commit 51bf25a into arduino:master Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants