Bus 003 Device 059: ID 0483:5740 STMicroelectronics STM32F407
Then, I make it enter DFU mode by press on/off button at start. The LED shows corrent, with two front LED blink in blue. But I cannot find device by command
Nothing is going wrong: if both blue LED are blinking you are in radio bootloader mode, not in DFU mode. The radio bootloader does not initialize the STM32 USB peripheral which explains that you are not seeing anything with lsusb. While in bootloader mode you can flash you crazyflie with "make cload" from any firmware project or with the Cazyflie client bootloader toolbox.
If you really want DFU mode (be careful you can erase the stm32 bootloader with DFU, you will then have to re-flash it) you have to press the ON/OFF switch for about 5 second until the M2 blue LED blinks faster and then click again on the button. To reset you need to power cycle the board. Note that it is not possible to program the radio chip nRF51 in dfu mode, is is mainly intended as a recovery mode.
You can flash both STM32 and nRF51 using the radio link. The SWD cable is only required if you want to debug using GDB (and to do things like updating the bluetooth stack).
To flash the nRF51 from source you can type "make cload" in the crazyflie2-nrf-firmware project and it will be flashed.
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/main.o src/main.c
arm-none-eabi-as -mcpu=cortex-m0 -mthumb -o gcc_startup_nrf51.o gcc_startup_nrf51.s
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o system_nrf51.o system_nrf51.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/uart.o src/uart.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/syslink.o src/syslink.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/pm.o src/pm.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/systick.o src/systick.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/button.o src/button.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/swd.o src/swd.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ow.o src/ow.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ow/owlnk.o src/ow/owlnk.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ow/ownet.o src/ow/ownet.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ow/owtran.o src/ow/owtran.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ow/crcutil.o src/ow/crcutil.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ds2431.o src/ds2431.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/ds28e05.o src/ds28e05.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/esb.o src/esb.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51 -I Include -I Include/gcc -Iinterface -DRSSI_ACK_PACKET -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11 -DS110=1 -c -o src/memory.o src/memory.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -O0 --specs=nano.specs -Wl,-Map=cf2_nrf.map -T gcc_nrf51_s110_xxaa.ld -o cf2_nrf.elf src/main.o gcc_startup_nrf51.o system_nrf51.o src/uart.o src/syslink.o src/pm.o src/systick.o src/button.o src/swd.o src/ow.o src/ow/owlnk.o src/ow/ownet.o src/ow/owtran.o src/ow/crcutil.o src/ds2431.o src/ds28e05.o src/esb.o src/memory.o
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-bzero.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-errno.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-exit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-fini.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-impure.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-init.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-memcmp.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-memcpy.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-memset.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-printf.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-__atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-__call_atexit.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-findfp.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-fwalk.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-mallocr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-vfprintf.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-vfprintf_i.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-sbrkr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-stdio.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-wbuf.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-writer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-wsetup.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-closer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-fflush.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-fvwrite.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-lseekr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-makebuf.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-memchr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-memmove.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-freer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-reallocr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-readr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-reent.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-fstatr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-isattyr.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-msizer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
arm-none-eabi-objcopy cf2_nrf.elf -O binary cf2_nrf.bin
arm-none-eabi-objcopy cf2_nrf.elf -O ihex cf2_nrf.hex
arm-none-eabi-size cf2_nrf.elf
text data bss dec hex filename
26056 444 2564 29064 7188 cf2_nrf.elf
S110 Activated
BLE Disabled
you need to "make BLE=0 cload" to flash without bluetooth. The reason is that the Makefile compiles the project when you launch "make cload" so all the option must be given.