Modify Compile Upload Code

I’m trying to make a few modifications to the source code. To test that I’m understanding the code and everything is setup correctly, I’m first trying to change the color of the LED from blue to green when armed. However, I can’t seem to figure out where I’m going wrong.

I have the Pixhawk flight controller and I’ve tried modifying code in several different places, but I never see any changes on the Pixhawk. Here’s one of my attempts that hasnt been successful:

  • Changing code in src/modules/gpio_led/gpio_led.c
  • Compiling in the Firmware folder by typing “make px4fmu-v2_default”
  • Uploading in the Firmware folder by typing “make px4fmu-v2_default upload”

Since I’m not sure where the problem is occurring, can I have a play by play explanation of how to change the LED color when armed?

  • File to change
  • What portion of the code to change
  • Compile command
  • Upload command


I suppose what I’m asking is a bit much, but I’m asking it because everything seems to work fine up until the point where I’m trying the new compiled firmware.

Could it be that the firmware isn’t uploading properly? I notice that when I flash firmware (not custom) that all the parameters get wiped, but when I flash a custom firmware everything is still the same. Is this a sign that I’m not uploading correctly?

Did you figure out how to reflect the modifications?