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.

2 Likes