棋子 · 2020年02月10日

Program start from RAM

I tried simple code using Keil MDK5 for STM32F769 CPU. I've used Keil simulator and noticed that vector table is settled at 0 (ITCM RAM) with BOOT_ADDRx =0, directing CPU to start from 0. The question is how vector table was filled in RAM. If JTAG did it, what will happen when I don't have JTAG, ie in production ? If some code from flash did it, how CPU started from flash at the first place, if at least stack addr should be at 0 ?

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年02月10日

"JTAG" does nothing. The debugger will download your ELF file. You code is generally placed in ROM (at 0x08000000) and the CPU will start there. If you want the vector table in ITCMRAM and boot from there you must link the vector table to address 0 and the debugger will download it there.

你的回答
关注数
1
收藏数
1
浏览数
2083
极术小姐姐
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息