Cortex-M4 Core Registers

Cortex-M4 Core Registers

Goal: visualizing what happens to the Cortex-M4 core registers after reset


Here's what happens after the processor is reset:

    • General-purpose registers have unknown values in them
    • Stack pointer register is loaded with the value of the Initial SP value register located at 0x0000 (Vector Table)
    • Link register will have 0xFFFFFFFF
    • Program counter is loaded with the value of the Reset register located at 0x0004 (Vector Table)
      • In the case of STM32F4, Reset register contains the address of the Reset_Handler which is defined in startup_stm32f40xx.s
    • Reset_Handler performs microcontroller system setup, configures the system clock, eventually branches to __main (entry point of a program) in the C library. 
    • Vector Table is mapped to address 0 at reset (can be relocated in this range: 0x00000080 - 0x3FFFFF80)

 

Summary of registers and their roles in the procedure call standard (AAPCS).

posted @   IAmAProgrammer  阅读(723)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
历史上的今天:
2013-09-08 TPS5410/TPS5430 开关电源稳压器(DC-DC)
2013-09-08 TF卡翻盖式卡座
2012-09-08 git 创建 .gitignore 文件
2012-09-08 git commit 时,会打开默认的文本编辑器,要求你输入提交信息
2012-09-08 git 初始配置
2012-09-08 Git忽略文件
2012-09-08 git 创建 .gitignore 文件 建立项目过滤规则
点击右上角即可分享
微信分享提示