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.

Hello,

I am working with nRF52832 and using Keil uVISION 5.

While building the exapmple from nRF SDK v15, I am getting this error :

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

I also tried the following suggested on ARM forum, but the error remains same.

  • I opened the project in keil.
  • In target->linker, I unchecked Use memory layout from target dialogue.
  • Entered 0x00026000 in R/O base and 0x200018A8 in R/W base address from .sct file in \..\components\softdevice\s132\hex\s132_nrf52_6.0.0_softdevice.sct

******File content********

; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x00026000 0x0005A000  {    ; load region size_region
  ER_IROM1 0x00026000 0x0005A000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x200018A8 0x0000E758  {  ; RW data
   .ANY (+RW +ZI)
  }
}

Any help?

Parents
  • Hi,

    Most examples relies heavily on the board support package (BSP) which is an SDK library that relies on a certain number of buttons, leds, etc. to be configured. In order to build the examples for a custom board you should:

    • set the preprocessor define BOARD_CUSTOM
    • remove the preprocessor define BOARD_PCA10040
    • in <sdk folder>/components/boards, make a copy of pca10040.h that you name custom_board.h, and change the LED and button defines to reflect your custom board.

    That way you should be able to run most SDK examples directly (unless they need more leds or buttons than are available on your board).

    Alternatively you must manually go through every place where the board support package or the defines within the board specific board file are used, and change that. Unfortunately I do not have a full overview of all the places that would be, but fixing one error message at a time would be a valid approach.

    Regards,
    Terje

Reply
  • Hi,

    Most examples relies heavily on the board support package (BSP) which is an SDK library that relies on a certain number of buttons, leds, etc. to be configured. In order to build the examples for a custom board you should:

    • set the preprocessor define BOARD_CUSTOM
    • remove the preprocessor define BOARD_PCA10040
    • in <sdk folder>/components/boards, make a copy of pca10040.h that you name custom_board.h, and change the LED and button defines to reflect your custom board.

    That way you should be able to run most SDK examples directly (unless they need more leds or buttons than are available on your board).

    Alternatively you must manually go through every place where the board support package or the defines within the board specific board file are used, and change that. Unfortunately I do not have a full overview of all the places that would be, but fixing one error message at a time would be a valid approach.

    Regards,
    Terje

Children
  • Thank you Terje.

    I will try to modify above things.

  • Hello,

    I am bit confuse after looking at boards.h

    I don't have any development board right now. I just want to properly compile/build (do not want to download/flash) the BLE example.

    As you suggested that the project depends upon BSP, Mine was only using LEDs. For that I commented that whole function out. So, now my example should not use any peripherals defined by boards.h.(I may be wrong, correct me)

    But the error is still there. :  ..\..\..\..\..\..\components\softdevice\s132\hex\s132_nrf52_6.0.0_softdevice.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.

    So, what should I do now?

  • Hi,

    I must admit I do not quite understand why on the one hand you need to remove all board specific features (such as buttons, leds, etc.) but on the other hand you do not intend to download the resulting application anywhere. Why not just compile the unchanged SDK example?

    In any case, have you disabled the Board Support options in sdk_config.h? In Keil5 you can choose the configuration wizard for getting a GUI for editing that file.

    Regards,
    Terje

  • Hello,

    I do not want board specific features because I might direct implement code on the chip(bad approach but that is out of my authority).

    For unchanged sdk, the error is same in blinky example(which is unchanged).

    I will see board support option in sdk_config.h

    Thanks for all your help!

  • Hi,

    Thank you for the clarification. It sounded a bit strange to build the blinky example without using LEDs, as the purpose of that example is to turn a LED on and off.

    Keep in mind that for any GPIO usage you must make some assumptions about what is connected to the SoC. You may of course make it configurable, which, in some sense, the board files essentially are a solution for. You may of course do this differently if configuration through header files is not a solution for your needs.

    Regards,
    Terje

Related