@Tug_Goat: What Discovery board are you using? Is it the Discovery board with the STM32F407 chip on it? Did you do the following?
- For the bootloader (I assume you have downloaded the Px4/Bootloader repository):
- And for the main firmware (Px4/Firmware repository):
- The NSH console is set up on UART2 (PA2 and PA3) by default (no USB console for the STM32F4Discovery compilation, although you can set that up if you want).
Are you now just trying to compile the Px4FMU bootloader (
make px4fmu_bl) and flash that onto the board? This won't work, because you will have a clock configuration problem. The STM32F4Discovery board uses an 8MHz crystal and the Px4FMUs (all versions thereof) use a 24MHz crystal. If you flash the Px4FMU bootloader onto the discovery board, it will try and configure its peripherals thinking it is running off of a 24MHz crystal, when it actually has an 8MHz crystal. The USB will definitely not work, because that needs a fairly accurate 48MHz peripheral clock to be running. So if you are running the whole system off of an 8MHz crystal, your USB will be ticking over at +/-16MHz. You should also notice that the LED is flashing much slower than usual.
You will have the same problem if you flash the Px4FMU firmware directly onto the Discovery board using the ST-Link. When the main firmware starts up it will try and configure its clock thinking it is running off of a 24MHz crystal.
If you want to compile in the modules that are running on the Px4FMU on the on the discovery board, then you can simply add them to the CMake file for the STM32Discovery compilation:
Please be aware that if you are going to be setting up external sensors to run on your Discovery board, you will have to set up the pins correctly in the STM32F4Discovery compilation, so that the NuttX OS knows how to configure them on start up. If you need to do this, let me know and I can give you some pointers.