You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/02/17 16:45:28 UTC

[GitHub] [mynewt-core] stuffmatic opened a new issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

stuffmatic opened a new issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485


   I ran into a build issue when doing [the Blinky tutorial](https://mynewt.apache.org/latest/tutorials/blinky/blinky_stm32f4disc.html) with my [STM32F4-Discovery board](https://www.st.com/en/evaluation-tools/stm32f4discovery.html). `newt build stm32f4disc_boot` fails with the following error
   
   ```
   Error: /usr/local/Caskroom/gcc-arm-embedded/10-2020-q4-major/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: [redacted]/mynewt-sandbox/bin/targets/stm32f4disc_boot/app/@mcuboot/boot/mynewt/mynewt.elf section `.text' will not fit in region `FLASH'
   /usr/local/Caskroom/gcc-arm-embedded/10-2020-q4-major/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 348 bytes
   collect2: error: ld returned 1 exit status
   ```
   
   The error message above is when using the master branch. 1.8.0 gives me the same error, but with a different (smaller) number of bytes in `region 'FLASH' overflowed by xxx bytes`.
   
   Naively changing `FLASH (rx) :  ORIGIN = 0x08000000, LENGTH = 16K` to `FLASH (rx) :  ORIGIN = 0x08000000, LENGTH = 17K` in [boot-stm32f4discovery.ld](https://github.com/apache/mynewt-core/blob/master/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld) made app build and run on my board, but I suspect this does not count as a solution.
   
   I'm running macOS Big Sur 11.2.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] utzig commented on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
utzig commented on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-788327596


   > I couldn't find any obvious things to disable in my target's syscfg... Any pointers would be much appreciated.
   
   Try adding this before the `build` command:
   ```
   newt target set stm32f4disc_boot syscfg=BOOTUTIL_USE_MBED_TLS=0:BOOTUTIL_USE_TINYCRYPT=1:TIMER_0=0:OS_CPUTIME_TIMER_NUM="-1":LOG_CONSOLE=0
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] stuffmatic commented on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
stuffmatic commented on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-788650553


   For posterity: the size decrease using `BOOTUTIL_...` was insufficient, but `TIMER_0=0` or `OS_CPUTIME_TIMER_NUM=-1` worked. Thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] stuffmatic commented on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
stuffmatic commented on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-788299583


   I couldn't find any obvious things to disable in my target's syscfg... Any pointers would be much appreciated.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] stuffmatic closed issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
stuffmatic closed issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] mlaz commented on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
mlaz commented on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-780701492


   Hi @stuffmatic try disabling some features on mcuboot. Look at what's enabled by default on mcuboot's syscfg files and disable it on your target's syscfg. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] stuffmatic commented on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
stuffmatic commented on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-780707103


   Thanks for the tip @mlaz ! I'll have a look.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-core] stuffmatic edited a comment on issue #2485: STM32F4-Discovery Blinky build issue - ".text will not fit in region FLASH"

Posted by GitBox <gi...@apache.org>.
stuffmatic edited a comment on issue #2485:
URL: https://github.com/apache/mynewt-core/issues/2485#issuecomment-788650553


   For posterity: the size decrease using `BOOTUTIL_...` was insufficient, but `TIMER_0=0` or `OS_CPUTIME_TIMER_NUM=-1` worked. Thanks! Let me know if it makes sense to create a PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org