【总结】2440烧写方式

2440烧写方式

1.1 使用并口烧写

1.2 使用OpenJTAG烧写

OpenJTAG支持将二进制代码烧写到FLASH中。它的烧写工具是oflash。oflash烧写完成后会自动复位。

1.2.1 安装oflash

光盘资料\windows\tools目录下,双击01.OpenOCD with GUI setup.exe进行安装。

这里写图片描述

驱动安装成功后,设备管理器中会增加100ASK JTAG

这里写图片描述

安装完成后,在命令行中输入oflash进行测试。

这里写图片描述

常用的命令格式是2和4.

命令2:oflash file name
按照提示,一步一步进行操作。

命令4:oflash [jtag_type] [cpu_type] [flash_type] [read_or_write] [offset] [file]

设定好参数后,只需一步操作,即可全部完成,其实本质是一样的,只是没有提示信息。

输入x退出oflash。

1.2.2 烧写步骤

  1. 启动命令行

这里写图片描述

  1. 切换到bin文件目录

这里写图片描述

  1. 连接OpenJTAG,并打开开发板电源

  2. 命令行下输入oflash

这里写图片描述

  1. 选择JTAG类型。输入0,选择使用OpenJTAG

这里写图片描述

  1. 选择CPU类型,输入1,选择2440

这里写图片描述

  1. 输入0,选择Nand Flash下载

这里写图片描述

  1. 输入文件名
    这里写图片描述

  2. 输入0,选择Nand Flash写入

这里写图片描述

  1. 选择Nand flash地址,输入0,下载到Nand flash的0地址上

这里写图片描述

  1. 烧写完成后,板卡自动重启,检查LED是否被点亮

1.3 JLINK烧写

JLINK只能烧写NOR FLASH

1.4 使用NOR FLASH上的uboot烧写

  1. oflash将uboot烧写到NOR FLASH中
  2. 设置NOR启动
  3. 拔掉OPENJTAG
  4. 使用串口
  5. 拨码开关NOR NAND,选择NOR
  6. 重新上电
  7. 插上USB线(不是串口)
    使用DNW下载bin文件

5.1. 插上USB线,准备发送

5.2.重启,载menu菜单下输入k

+---------------------------------------------+
| S3C2440A USB Downloader ver R0.03 2004 Jan  |
+---------------------------------------------+
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: <ADDR(DATA):4>+<SIZE(n+10):4>+<DATA:n>+<CS:2>
NOTE: Power off/on or press the reset button for 1 sec
      in order to get a valid USB device address.

Hit any key to stop autoboot:  0 

##### 100ask Bootloader for OpenJTAG #####
[n] Download u-boot to Nand Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
[s] Set the boot parameters
[b] Boot the system
[r] Reboot u-boot
[q] Quit from menu
Enter your selection: k
USB host is connected. Waiting a download.

5.3. 打开dnw.exe

5.4. 发送uImage文件

发送完成后,串口会输出信息

Enter your selection: k
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:30000000h,TOTAL:1848730]
RECEIVED FILE SIZE: 1848730 (902KB/S, 2S)

NAND erase: device 0 offset 0x60000, size 0x200000
Erasing at 0x240000 -- 100% complete.
OK

NAND write: device 0 offset 0x60000, size 0x1c3590

Writing data at 0x223000 -- 100% complete.
 1848720 bytes written: OK

5.5. u-boot菜单下输入b,启动内核

starting pid 772, tty '/dev/s3c2410_serial0': '/bin/sh'
# 
# ls
bin         lib         mnt         root        tmp
dev         linuxrc     opt         sbin        usr
etc         lost+found  proc        sys
# 
# 

1.5 tftp下载

  1. 设置uboot

    • OpenJTAG> set ipaddr 192.168.1.17
    • OpenJTAG> set serverip 192.168.1.4
  2. 启动tftp服务

  3. uboot
    tftp 30000000 lcd.bin
    nand erase bootloader
    nand write 30000000 bootloader

oflash 0 1 1 1 0 u-boot.bin

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值