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

error: L6236E: No section matches selector - no section to be FIRST/LAST.

I am trying to run the ble_app_beacon example code for board pca10040 but I am getting the following error

.\_build\nrf52832_xxaa.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\_build\nrf52832_xxaa.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:41

What seems to be the issue?

  • I managed to fix this issue by going in "Manage Run-Time Environment" > Device > selecting both "Startup" and "StartupConfig"

    Now I am getting the following errors:

    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf51_erratas.h(40): error: #130: expected a "{"
    static bool nrf51_errata_1(void) __UNUSED;
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf51_erratas.h(120): warning: #12-D: parsing restarts here after previous syntax error
    {
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf52_erratas.h(40): error: #130: expected a "{"
    static bool nrf52_errata_1(void) __UNUSED;
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf52_erratas.h(212): warning: #12-D: parsing restarts here after previous syntax error
    {
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf53_erratas.h(40): error: #130: expected a "{"
    static bool nrf53_errata_1(void) __UNUSED;
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf53_erratas.h(106): warning: #12-D: parsing restarts here after previous syntax error
    {
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf91_erratas.h(40): error: #130: expected a "{"
    static bool nrf91_errata_1(void) __UNUSED;
    C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\nrf91_erratas.h(65): warning: #12-D: parsing restarts here after previous syntax error
    {
    RTE\Device\nRF52832_xxAA\system_nrf52.c: 4 warnings, 4 errors
    compiling nrf_sdh_soc.c...
    compiling nrf_sdh_ble.c...
    ".\_build\nrf52832_xxaa.axf" - 4 Error(s), 4 Warning(s).
    Target not created.
    Build Time Elapsed: 00:00:43

  • Hi, 

    Please try to uninstall the Nordic packs, then re-install the latest version and see if you get the same result. If it doesn't work, check if you have a 'compiler_abstraction.h' file located in your \Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include\ directory and if it defines "__UNUSED". I suspect missing definition of __UNUSED is what is causing the build error.

  • Hi I am already using the latest version of Nordic deviceFamilyPack 8.31.0. I have also tires to uninstall the install previous versions and then install the latest version again. But nothing happened.

    Regarding the compiler_abstraction.h file I have attached the screen shot.

  • Hm, I get the exact same build errors if I comment out the definition of __UNUSED. Maybe the project uses the compiler_abstraction.h file distributed with the SDK instead. What SDK version are you currently using?

    The header file is located in  \modules\nrfx\mdk\ if you're using a more recent SDK release.

  • I am using SDK 16.0.0

    I checked the file path of compiler_abstraction.h file, its in "C:\Users\syeds\AppData\Local\Arm\Packs\NordicSemiconductor\nRF_DeviceFamilyPack\8.31.0\Device\Include"

Related