Keil MDK error:L6236E:No section matches selector-no section error

Source: Internet
Author: User



Today, the board just arrived, downloaded MDK can not wait to begin to solve the itch, however, after the small twists and turns after the MDK configuration, the first new project will be an error.



. \OBJECTS\CSE.SCT (7): Error:L6236E:No section matches selector-no sections to be first/last.



  I checked the internet to say what the boot file didn't add, but they didn't say where to add the boot file, I didn't know it for the first time.






And I found in the Chinese blog that all the bloggers answer most of the same (do not believe you can search the problem yourself), but all are loaded with their own writing, which I feel very sad.






Then I found this problem in the StackOverflow.






The main problem is the same as the one I met, and then the following answer says:



--------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------



There is no ' first ' object in your source code. Your scatter file likely looks something like:


 
 
LR_IROM1 0x08000000 0x00040000  {    ; load region size_region
  ER_IROM1 0x08000000 0x00040000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x20000000 0x0000A000  {  ; RW data
   .ANY (+RW +ZI)
  }
  






  



The _first object, the linker wants to puts into the-the image is the area called RESET. You don't have a RESET region in your code. Add something along the lines of





  
 Area READONLY








To your assembly file where you want execution to begin.






Create a project with the startup file and look for the area RESET ..... declaration and copy that.






For Cortex it looks like:





 
 AREA    RESET, DATA, READONLY
                EXPORT  __Vectors
                EXPORT  __Vectors_End
                EXPORT  __Vectors_Size

__Vectors       DCD     __initial_sp               ; Top of Stack
                DCD     Reset_Handler              ; Reset Handler
                DCD     NMI_Handler                ; NMI Handler
                DCD     HardFault_Handler          ; Hard Fault Handler
                DCD     MemManage_Handler          ; MPU Fault Handler
                DCD     BusFault_Handler           ; Bus Fault Handler
                DCD     UsageFault_Handler         ; Usage Fault Handler
                DCD     0     








Each of those handlers needs to is declared, but you can just add the stack pointer and reset handler to get started.






--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------



I see this piece of code in the startup inside, put this module a add, eh, OK.






Keil MDK error:L6236E:No section matches selector-no section error


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.