Build Firmware on windows or Linux

#1

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.

#2

Use the build instructions on http://dev.px4.io. 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
#3

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 .

#4

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.

#5

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).

#6

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

#7

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.

#8

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?

#9

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.

#10

hi, I have followed the way it was mentioned in “http://dev.px4.io/” 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.

Thanks.

#11

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

#12

Hello,

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

#13

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 http://dev.px4.io

#14

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

#15

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

#16

I have nsh working with STM32Discovery board (on Windows). I’m following these directions, https://pixhawk.org/modules/stm32f4discovery but I was able to connect the USART2 pins directly to my PC using a FTDI serial USB cable (like this one https://www.sparkfun.com/products/9717) and Putty connects to the board and nsh is good.

#17

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

#18

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

#19

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