xubuntu openocd nRF51822 download --- 2

原创 2015年07月10日 23:34:14

昨天很晚的时候才终于发现其实Unkown USB Device并不是错误,只是个警告而已,所以我们不关心就可以,让Makefile继续往下走就可以,于是我尝试mbs,s110,cload和firmware的下载,执行如下命令:

make flash
make flash_s110
make flash_mbs
make flash_cload

具体执行过程如下:

bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_mbs
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase bootloaders/nrf_mbs_v1.0.hex" -c "verify_image bootloaders/nrf_mbs_v1.0.hex" -c "reset halt" \
               -c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
               -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          halted
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
^CMakefile:122: recipe for target 'flash_mbs' failed
make: *** [flash_mbs] Interrupt

bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_mbs
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase bootloaders/nrf_mbs_v1.0.hex" -c "verify_image bootloaders/nrf_mbs_v1.0.hex" -c "reset halt" \
               -c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
               -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          halted
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 3072 bytes from file bootloaders/nrf_mbs_v1.0.hex in 19.481831s (0.154 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 2112 bytes in 0.288700s (7.144 KiB/s)
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_cload
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase bootloaders/cload_nrf_v1.0.hex" -c "verify_image bootloaders/cload_nrf_v1.0.hex" -c "reset halt" \
               -c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
               -c "mww 0x4001e504 0x01" -c "mww 0x10001080 0x3A000" -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.556986
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 13312 bytes from file bootloaders/cload_nrf_v1.0.hex in 82.957291s (0.157 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 12368 bytes in 0.351360s (34.375 KiB/s)
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ 
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash_s110
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "nrf51 mass_erase" \
                 -c "flash write_image erase s110/s110_nrf51822_7.0.0_softdevice.hex" \
                 -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.558242
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Warn : Unknown device (HWID 0x00000058)
auto erase enabled
Info : Padding image section 0 with 2112 bytes
wrote 87040 bytes from file s110/s110_nrf51822_7.0.0_softdevice.hex in 543.104126s (0.157 KiB/s)
shutdown command invoked
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make flash
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
                 -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.558242
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000058)
wrote 45056 bytes from file cf2_nrf.hex in 282.951080s (0.156 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 44944 bytes in 0.579762s (75.705 KiB/s)
shutdown command invoked
那其实,在Makefile的最后,我们可以看到:

factory_reset:
	make mass_erase
ifeq ($(strip $(S110)),1)
	make flash_s110
	make flash_mbs
	make flash_cload
endif
	make flash
所以看上去如果S110=1,那么只要执行make factory_reset就可以将s110,mbs,cload和firmware全部下载进去,不用分步进行,一键搞定,真爽! 昨天的研究也没白费,终于搞懂了。

NRF51822 download 程序出错

问题一:Download softdevice 出错使用nRFgo download softDevice 时出现programming failed 问题二: 使用KEIL download 程序...

低功耗蓝牙4.0BLE编程-nrf51822开发(2)

首先看的示例是心率计一个示例程序: \ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_hrs\arm。     打开工程前需要下载蓝牙协...

低功耗蓝牙4.0BLE编程-nrf51822开发(2)

首先看的示例是心率计一个示例程序: \ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_hrs\arm。     打开工程前需要下载蓝...

nrf51822 --- 外部中断(按键2)

按键外部中断

BLE-NRF51822教程2-工程初始化流程

代码讲解基于资料包里配套的 sdk5.1版本中的串口demo。高版本的sdk基本都是差不多的。 代码在路径xxxxx\keil\ARM\Device\Nordic\nrf51822\Board\pc...

BLE-NRF51822教程2-工程初始化流程

nordic BLE 交流群498676838   代码讲解基于资料包里配套的 sdk5.1版本中的串口demo。高版本的sdk基本都是差不多的。 代码在路径xxxxx\keil\AR...
  • kiasur
  • kiasur
  • 2016年03月09日 10:09
  • 555

nrf51822-主从通信分析2

http://blog.chinaunix.net/uid-28852942-id-5748595.html 解决第三个问题:如何使能从机上的特征值的 notify功能,使其能通过not...

crazyflie2_nrf51822程序分析--总体结构

为了尊重原始版本,将英文原文贴出来,同时将一些需要注意的地方加上我的注释 Source code of the firmware running in the Crazyflie 2.0 nRF...

BLE-NRF51822教程2-工程初始化流程

http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=28852942&id=5213584 代码讲解基于资料包里配套的 sdk5....

nrf51822软件调试工具(2)

  • 2017年04月26日 20:03
  • 656KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:xubuntu openocd nRF51822 download --- 2
举报原因:
原因补充:

(最多只允许输入30个字)