# How to flash px4-stm32f4discovery.bin to stm32f407?

**URL:** <https://discuss.px4.io/t/how-to-flash-px4-stm32f4discovery-bin-to-stm32f407/8444>\
**Category:** Pixhawk\
**Created:** [November 11, 2018, 7:58am UTC](https://discuss.px4.io/t/how-to-flash-px4-stm32f4discovery-bin-to-stm32f407/8444 "2018-11-11T07:58:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhongpei\_yang](https://discuss.px4.io/user_avatar/discuss.px4.io/zhongpei_yang/32/2595_2.png) [@zhongpei\_yang](https://discuss.px4.io/u/zhongpei_yang)\
**Post date:** [November 11, 2018, 7:58am UTC](https://discuss.px4.io/t/how-to-flash-px4-stm32f4discovery-bin-to-stm32f407/8444/1 "2018-11-11T07:58:50Z")

</div>

I have flash px4discovery\_bl.bin(bootloader) to my board(stm32f407).By that:  
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c “reset halt” -c “flash write\_image erase px4discovery\_bl.bin 0x08000000”

And then I insert the usb to the board.I find “PX4 BL DISCOVERY” on my ubuntu.  
So then I open terminal， I use “make px4-stm32f4discovery\_default upload” in folder of “src/Firmware” .  
But:  
[98%] Built target systemcmds\_\_nshterm  
[98%] Built target systemcmds\_\_ver  
[98%] Built target examples\_\_px4\_simple\_app  
[98%] Built target nuttx\_px4-stm32f4discovery\_default.elf  
[98%] uploading px4  
Loaded firmware for board id: 99,0 size: 245612 bytes (23.80%), waiting for the bootloader…

I wait long time but always that.So I quit.

So I want to flash “px4-stm32f4discovery.bin” to stm32f407 directly.

But I don’t know what is the flash address？So it’s my problem.
