一、背景
对于J-LINK,一般只能使用J-Flash软件来烧写Norflash,而对于烧写Nandflash不支持,而Hjtag只能够烧写大部分固定平台的Nandflash,问了度娘,也没得到满意的答案,于是索性自己写一个J-LINK脚本来完成烧写工作。
二、平台介绍
CPU:AT91SAM9G10
内部SRAM:16KB
NANDFLASH:128M
三、上电启动过程分析
分为2步,Bootloader0,Bootloader1。
Bootloader0:这一部分主要执行CPU内部ROM中的代码。
1. Stack setup for ARM supervisor mode
2. Main Oscillator Frequency Detection
3. C variable initialization
4. PLL setup: PLLB is initialized to generate a 48 MHz clock necessary to use the USB
Device. A register located in the Power Management Controller (PMC) determines the
frequency of the main oscillator and thus the correct factor for the PLLB.