jflash烧录教程_Jlink烧录nand flash操作(步骤一)

论坛 期权论坛 编程之家     
选择匿名的用户   2021-5-29 04:07   21   0

一、将内存初始化程序下载至SRAM并运行

1.打开J-Link Commander,将micro开发板拨至nand flash启动。

2.以下是常用命令:

speed 12000:设置下载速率为12M。

r:reset,复位命令。

h:halt,停机、也有暂停的功能。

loadbin &ltfilename&gt &ltaddress&gt:下载filename文件到地址address上。

setpc:设在PC寄存器的值。

3.具体操作

[plain] view plaincopy

speed 12000

h

loadbin D:\2440init.bin 0

setpc 0

g

----------------暂停一下,等待加载·········

h

loadbin d:\FL_2440bootV5.1.bin 0x30010000

setpc 0x30010000

g

h

loadbin d:\FL_2440bootV5.1.bin 0x30800000

setpc 0x30800000

g

h

loadbin D:\led\led.bin 0x30800000

setpc 0x30800000

g

------------------------------------------------------

之后可以在串口线上面看到对应的信息,进行命令烧写

--------------------------------------------

说明:因为选择从nand flash启动时;0x00000000是映射到4K的SRAM中的,SRAM不需要初始化、即可直接运行程序。

init.bin是我们写的一段很简单的内存初始化程序;注意大小必须小于4KB。

二、下载u-boot程序至SDRAM内存

[plain] view plaincopy

h

loadbin d:\u-boot_SDRAM.bin 0x33f80000

setpc 0x33f80000

g

---------------------------------------------------------------------

说明:u-boot_SDRAM可以是友善提供的u-boot.bin。

三、使用u-boot烧录我们的程序至nand flash

[plain] view plaincopy

h

loadbin d:\FL_2440bootV5.1.bin 0x30010000

setpc 0x30010000

g

h

loadbin d:\HFL_2440bootV5.bin 0x30010000

setpc 0x30010000

g

说明:u-boot.bin是我们需要下载到nand flash的程序;可以是之前提到的myled.bin。

========-------------------------------------------------------------------------------

打开串口终端:

[plain] view plaincopy

nand erase 0 40000

nand write.jffs2 30000000 0 40000

该方法理论上在6410上也可行。

micro2440也即S3C2440A的SDRAM空间:0x3000 0000~0x3800 0000;

tiny6410也即S3C6410的SDRAM空间:0x5000 0000~0x6FFF FFFF。

SEGGER J-Link Commander V4.08l ('?' for help)

Compiled Sep 17 2009 09:42:18

DLL version V4.08l, compiled Sep 17 2009 09:41:55

Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46

Hardware: V8.00

S/N : 286370559

Feature(s) : RDI,FlashDL,FlashBP,JFlash

VTarget = 3.397V

Info: TotalIRLen = 4, IRPrint = 0x01

Info: Using DBGRQ to halt CPU

Info: Resetting TRST in order to halt CPU

Info: CP15.0.0: 0x41129200: ARM, Architecure 4T

Info: CP15.0.1: 0x0D172172: ICache: 16kB (64*8*32), DCache: 16kB (64*8*32)

Info: Cache type: Separate, Write-back, Format A

Found 1 JTAG device, Total IRLen = 4:

#0 Id: 0x0032409D, IRLen: 4, Unknown device

Found ARM with core Id 0x0032409D (ARM9)

JTAG speed: 5 kHz

J-Link&gt

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP