openocd+jlink为mini2440调试u-boot
需要安装openocd,如果已经安装了系统默认的openocd(默认是0.5.0,版本太低),需要先卸载掉。
在安装前需要安装必需的一些库文件:
sudo apt-get install libusb-1.0--dev libusb-1.0-0 automake autconf libtool pkg-config
然后执行安装:
git clone git://git.code.sf.net/p/openocd/code openocd
cd openocd
./bootstrap
./configure --prefix=/usr/local \
--enable-stlink --enable-jlink
echo -e "all:\ninstall:" > doc/Makefile
make
sudo make install
默认情况下openocd会安装到/usr/local/bin文件夹下,有可能会无法执行openocd命令,如果无法执行,可以将/usr/local/bin加入到PATH变量即可。
将mini2440和jlink以及pc连接起来,然后执行下面的命令:
sudo openocd -f interface/jlink.cfg -f board/mini2440.cfg
但是会提示下面的错误:
Runtime Error: /usr/local/share/openocd/scripts/board/mini2440.cfg:: jtag interface: command requires more arguments
将/usr/local/share/openocd/scripts/board/mini2440.cfg的124行注释掉(此行最前面添加一个‘#’符号,类似于bash注释)
然后在执行openocd:
sudo openocd -f interface/jlink.cfg -f board/mini2440.cfg
另开一个控制台,查看串口信息:
sudo minicom
还需要打开一个控制台,在该控制台下执行下面的命令:
telnet localhost 4444
halt
init_2440
load_image /home/host/soft/mini2440/u-boot/u-boot.bin 0x33f80000 bin
resume 0x33f80000
/home/host/soft/mini2440/u-boot/u-boot.bin是我的u-boot.bin文件路径,可以将其修改成自己的文件路径即可。 这几条命令是从/usr/local/share/openocd/scripts/board/mini2440.cfg中几个预定义的命令代码中提取出来的,可以执行help_2440显示当前所支持的自定义命令列表。 可惜的是,openocd没有检测到mini2440上的nand flash,所以无法烧写,后来经过调查,voltcraft_dso-3062c.cfg中采用了相同的nand flash。
貌似是openocd代码修改了,但是mini2440.cfg中配置却没有改掉,将/usr/local/share/openocd/scripts/board/mini2440.cfg文件中的nand device s3c2440 0
这一行修改成voltcraft_dso-3062c.cfg中的对应行:
nand device $_CHIPNAME.nand s3c2440 $_TARGETNAME
重新启动openocd:
sudo openocd -f interface/jlink.cfg -f board/mini2440.cfg
然后在另外一个控制台烧写uboot:
telnet localhost
halt
init_2440
nand erase 0 0x0 0x100000
nand write 0 /home/host/soft/mini2440/u-boot/u-boot.bin 0
reset
刚开始遇到好几次烧写不成功,后来执行了一次nand erase 0将整个nand flash擦除后才能成功执行烧写,
这个问题有可能是nand flash坏块多引起的(我的mini2440是二手开发板)。
openocd+jlink为mini2440调试u-boot的更多相关文章
- 【转载】s3c2440裸机开发调试环境(MDK4.6,Jlink v8,mini2440)
用于arm裸机程序开发的IDE基本有 以下3个:MDK,IAR,还有ADS.具体它们的具体情况在这里我就不多说了,百度一下就明白了.由于之前开发c51,stm32时候都使用了MDK开发环境,而且MDK ...
- ubuntu下使用openocd+jlink进行STM32开发调试
安装openocd就不用多说了,使用 apt-get install openocd 这个命令就可以做到. 对于使用stm32w系列的MCU,需要下载新的openocd-0.7及以上版本才能支持.0. ...
- 用jlink在mini2440上烧写uboot
首先,附上我安装jlink驱动: http://download.csdn.net/detail/zzmno1/3776716#comment 以及我使用的uboot.bin文件下载地址: http: ...
- j-link或者swd调试
两种 一.JTAG调试(5针), 二.SWD调试(2针), 在JTAG/SWD模式设置库函数 (在文件stm32f10x_gpio.c中): void GPIO_PinRemapConfig(uint ...
- Eclipse使用Debug模式调试Spring Boot项目时跳转到exitCurrentThread的问题
Spring Boot项目使用了spring-boot-devtools工具且在Eclipse中Debug调试会自动跳转到这个方法: public static void exitCurrentThr ...
- idea在docker环境,调试spring boot程序
允许docker被远程访问 见:https://www.cnblogs.com/wintersoft/p/10921396.html 教程见:https://spring.io/guides/gs/s ...
- 记录ok6410 jlink 命令行调试uboot
1\启动ok6410 进入uboot命令行 2\启动JLinkGDBServer -device ARM11 3\arm-none-eabi-gdb u-boot 初始化脚本 # Connect to ...
- 记录tiny6410 jlink 命令行调试linux-2.6.38内核
1\首先启动nandflash uboot->linux内核->文件系统,进入文件系统命令行 2\启动JLinkGDBServer -device ARM11 3\启动arm-none-e ...
- nuc970连接jlink进行单步调试的设置
在 USB mode 下, 先跟 NuWriter 接上, 然后用以下的设定. 按 Keil 的 debug (不是 download to flash)就可以接上了.
随机推荐
- 数据结构基础-Hash Table详解(转)
理解Hash 哈希表(hash table)是从一个集合A到另一个集合B的映射(mapping). 映射是一种对应关系,而且集合A的某个元素只能对应集合B中的一个元素.但反过来,集合B中的一个元素可能 ...
- poj1649 Rescue(BFS+优先队列)
Rescue Time Limit: 2 Seconds Memory Limit: 65536 KB Angel was caught by the MOLIGPY! He was put ...
- SQL CASE WHEN ... THEN ... ELSE.. END 实例
用一个SQL语句完成不同条件的分组(SELECT部分): select QuoteOrderId,SUM(case when(ApprovalStatus=1)then Amount else 0 e ...
- Oracle 连接、会话数的查看,修改
http://blog.csdn.net/xiaoyao6650/article/details/4027041 查看processes #当前的连接数 select count(*) from v$ ...
- [ACM] hdu 1029 Ignatius and the Princess IV (动归或hash)
Ignatius and the Princess IV Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32767K (Ja ...
- request获取数据的几种方法
1.request.getparameter(); String value=request.getparameter("key"); 2.request.getParameter ...
- Redis(六):java里常用的redis客户端(Jedis和Redisson)
Redis的各种语言客户端列表,请参见Redis Client.其中Java客户端在github上start最高的是Jedis和Redisson.Jedis提供了完整Redis命令,而Redisson ...
- C语言的##
比如说我定义一个宏:#define DECLARE_DYNAMIC(class_name) \public:static CRuntimeClass class##class_name; \virtu ...
- AndroidX86模拟器Genymotion的一些使用和另一款Andy模拟器
命令行启动虚拟机 当我们下载安装好,可以通过命令行运行指定名字模拟器 D:\ProgramFiles\Genymobile\Genymotion\player --vm-name "Sam ...
- Bootstrap学习速查表(三) 表单
表单中常见的元素主要包括:文本输入框.下拉选择框.单选按钮.复选按钮.文本域和按钮等. 一.基础表单 1.初始化:对于基础表单,Bootstrap并未对其做太多的定制性效果设计,仅仅对表单内的fiel ...