Build Firmware on windows or Linux


I build Firmware on windows using make px4-stm32f4discovery_default (spend 6 hours). It can work on stm32f4discovery board.
but if I build on ubuntu ,It can’n work (can’n Connect to the NuttX Terminal via UART2).
Why it spend 6 hours when i bilud on windows?
Why it can’n work when i build on ubuntu?
Somebody help me please.


Use the build instructions on And make sure to follow every step. It will work all fine then.

It would also have told you that you shouldn’t use Windows.

1 Like

I have try many times step by step. It can’t work , although i have installed Snapdragon Flight‘s toolchain.I don’t know if because i use ubuntu14.04 .


You are not building for a Snapdragon Flight if you want to run on the STM32F4 discovery. That is a NuttX board. I just build the target locally without issues, so something is wrong with your setup.


I can build target without issues,but when i upload to STM32F4_discovery , it can’t work(can’n Connect to the NuttX Terminal via UART2).


You need to check if you configured and wired everything correctly. Can you connect to the terminal via USB?


i sure i wired everything correctly,because i have try build using windows and upload to the board.And everything is ok. I can connect to the terminal via usart2, but can’t via usb.
But if i build using ubuntu ,it can’t work . can’t via usart2 nor usb.


So what you’re saying is that you can’t connect to either USART2 or USB on Linux?

If yes, what is the command you are trying? Can screen open the port but you don’t get the nsh console or can you not even open the port?


About the question of windows build, maybe your computer is i7 type U, or It’s the feature about windows. You can use the windows task manager, in the process column , right click, and change the task priority to high. It makes effect significantly.


hi, I have followed the way it was mentioned in “” for windows. But, in one sometime the build is created successfully but in sometime it shows an error underfine reference “get_errno_ptr”. but the behavior of the error is not predictable. in sometimes it shows in at the copletion of building 8% and sometime 20%. Any help is appreciated.



The documentation says that Windows is not supported. Please use an Ubuntu VM or dual-boot.



I am also experiencing this issue of no connectivity when trying to access the PX4 nsh over UART on the Discovery board. I’m on the latest stable branch, no build or programming errors.

I verified my wiring by flashing stock NuttX to the board, and was able to access nsh over both USB and UART2 w/ FTDI cable no problem. Switching back to the PX4 discovery bootloader + px4-stm32f4discovery_default build, I get nothing on either port.

Any assistance would be greatly appreciated.

edit: I am on Ubuntu 14.04 using arm-none-eabi-gcc version 4.8.4


The discovery board is an experimental target not within the main line of support. It will likely take some debugging effort. Officially maintained boards are listed under autopilots on


I am currently having the same problem with the stm32f4discovery. Compiling and uploading works well, but I am not able to get the nsh terminal to work. After compiling with the CONFIG_DEBUG flag set in nuttx-configs/px4-stm32f4discovery/nsh/defconfig, I get the following output on the UART connection that I set up for connecting to nsh on USART2 on the discovery board:
Airq_unexpected_isr: irq: 2 Assertion failed at file:irq_unexpectedisr.c line: 86 task:
where it seems like the first character (‘A’), is from the showprogress() function being called in stm32_start.c on line 208. And since no ‘B’ shows up in the terminal, it seems like this is about as far the initialization gets in my case.

Will continue debugging, but hope this can be helpful to those of you that are having the same problem.

My setup: Xubuntu 14.04 with arm-none-eabi-gcc 4.8.4


I experienced the exact same problem (compiling and uploading works, but no nsh terminal), any solution so far?


I have nsh working with STM32Discovery board (on Windows). I’m following these directions, but I was able to connect the USART2 pins directly to my PC using a FTDI serial USB cable (like this one and Putty connects to the board and nsh is good.


The 1st time a trying build fw px4, so happend error, please help


I trying to build firmware px4-stm32f4discovery but I can’t, who 's already build it, please give me with many thanks.


Hi guys,
Please help. I lost 2 days, but can’t build fw STM32F4 Discovery, Who had it please send to me,