Yesterday very late when finally found that in fact unkown USB device is not a mistake, just a warning, so we do not care about can, let makefile continue to go down can, so I try to mbs,s110,cload and firmware download, Execute the following command:
Make Flash
Make flash_s110
Make Flash_mbs
Make Flash_cload
The specific implementation process is as follows:
[email protected]:~/projects/crazyflie2-nrf-firmware$ make Flash_mbsopenocd-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_MB S_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 shutdownopen on-chip Debugger 0.8.0 (2014-05-10-23:21) Licensed under GNU GPL v2for Bug reports, Readhttp://openocd.sourceforge.net/doc/doxygen/bugs.htmldebug_level:2info:this adapter Doe SN ' t support configurable Speedinfo:stlink v2 JTAG V16 API v2 SWIM v0 VID 0x0483 PID 0x3748info:using stlink API v2inf O:target Voltage:2.556986info:nrf51.cpu:hardware has 4 breakpoints, 2 watchpoints TargetName Type E Ndian tapname State------------------------------------------------------------------0* nrf51.cpu Hla_target Little Nrf51.CPU Haltedtarget State:haltedtarget halted due to debug-request, current Mode:thread xpsr:0xc1000000 pc:0x0 00006d0 Msp:0x000007c0auto Erase Enabledwarn:unknown device (Hwid 0x00000058) ^cmakefile:122:recipe for Target ' flash_m BS ' failedmake: * * * [flash_mbs] interrupt[email protected]:~/projects/crazyflie2-nrf-firmware$ make Flash_ Mbsopenocd-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 Shutdownopen on-chip De Bugger 0.8.0 (2014-05-10-23:21) Licensed under GNU GPL v2for bug reports, Readhttp://openocd.sourceforge.net/doc/doxygen /bugs.htmldebug_level:2info:this Adapter doesn ' t support configurable Speedinfo:stlink v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748info:using StlinkAPI V2info:target Voltage:2.556986info:nrf51.cpu:hardware has 4 breakpoints, 2 watchpoints TargetName TYP e Endian tapname State------------------------------------------------------------------0* Nrf51.cpu hla_target Little Nrf51.cpu haltedtarget State:haltedtarget halted due to debug-request, Curr ENT mode:thread xpsr:0xc1000000 pc:0x000006d0 msp:0x000007c0auto erase Enabledwarn:unknown device (HWID 0x00000058) W Rote 3072 bytes from file Bootloaders/nrf_mbs_v1.0.hex in 19.481831s (0.154 kib/s) target State:haltedtarget halted due to Breakpoint, current Mode:thread xpsr:0x61000000 pc:0x2000002e msp:0x000007c0verified 2112 bytes in 0.288700s (7.144 K IB/S) target State:haltedtarget halted due to debug-request, current Mode:thread xpsr:0xc1000000 pc:0x000006d0 msp:0x0 00007c0shutdown command invoked[email protected]:~/projects/crazyflie2-nrf-firmware$ make FLASH_CLOADOPENOCD- D2-f Interface/stlink-v2.cfg-F target/nrf51_stlink.tcl-c init-c targets-c "Reset halt"-C "flash Write_image erase Bootloaders/cloa D_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 Shutdowno Pen on-chip Debugger 0.8.0 (2014-05-10-23:21) Licensed under GNU GPL v2for bug reports, readhttp://openocd.sourceforge.net /doc/doxygen/bugs.htmldebug_level:2info:this Adapter doesn ' t support configurable Speedinfo:stlink v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748info:using stlink API V2info:target Voltage:2.556986info:nrf51.cpu:hardware has 4 BR Eakpoints, 2 watchpoints TargetName Type Endian tapname state----------------------- -------------------------------------------0* nrf51.cpu hla_target Little Nrf51.cpu Runningtarget St Ate:haltedtarget haltedDue to debug-request, current mode:thread xpsr:0xc1000000 pc:0x000006d0 Msp:0x000007c0auto Erase Enabledwarn:unknown Device (Hwid 0x00000058) wrote 13312 bytes from file Bootloaders/cload_nrf_v1.0.hex in 82.957291s (0.157 kib/s) Target stat E:haltedtarget halted due to breakpoint, current Mode:thread xpsr:0x61000000 pc:0x2000002e msp:0x000007c0verified 123 Bytes in 0.351360s (34.375 kib/s) target State:haltedtarget halted due to debug-request, current Mode:thread xpsr:0xc 1000000 pc:0x000006d0 msp:0x000007c0shutdown Command invoked[email protected]:~/projects/ crazyflie2-nrf-firmware$ [email protected]:~/projects/crazyflie2-nrf-firmware$ Make Flash_s110openocd-d2-f Interface/stlink-v2.cfg-f target/nrf51_stlink.tcl-c init-c targets-c "Reset halt"-C "nrf51 Mass_eras E "-C" flash Write_image erase S110/s110_nrf51822_7.0.0_softdevice.hex "-C" reset Run "- C Shutdownopen on-chip Debugger 0.8.0 (2014-05-10-23:21) Licensed under GNU GPL v2for bug reports, Readhttp://openocd.sourceforge.net/doc/doxygen/bugs.htmldebug_level:2info: This adapter doesn ' t support configurable Speedinfo:stlink v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748info:using Stlink API V2info:target Voltage:2.558242info:nrf51.cpu:hardware has 4 breakpoints, 2 watchpoints TargetName Type Endian tapname State--------------------------------------------------------------- ---0* nrf51.cpu hla_target little nrf51.cpu runningtarget State:haltedtarget halted due to Debug-reque St, current mode:thread xpsr:0xc1000000 pc:0x000006d0 msp:0x000007c0warn:unknown device (hwid 0x00000058) Auto Erase Enabledinfo:padding Image section 0 with 2112 byteswrote 87040 bytes from file S110/s110_nrf51822_7.0.0_softdevice.hex I N 543.104126s (0.157 kib/s) shutdown command invoked[email protected]:~/projects/crazyflie2-nrf-firmware$ make Flashopenocd-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 shutdownopen on-chip Debugger 0.8.0 (2014-05-10-23: Licensed under GNU GPL v2for bug reports, Readhttp://openocd.sourceforge.net/doc/doxygen/bugs.htmldebug_level: 2info:this Adapter doesn ' t support configurable Speedinfo:stlink v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748info : Using Stlink API V2info:target Voltage:2.558242info:nrf51.cpu:hardware has 4 breakpoints, 2 watchpoints TargetN Ame Type Endian tapname State------------------------------------------------------- -----------0* nrf51.cpu hla_target Little nrf51.cpu runningtarget State:haltedtarget halted due to Deb Ug-request, current mode:thread xpsr:0xc1000000 pc:0x000006d0 Msp:0x000007c0auto erase Enabledwarn:unknown device (H WID 0x00000058) wrote 45056 bytes From File Cf2_nrf.hex in 282.951080s (0.156 kib/s) target State:haltedtarget halted due to breakpoint, current Mode:thre Ad xpsr:0x61000000 pc:0x2000002e msp:0x000007c0verified 44944 bytes in 0.579762s (75.705 kib/s) shutdown command invoked
In fact, at the end of the makefile, we can see:
Factory_reset:make Mass_eraseifeq ($ ($ (strip $ (S110)), 1) make Flash_s110make flash_mbsmake flash_cloadendifmake Flash
So it seems that if s110=1, then as long as the implementation of make Factory_reset can be s110,mbs,cload and firmware all downloaded into, without step, a button to do, really cool! Yesterday's study was not wasted, finally understand.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Xubuntu openocd nRF51822 Download---2