Skip to main content

Contemplative Chronicles

PX4 tricks and tips

Table of Contents

Upload new firmware from command line

python3 Tools/px_uploader.py --port=/dev/ttyACM0 build/px4_fmu-v6c_default/px4_fmu-v6c_default.px4

Use mavlink console without QGC

python3 Tools/mavlink_shell.py
Using port /dev/serial/by-id/usb-Auterion_PX4_FMU_v6C.x_0-if00
Connecting to MAVLINK...

NuttShell (NSH) NuttX-11.0.0
nsh> 
nsh>

Hardware Debugging PX4 code using STM32Code IDE

Hardware level debugging of PX4 code using STM32 debug ports provide more inside into low level hardware debugging.

Attach to target

I tried to download and run the code from IDE but it always results in exception. Hence its better to download the px4 code separately and then attach during run time.

Debug configuration

Debug Type

Debugger setting

Debug settings

!Debug_Debugger

Startup

Make sure to disable download and set to false

!Startup