fprime-community / fprime-tutorial-arduino-blinker

https://fprime-community.github.io/fprime-tutorial-arduino-blinker/
Apache License 2.0
2 stars 8 forks source link

Build error: address 0x200969e0 of ../bin/teensy41/LedBlinker.elf section `.bss' is not within region `DTCM' #22

Open yudataguy opened 5 days ago

yudataguy commented 5 days ago

Any suggestion on how to resolve this issue? Looks like it maybe related to board memory size. Not really sure the best way to address this issue

<command-line>: note: this is the location of the previous definition
/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: address 0x200969e0 of ../bin/teensy41/LedBlinker.elf section `.bss' is not within region `DTCM'
/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: address 0x200969e0 of ../bin/teensy41/LedBlinker.elf section `.bss' is not within region `DTCM'
collect2: error: ld returned 1 exit status
gmake[2]: *** [LedBlinker/CMakeFiles/LedBlinker.dir/build.make:341: bin/teensy41/LedBlinker.elf] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:7477: LedBlinker/CMakeFiles/LedBlinker.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

uno board: IMG_7648 Large

ethancheez commented 4 days ago

Hello,

Any memory related issues can be solved by using custom F' configurations. After the OSAL refactoring and other enhancements within the newer releases of F Prime, the default configuration is no longer suitable for most Arduino-based microcontrollers.

If you recreate the LedBlinker deployment, I updated the cookiecutter to include the bare minimum configuration constants that will reduce the memory consumption of the deployment. Alternatively, you can copy this entire config/ directory into your project. Don't forget to modify your settings.ini file to point to the new configuration directory:

config_directory: ./config

./config is the filepath relative to where the project root directory is. If the directory is in your LedBlinker deployment, the filepath would be ./LedBlinker/config

Also, F Prime v3.5.0 was only tested to work on boards with at least 32 KB of RAM. The Arduino UNO only has 2 KB of SRAM which is insufficient for F Prime. The teensy41 deployment is built for the PJRC Teensy 4.1 Microcontroller. You can view the list of boards that successfully deployed F Prime here.