Insufficient Memory for Lua-scripting on Pixracer R15

I am building a drone using a Pixracer R15 (STM32F427) and I want to calibrate the compass with the Scripted MagFit flightpath generation by Yuri_Rage but I run into problems based on insufficient memory.

I already built a custom firmware based on Copter4.4.0 with lots of features removed and only following features are activated:
AHRS_EXT, EKF3, EKF3_EXTNAV, EKF3_WINDEST, BATTERY_FUELFLOW, BATTERY_FUELLEVEL_ANALOG, AK8963, HMC5843, IST8308, LIS3MDL, MODE_BRAKE, MODE_SYSTEMID, CRASHCATCHER, FILESYSTEM_MISSION, FILESYSTEM_PARAM, FILESYSTEM_ROMFS, FILESYSTEM_SYS, UBLOX, FENCEPOINT_PROTOCOL, RALLYPOINT_PROTOCOL, TONEALARM, OSD, OSD_PARAM, ADVANCED_FAILSAFE, BARO_WIND_COMP, BOOTLOADER_FLASHING, GyroFFT, SCRIPTING, SDCARD_FORMATTING, PrecLand, RC_CRSF, RC_Protocol, RANGEFINDER, RANGEFINDER_VL53L0X, RANGEFINDER_VL53L1X, AC_AVOID, AC_OAPATHPLANNER, FENCE, RALLY, BEACON, BMP085, BMP280, BMP388, DPS280, FBM320, LPS2XH, MS56XX, RPM, RPM_ESC_TELEM, RPM_HARMONIC_NOTCH, SPL06, TEMP, CRSF, FrSky, FrSky SPort, FrSky SPort PassThrough, QUAD

Note: I just noticed that OSD and OSD_PARAM are in the list, even though I didn’t select it in the GUI.

Is it possible to remove anything else so the script can run?
Or has the STM32F427 enough memory at all?

Thank you in advance.

I’m afraid you’ll not get scripting to work on an F4 based board no matter what you disable.

Been there, done that, it didn’t work no matter what. Replaced the Flight Controller. For the price of a knock-off Pixracer you can get a much more capable FC. I still have one of those flying though.

Thank you for the answers.
I was afraid that it was impossible and that I have to switch to use scripting.

What we should look for to pick a lua scripting capable FC? It’s basically 1Mb flash FC will not work and 2Mb should work? That’s the case?

Go with an H7 based FC. Plenty of choices.

3 Likes

Wish I had seen this sooner. Been struggling all morning trying to get scripting to work on an R15. We can get the script working, but then it complains that there is no memory for terrain, and it never gets a valid position for arming.

Has anyone tried a PixRacer Pro?

It’s an H7 processor so no problem with Scripting. But a $100 board will do that.

Unfortunately I’m stuck with products made someplace other than China. Do you know of any comparable flight controllers not made in China? I play with a lot of Matek stuff for my hobby, but can’t do that for work.

…

Cube Blue

Yeah, I have some, but they are much more expensive, and much larger than a PixRacer Pro. This is in a 7" copter, and the cubes are pretty chunky for that. Do you know of any other NDAA compliant, Ardu-friendly autopilots.

Looking at the specs for the R15 and the Pro, is seems that both have 2MB of FRAM, but the R15 only has 256 kB of RAM, whereas the Pro has 1024 kB of RAM. I guess that’s the kicker.

I don’t. You may try asking that on the Discord channel.

Doesn’t mRo manufacture in CA? Not sure if they are compliant, but they are US based.

You can upgrade to the Pix racer pro one of the best.

I have a bunch of them…You don’t need to do much tuning if any to get them to fly nice. Downside is $$$ and no OSD.

Just started configuring one. Oddly, it shows up in MP with 2 different com ports, and I can connect to either. Is this normal? I’ve never seen this with any other autopilots I’ve used.

Yes, this is normal on F7/H7 FCs that have CAN bus. The COM port with the lower number should be marked as “ArduPilot MAVLink”, the other one should be marked as “ArduPilot SLCAN”, similar to this:

image

Both can be used to connect to your FC.
The SLCAN port usually is used to configure UAVCAN devices.

More on that here: Connect Mission Planner to AutoPilot — Copter documentation

Thanks. My PC isn’t labeling them like that. I just get "USB Serial Device (Com##) for each, but perhaps that varies on other PCs.

Actually, looking through the link, I loaded a parameter file from an old PixRacer R15 (F4 chip), so perhaps that’s part of it. I don’t have any immediate plans for any CAN hardware.

The mRo Pixracer Pro is Made in the US and will support scripting.