Loading Code onto the PixHawk4

I can load the stock code using the APM planner, but I’m having trouble connecting to the board in the patched Arduino IDE. I would like to load the code that I have been loading onto the APM 2.6, but I keep getting this error:

     System wide configuration file is "/Applications/Arduino (AP Patched).app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/Users/Michael/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/tty.usbmodem1
     Using Programmer              : wiring
     Overriding Baud Rate          : 115200

avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS

I have already modified the config.mk file so that it points to the px4 repositories. Are there some extra modifications that I need to make to get my code to compile and load onto the px4?


Please take a look to this information it might help