Why do I run it after setting SP to 4096? Is it from 4096 and then 4095 or 4097? 4096 is steppingstone's address?
Why is the interruption set to 3072?
S3C2410 and S3C2440 have internal RAM and external SDRAM, which are called memory;
The SP is located in the memory, which can be internal RAM or SDRAM, as long as the current runningProgramYou can.
At startup, first execute the internal RAM 4096, and thenCodeMove to SDRAM and execute:
A: At the beginning, the SDRAM is unavailable. Therefore, if you want to use the C function before initializing the SDRAM, you must set the SP in the internal RAM.
In this case, set the first 4096 of SDRAM to the stack, and the last 4096 to the code area, right?
A: No. When the program starts running, the 4096 internal Ram has code that initializes the SDRAM and reads all the code from the NAND to the SDRAM. The code to complete these functions is very small, the number is less than 4096 bytes, so you can set the SP to 4096.