Problems loading the code with Arduino IDE

Hi guys

 

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.

Any suggestions?

Regards

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I am trying to load APM 2.2 for an aircraft autopilot through APM Mission Planner but it keeps getting stuck on "Checking APM version". I am using a APM v1.0 blue board and also tried it on v1.0 red board - both with oilpan. So I cannot just try APM MP as suggested. 

    Just to confirm that everything is setup OK (cables, ports, board) I tried uploading the APM_RC sketch via Adruino IDE and that works well.

    So I thought I would try compiling APM 2.2 via the Arduino IDE, it compiles OK but I get the same error as June at the begining of this thread namely:

     

    Binary sketch size: 131608 bytes (of a 126976 byte maximum)

    processing.app.debug.RunnerException: Sketch too big;

     

    I followed Chris's instructions in the http://diydrones.com/profiles/blogs/getting-the-most-out-of-your to try and reduce the size but still get 131608 bytes. Also going through the code it appears that most code is already to set to only compile if required so size should already be less than the max for APM 1280.

    From various posts it is stated that up to APM 2.3 it will remain compatible both with Mega 1280 and Mega 2560. 

    I really need help as totally stuck and badly need to get it working especially in HIL_XPLANE mode for some important tests. 

     

  • 3D Robotics
    Adrian, the Arduino code is meant for 2560 boards (Arduino adds code that pushes it over the memory limit, which the hex files in the Mission Planner do not). If you want to use it with the older 1280 board, you need to disable some features as described in this post:
    http://diydrones.com/profiles/blogs/getting-the-most-out-of-your
This reply was deleted.

Activity

DIY Robocars via Twitter
21 hours ago
DIY Robocars via Twitter
RT @_JonMyer: 🚨Attention DeepRacer's including #UndergroundDeepRacer🚨 Check our our LIVE stream that including @IAM_dbro Take a few moments…
Aug 5
DIY Drones via Twitter
RT @MarvelmindMaxim: Extreme precision for 60 swarming robots. #marvelmind #autonomousrobotics #robotics #swarmrobotics #rtls #ips #indoor…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Precise (±2cm) tracking for racing boats and autonomous boats. Works outdoor and indoor. #autonomous #AutonomousVehic…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Helping PixHawk folks to fly autonomous quadcopters using PX4 and ArduPilot. https://marvelmind.com/drones/ Equally suitab…
Aug 3
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars @donkey_car virtual AI car race is starting in 15 minutes! Watch it live on Twitch https://www.twitch.tv/mossmann3333 htt…
Aug 1
DIY Robocars via Twitter
RT @chr1sa: Don't miss our monthly @DIYRobocars @donkey_car virtual AI car race tomorrow at 10:00am PT live on Twitch. Head-to-head racing…
Jul 31
DIY Robocars via Twitter
RT @sparkfun: Our completed tutorial on building an @NVIDIA Jetson Nano-powered @Sphero RVR gets your bot up and running via teleoperation…
Jul 30
DIY Robocars via Twitter
RT @SmallpixelCar: Freeway test https://t.co/4V5tV9lhIP
Jul 29
DIY Robocars via Twitter
Very small autonomous cars racing, thanks to an overhead camera: https://control.ee.ethz.ch/research/team-projects/autonomous-rc-car-racing.html
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
RT @chr1sa: Don't miss our virtual AI car race this Saturday! Real developers + virtual cars =🏎️🏎️🏎️ Head-to-head battles with thrills, sp…
Jul 28
DIY Robocars via Twitter
Jul 27
DIY Robocars via Twitter
RT @usashirou1: Jetson nano by Isaac Kaya #jetson https://t.co/Mu1N0CyQkN
Jul 23
DIY Robocars via Twitter
RT @GPUsolution: JetRacer mady by Iflytek company #JetsonNANO #Nvidia https://t.co/MimTymIwge
Jul 23
More…