Developer

Pixhawk 1MB flash limit

This is a discussion for the 1MB flash limit issue so that we can consolidate any discussions and concerns about it in one place.

To give some background, all Pixhawk (and compatible) boards use STMicroelectronics's STM32F427 as their main CPU.  This CPU is advertised as having 2MB of flash space (flash is where the ardupilot software is held) but we have discovered that early revisions of this CPU (RevA, RevY and Rev1) have a hardware problem and can actually only hold 1MB and if we use more than that they start exhibiting USB communication problems.

Now currently APM:Copter-3.4 is 0.9MB so it's under the limit but as we add new features it grows and if it grows above 1MB users will find they can't reliable connect the ground station to the board using a USB cable (wireless would still work) which could make it very difficult to configure the board, download logs, etc.

We think many boards (perhaps most boards) out there are the early revisions (A, Y or 1) which suffer from this problem.  All the boards on my desk have this problem and you can check your board by following the instruction also shown in the video:

  • Ensure your Pixhawk (or compatible) is loaded with a recent version of ardupilot (like APM:Copter-3.3.x)
  • Connect with the Mission Planner
  • Go to the Terminal screen and select "NSH" on the drop-down on the left, then push the little green connect button beside the drop-down
  • type "ver all" and press Enter quickly into the terminal (the "Overtime in task 19" causes the MP some troubles)
  • look for the "WARNING! Revision Y has a silicon errata".

Some very recent boards do not suffer from this problem.  For example all Solo's are fine as are the XRacer (aka PixRacer) boards.

Before panic ensues I'd like to say that although APM:Copter-3.3.2 is already 90% of this limit, remember we've just done a release and we will put effort into keeping the code size under 1MB.  So for example, I can guarantee that APM:Copter-3.4 will fit and hopefully Copter-3.5 too.

Still, when you're shopping for your next Pixhawk you may consider asking the manufacturer if they are using the latest Rev3 STM32F427 processor.

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

Join diydrones

Email me when people reply –

Replies

      • Developer
        The PH uses an RTOS so inherently uses more resources before you add the APM code. And there is even a middleware layer to drive/read sensors. This is a much meow structured system. It offers benefits to running more complex tasks because of it.

        The limit here is 2MBytes and we are nowhere near that. The problem is yet be resolved but could be with some clever OS implementation. If not you can run an external USB adapter to the serial port. Transfer will be slower for logs, or use SD CARD extender and it fixed.
    • Because they tried to squeeze more and more code into the original Arduino chips. Which was obsolete for years anyway. Trying to program everything as efficient as possible makes development very slow, as Randy already stated.

      Also I`m a bit surprised that the discussion is THAT they are already are at almost 1MB. I wonder why we are still using hardware with flash memory in the MByte range. Why not move on and use a modern smartphone processor with external ram and flash memory and a real time Linux operating system? Wouldn`t that make upgrades easier as well and allow user to choose from hardware at different price points depending on the processor, ram and flash chips?

      And it`s not that the Pixhawks (and APM`s for that matter) are worthless after that. They are still fully functional and offer everything and more than promised. And you can still use APM hardware to fly around your plane any day.

      • Developer

        Bill and Rob have pretty much said it but from what I've seen, the exact same ardupilot firmware is at least twice the size when compiled for the Pixhawk vs the APM2.x boards.

        To help the developers keep an eye on the size, this appears at the end of every build.  The numbers below are for plane and show it's basically the same size as copter... a little over 90%.  Acutally copter is about 92% last time I checked.
           text       data        bss        dec        hex    filename
         911952       2836      62400     977188      ee924

      • Developer
        Pixhawk has a RTOS on it, so it uses more space. It's not run on the 'bare metal' like the APM.

        Why not use smartphone based professors,with external flash and ram. Cost of manufacture is higher, complexity is higher, development costs are higher. It's heading that way but markets need to support that as well. It just takes time. Bill of Materials. BOM. needs to be low.

        You can add sensors boards to RaspberryPi, but they are just as costly requiring onboard micro controllers for effective PWM/PPM conversions without sucking alL CPU resources to do it.
      • I wonder why we are still using hardware with flash memory in the MByte range.

        Because its available and usable for common users (like me and most of my readers) When do you think, that the hardware you´re talking about, is available @ a convenient size (not bigger than a 3DR PIXHAWK) , Arducopter compatible with an MP style user interface ?

        2017 ? 2018 ? 2019 ?

        I´m sure that most of us would buy that right away, as soon as.. But let´s face it, we´ll have to live with the given limits still for quite some time. With all the consequences. So it doesn´t make me wonder, that users are concerned about the code getting bigger and bigger.

        • Snapdragon flight already incorporates all that including 4k video and runs APM code.

          It's available now for developers.

          Linux Arducopter already flies too.

          Qualcomm Announces Reference Platform with High-end Performance Capabilities to Advance Consumer Dr…
          Qualcomm Incorporated (NASDAQ: QCOM) today announced that its subsidiary, Qualcomm Technologies, Inc., has introduced Qualcomm® Snapdragon Flight™, a…
          • Great! Wasn`t aware of that one! Thank you.

          • You don´t need to tell me about existing alternatives. ;-) Great stuff, very interesting for the ones really involved.

            But come on, thats HW for devs., no alternative for the majority of common users I´m talking about already getting into troubles with anything more tha an MP wiz offers..

            No noob support. No chance to spread.

            • "Yet" being the defining term.

              In order for there to be a "noob' version you first need some smart developers to make it... ;-)

              Until then keep on using PXH derivatives for the next year or so until they're released.

              But in saying that I agree there's a market niche in a sub $100 RTOS MCU and Linux CPU combo. iMX7 would do it for hardware with HD video and wifi thrown in.

        • Raspberry pi 2 i/o shield are already available and offer 1GB of ram. Not that much bigger than a pixhawk. Or use the raspberry zero with a custom shield. Tiny.

          So instead of using a lot of resources fixing the Pixhawk it wouldn`t it make more sense to get the Linux version of Ardupilot running properly? 

This reply was deleted.

Activity