Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Compiling issue with SEGGER EMBEDDED STUDIO V6.30

Hi,

  I am working with the nRF5SDK , nRF Thread SDKs long time. Recently i have update segger embedded studio to V 6.30 . previously i have used v5.68

1.

for nRF 5 SDK while build the ble_blinky example code  i got an error __vfprintf.h: No such file or directory

i found the solution that by removing the SEGGER_RTT_Syscalls_SES.c .and rebuild the code it is working

but i need the solution that without removing the SEGGER_RTT_Syscalls_SES.c how to build the project

because i need to work this project in both older / newer version of segger embedded studio

2.

also tried to work with nrf thread sdk 4.2.0 -thread_simple_coap_client_pca10056 . there i am facing same error __vfprintf.h: No such file or directory

while is remove SEGGER_RTT_Syscalls_SES file and rebuild the code i am facing some other errors

 
  Linking thread_simple_coap_client_pca10056.elf
    E:/nRF5x/2.thread_4.2.0/examples/thread/simple_coap_client/pca10056/blank/ses/Output/Debug/Exe/thread_simple_coap_client_pca10056.elf: TLS sections are not adjacent:
            TLS: .tdata
        non-TLS: .bss
            TLS: .tbss
    map sections to segments failed: bad value
Build failed

Parents Reply
  • Hi Edvin,

    I've been watching this thread because I have the same problem with SES 6.30. I did manage to figure out that the project has to be explicitly configured to use RTT. Project Options > Library > Debug I/O > RTT. This is a new drop down option.

    I also got a " TLS sections are not adjacent" linker error and this is where I threw in the towel. TLS = Thread Local Storage?

    Best regards,

    Pieter

    P.S. The SES license expires and it "forces" one to install the latest version. After renewing the license with the latest version then it is possible to run the old version again. This makes it tough to keep a stable code base supported.

Children
  • I just installed a license on version 5.34, and that worked just fine.

    Without having tested myself, I think having several versions of SES may confuse the compiler. Files, such as the thumb_crt0s have a tendency to be picked from the wrong version. I don't have enough knowledge on how this works to say how to change it or what this file does, but I suspect Segger will be able to give a better answer, and perhaps they know why the __SEGGER_RTL_VERSION doesn't work, and perhaps they have another that is working.

    BR,

    Edvin

  • I also see a problem with the bootloader on V6.30 (built from secure_bootloader_ble_s140_pca10100 SDK17.1). It compiles but doesn't work (some error causes the device to reset).

    I rolled back to Segger v5.66, cleaned and rebuilt the project and it works.

  • Thank you for the information. 

    As stated in the release notes, the older Segger version is the one that is tested for the SDK. Although I am not sure what the changes may be, I would check the included libraries. It happens that some IDEs change the sizes of default parameters, which causes the prebuilt libraries to fault. Did the log say anything about why it crashed? (you probably need to build the _debug bootloader project). 

    Best regards,

    Edvin

  • I didn't get to the bottom of it. It requires building debug version as you mentioned. For now i just rolled back to the previous IDE i was working with.

  • I seemed to have solved this issue on my project.  First for the RTL_VERSION you MUST make sure the check comes AFTER the include for SEGGER_RTT.h:

    #if !defined(RETARGET_ENABLED) || RETARGET_ENABLED == 0
    #if (defined __SES_ARM) || (defined __CROSSWORKS_ARM)
      
    #include "SEGGER_RTT.h"
    #if !defined(__SEGGER_RTL_VERSION)

    For the TLS issue you need to just open flash_placement.xml and move the tdata and tbss sections next to each other.

    Original:

        <ProgramSection alignment="4" load="No" name=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />

    New:

        <ProgramSection alignment="4" load="No" name=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <ProgramSection alignment="4" load="No" name=".bss" />

    Then it should compile fine.  My project seems to be working just dandy after doing the above.

    -Jarrod

Related