- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在使用 Atmel SAM3X8 ARM 微 Controller ,该微 Controller 具有双组 2 x 256KB 闪存。我正在尝试实现固件更新功能,将新固件放入当前未使用的闪存库中,完成后使用闪存重新映射交换库以运行新固件。
数据表指出,我需要设置 GPNVM2 位,然后 MCU 将重新映射内存,因此 Flash 1 现在位于 0x80000,Flash 0 位于 0xC0000。这也将导致 MCU 执行从 Flash 1 开始的代码。
引用数据表:
The GPNVM2 is used only to swap the Flash 0 and Flash 1. If GPNVM2 is ENABLE, the Flash 1 is mapped at address 0x0008_0000 (Flash 1 and Flash 0 are continuous). If GPNVM2 is DISABLE, the Flash 0 is mapped at address 0x0008_0000 (Flash 0 and Flash 1 are continuous).
[...]
GPNVM2 enables to select if Flash 0 or Flash 1 is used for the boot. Setting GPNVM bit 2 selects the boot from Flash 1, clearing it selects the boot from Flash 0.
最佳答案
我有同样的问题(见这里: Atmel SAM3X8E dual bank switching for booting different behaviour )。
经过更多研究,我找到了一份应用说明(链接:http://ww1.microchip.com/downloads/en/AppNotes/Atmel-42141-SAM-AT02333-Safe-and-Secure-Bootloader-Implementation-for-SAM3-4_Application-Note.pdf),它以更清晰的方式解释了 SAM3X 的启动行为。问题是数据表有点误导(至少我也很困惑)。 SAM3X 无法重新映射闪存组。启动行为有点不同(请参阅链接中的图片,它是从应用说明中截取的,第 33/34 页):
Booting behaviour SAM3X
图 3-9 显示了 SAM3X 在启动时的行为。 GPNVM 位 1 和 2 仅确定哪个内存部分(ROM/Flash0/Flash1)被镜像到引导内存(位于 0x00000000)。 Flash bank 的映射没有改变 .因此 Flash0 仍然映射到 0x00080000,Flash1 映射到 0x000C0000)。
正如应用说明所述,其他一些 Atmel 微 Controller 能够真正重新映射闪存组(例如 SAM3SD8 和 SAM4SD32/16)。如图 3-10 所示,这些处理器改变了闪存库的位置。
为了能够更新您的固件,因此有必要实现某种引导加载程序。我自己实现了一个,即使根本不使用 GPNVM 位也能够更新我的固件。我还在 Microchip 开了一张支持票,以阐明启动行为。当我收到答复时,我希望能告诉你更多。
编辑:
这是来自 Microchip 支持的答案:
Setting the GPNVM2 bit in SAM3X will merely make the CPU 'jump to' or start from flash bank 1 i.e. 0xC0000. No actual swap of memory addresses will take place.
To use flash bank 1, you will need to change the linker file (flash.ld) to reflect the flash start address 0xC0000.
For flash bank 0 application, change: rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K / to: rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00040000 / Flash, 256K */
For flash bank 1 application, change: rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K / to: rom (rx) : ORIGIN = 0x000C0000, LENGTH = 0x00040000 / Flash, 256K */
If this is not done, the reset handler in the flash 1 application will point to an address in the flash 0 application. So, although code will start execution in flash 1 (if GPNVM2 is set), it will jump back to the flash 0 application. The errata stating the 64kb limitation can be ignored.
关于arm - Atmel SAM3X 双组切换不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47078293/
将 ARM 处理器模式与 x86 操作模式(ring0 到 ring 3)进行比较,用户模式看起来就像 ring3,用户空间程序在其中运行。 但是,我无法将 ring0 与系统模式或主管模式联系起来。
为什么我们在 ARM 架构中有暂存寄存器?处理器如何使用它,我的意思是这个寄存器的用途是什么? 最佳答案 来自 Procedure Call Standard for the Arm Architec
我了解弱内存模型和强内存模型的基本区别。但是没有确切的弱定义,它取决于体系结构(这里是 ARM)。 我已经阅读了有关 ARM 信息中心的文档,但仍有很多内容不清楚。有人可以列出 - ARM 保证哪些内
我想在 arm 9 上分析我的代码,是否有任何分析器可以给我函数调用时间和每个函数占用的总周期?我更喜欢任何免费的分析器。我喜欢在 Linux 中使用 kcachegrind。 最佳答案 我不知道有什
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 7 年前。 Improve this qu
众所周知,对于X86架构:按下电源按钮后,机器开始执行0xFFFFFFF0处的代码,然后开始执行BIOS中的代码以进行硬件初始化。 BIOS 执行后,它使用引导加载程序将操作系统镜像加载到内存中。最后
我有 rootfs 和 klibc 文件系统。我正在创建 make 规则,而一些开发人员的编译器较旧,但没有联网。note1 我正在尝试验证所有文件都是使用 arm 仅当检测到某个版本的编译器时。我已
在部署实际应用程序之前,我们使用 ARM 模板部署 Azure 资源,作为构建过程的一部分。 到目前为止,我们所有的应用程序资源都自包含在资源组中。例如需要 SQL Server 和存储帐户的 Web
为什么 ARM Controller 在发生异常时要从 THUMB 状态返回到 ARM 状态? 最佳答案 一种解释可能是 ARM 模式是 CPU 的“ native ”操作模式,与有限的 Thumb
我正在尝试反转 128 位向量 (uint16x8) 的顺序。 例如,如果我有 a b c d e f g h 我想获得 h g f e d c b a 有没有一种简单的方法可以使用 NEON 内在函
有很多关于内存屏障的信息。大多数信息是指多核或多处理器架构。 Stackoverflow 上的某个地方还指出,单核处理器不需要内存屏障。 到目前为止,我找不到任何明确的解释,为什么单核 CPU 上不需
我想在 ARM Cortex A8 处理器上移植一小段代码。 L1 缓存和 L2 缓存都非常有限。我的程序中有 3 个数组。其中两个是顺序访问的(大小> 数组 A:6MB 和数组 B:3MB),第三个
我无法弄清楚这个 ARM 指令是做什么的: strd.w r0, r1, [r2] 我知道这是一个存储指令,它在 *r2 中存储了一些东西。但我不完全确定是什么。为什么有两个源寄存器
我很好奇为什么有些 ARM 指令(如 MUL 和 ADD)不使用桶形移位器。我想知道极限背后的理性。谢谢! 最佳答案 并不是没有使用桶形移位器;这是您无法指定它在非常具体的指令(数据处理和加载/存储)
我需要计算与 SSE 相同的操作: __m128i result1=_mm_avg_epu8 (upper, lower); 使用 NEON,我执行以下操作: uint8x16_t result1=v
我正在尝试使用 PLD 指令。我面临的问题如下: int32_t addr[10]; asm ("PLD [addr,#5]"); 我收到以下错误: Error: ARM register expec
根据 ARM 手册,应该可以访问特定 CPU 模式的存储寄存器,例如“r13_svc”。当我尝试执行此操作时,gcc 对我大喊大叫,并显示以下错误: 立即表达式需要 # 前缀 -- `mov r2,s
我正在使用 mbxxx 目标开发 Contiki 2.7。在构建我的代码时,链接器提示 .ARM.exidx 和 .data 部分的重叠 .在修改了链接器脚本 contiki-2.7/cpu/stm3
如何确定给定 ARM 处理器上是否存在 NEON 引擎?可以为此目的查询任何状态/标志寄存器吗? 最佳答案 我相信unixsmurf's answer如果使用具有特权内核的操作系统,这将与您获得的一样
如何在设备上分析我的 ARM 代码。 这是涉及 USB 和 SDH 处理的裸机代码,我看到了这个 Code Profiler for ARM但似乎很 slim ,我很熟悉DS5但如果您使用基于 lin
我是一名优秀的程序员,十分优秀!