简体   繁体   English

ARM Cortex-m4 启动顺序

[英]ARM Cortex-m4 boot sequence

I am a bit confused about boot sequence of ARM Cortex-m processors.我对 ARM Cortex-m 处理器的启动顺序有点困惑。 From many different resources, i read that upon reset, the cortex-m copies contents from 0x0 to stack pointer and copies reset handler address from 0x4 to PC... My questions are:从许多不同的资源中,我读到在重置时,cortex-m 将内容从 0x0 复制到堆栈指针并将重置处理程序地址从 0x4 复制到 PC ......我的问题是:

1) how the cortex-m processor copies these two values to appropriate registers, I mean processor need LDR/STR instruction to do so, but here values are automatically copied??? 1) cortex-m 处理器如何将这两个值复制到适当的寄存器,我的意思是处理器需要 LDR/STR 指令才能这样做,但这里的值是自动复制的??? How the processor know thats these two words need to be copied.处理器如何知道需要复制这两个字。

2) does cortex-m controller contains any builtin firmware that is executed initially? 2) cortex-m 控制器是否包含任何最初执行的内置固件?

3) Normally processors after reset, start execting from a specific memory location in reset vector where the jump instruction is placed to reset handler... but here in cortex-m the processors start by copying first two words into registers and then Program counter points to Reset Handler... No jump instruction no Specific memory location where processor jump on reset.!!! 3)通常处理器在复位后,从复位向量中的特定内存位置开始执行,在那里跳转指令被放置到复位处理程序......但在 cortex-m 中,处理器首先将前两个字复制到寄存器中,然后是程序计数器点重置处理程序... 无跳转指令 无 处理器在重置时跳转的特定内存位置。!!! How is it possible??这怎么可能??

2) does cortex-m controller contains any builtin firmware that is executed initially? 2) cortex-m 控制器是否包含任何最初执行的内置固件?

Depends highly on the model and make.高度取决于型号和制造商。 Example: NXP LPC series Cortex-M chips (like LPC17xx) have some masked ROM instructions that are executed before the program in flash.示例:NXP LPC 系列 Cortex-M 芯片(如 LPC17xx)有一些掩码 ROM 指令,在闪存中的程序之前执行。 Others may have no such memory build in.其他人可能没有内置这样的内存。

1) how the cortex-m processor copies these two values to appropriate registers, I mean processor need LDR/STR instruction to do so 1) cortex-m 处理器如何将这两个值复制到适当的寄存器,我的意思是处理器需要 LDR/STR 指令来这样做

This happens in hardware before any code execution, so no LDR instructions needed.这发生在任何代码执行之前的硬件中,因此不需要 LDR 指令。

Its ridiculously simple, if you know what a state machine is and how to implement one in a hardware description language like VHDL or Verilog.如果您知道状态机是什么以及如何用 VHDL 或 Verilog 等硬件描述语言实现状态机,那么它就非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM