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