This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Segger Embedded Studio Code Size Limit?


I recently downloaded Segger's Embedded Studio to compare its performance and ease of use with IAR Embedded Workbench. We have a kickstarter version of IAR for ARM which has a 32K code size limit. Segger's site mentioned that the free evaluation license has no code size limit, but when I compile my now-slightly-over-32K project with the Segger, I get an error that the size limit of 0x8000 (32K) has been exceeded. Could this be related to the fact that I originally imported the Segger project from a project that was created on the IAR Kickstarter version and somehow inherited the 32K code size limit from IAR? I can't find anything under the Segger project options that sets the code size limit.

Thanks,

Mike

Parents Reply
  • This is making no sense at all. When you build the project in SES you should get a build transcript, can you see it actually running the GCC compile and link commands? What command does it run at the point it emits the error message? GCC just doesn't emit that error message, it's entirely an IAR thing. The import project makes an entirely native project from the original one so .. there should be nowhere to put such an error. 

    The only other possibility I can think of, not that I've EVER seen it, is that the export of the project exported a linker file with that error message in it.  You could look at (grep) the converted project source to see if that happened. 

Children
  • The command that generates the error is "Linking <project name>.out".  Prior to that the commands are "Compiling <filename>".  Attempting to search through the project files (<name>.emProject" and <name>.emSession" does not show the size limit error message.   From earlier messages, it sounds like I could somehow be using the IAR compiler?  Could one of the linker options be wrong?  

  • I assume the converted project file is either the <name>.emProject or <name>.emSession?  Checking both of those files does not show the error message.  The Compiler Options -> Linker shows no additional input files or linker scripts.  If the compiler is set to gcc, does that mean that the IAR compiler is not being used?

  • how about clean it - build it - paste the actual transcript from the build especially the last step. If there's a build error one stage must be generating it. 

  • Did a clean and then rebuilt the project - here is the output:

    Building ‘hm_chair’ from solution ‘hm_chair’ in configuration ‘nrf52832_xxaa External’
    Compiling ‘app_accel.c’
    Warning[Pe177]: variable "m_twi" was declared but never referenced
    Warning[Pe177]: variable "MagState" was declared but never referenced
    Warning[Pe177]: function "TwiHandler" was declared but never referenced
    Warning[Pe177]: function "TwiInit" was declared but never referenced
    Compiling ‘chair_state.c’
    Compiling ‘system_timer.c’
    Compiling ‘main.c’
    Warning[Pe177]: variable "loopCount" was declared but never referenced
    Compiling ‘ctl_accel.c’
    Warning[Pe550]: variable "iBfz" was set but never used
    Compiling ‘ctl_adc.c’
    Compiling ‘ctl_ANT.c’
    Compiling ‘ctl_flash.c’
    Assembling ‘iar_startup_nrf52.s’
    Compiling ‘system_nrf52.c’
    Compiling ‘ant_channel_config.c’
    Compiling ‘hmi_i2c.c’
    Compiling ‘nrf_drv_common.c’
    Compiling ‘nrf_drv_gpiote.c’
    Compiling ‘nrf_drv_saadc.c’
    Compiling ‘nrf_drv_timer.c’
    Compiling ‘nrf_drv_twi.c’
    Compiling ‘nrf_drv_uart.c’
    Compiling ‘nrf_saadc.c’
    Compiling ‘app_error_weak.c’
    Compiling ‘app_error.c’
    Compiling ‘app_fifo.c’
    Compiling ‘app_timer.c’
    Compiling ‘app_uart_fifo.c’
    Compiling ‘app_util_platform.c’
    Compiling ‘nrf_assert.c’
    Compiling ‘nrf_memobj.c’
    Compiling ‘nrf_balloc.c’
    Compiling ‘nrf_section_iter.c’
    Compiling ‘nrf_strerror.c’
    Compiling ‘retarget.c’
    Compiling ‘nrf_sdh.c’
    Compiling ‘nrf_sdh_ant.c’
    Linking ‘hm_chair.out’
    Error[Li016]: size limit exceeded. The application needs 0x864c (34 380) bytes, which is greater than the limit of 0x8000 (32 768) bytes.
    Build failed

  • I did see when checking Build -> Build Configurations that the first Private Configuration listed is "External IAR"?  Could this have something to do with my problem?  If so, what setting would I change to fix?  Thanks, Mike

Related