4299 views|2 replies
huhuhusanling
Currently offline
|
The OP
Published on 2018-6-12 15:27
Only look at the author
This post is from ARM Technology
Latest reply
This post was last edited by le062 on 2018-6-12 17:02 Take the cortex-m series microcontroller as an example: First copy the code, assuming that the vector table location of the code in sram is pkt->store_addr, and use the following code to jump // jump to FIRMWARE_AREA_CODE_ADDR uint32_t (*app_main)(void)= (uint32_t(*)(void))(*(uint32_t *)(pkt->store_addr + 4)); uint32_t *sp = (uint32_t *)(pkt->store_addr); __set_MSP(*sp); app_main(); 复制代码Note: The code itself should be compiled with the placement address in sram as the code address. If the placement address is different from the address specified when the code is compiled, some instructions will fail, such as long jumps
Details
Published on 2018-6-12 16:58
| |
|
||
2
Published on 2018-6-12 16:58
Only look at the author
This post is from ARM Technology
| ||
Personal signature
要666 |
||
|
huhuhusanling
Currently offline
|
This post is from ARM Technology
| |
|
||
|
EEWorld Datasheet Technical Support
EEWorld
subscription
account
EEWorld
service
account
Automotive
development
circle
About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190