I am having some trouble uploading the APM firmware via Arduino IDE.
The code does not compile as the “sketch is too big”.
I'm using the APM2.2 firmware where the HIL stuff is already commented out. I did not change the code at all.
It is not a board problem as when I upload the code via the mission planner everything works perfectly.
It is not a wrong setting on Arduino IDE as I successfully tested the board with some of the test codes provided in APM wiki
The strange thing is that the code compiles fine if HIL is enabled.