LUA Scripting /SCR Enable Crashing SequreH743 FC

Hello, I’m trying to run a lua script on the sequreH743 FC. I’m able to run the custom firmware with a lua file in ardupilot/ROMFS_custom/scripts but turning on scr_enable = 1 sends it into an infinite crashing loop where i need to reinstall default ardupilot software to fix. Any suggestions?

That sounds bad. Can you read the file out of ROMFS with MAVFTP before enabling scripting?

Scripting isn’t compiled into this board so you won’t be able to run it.

Why isn’t scripting compiled into the board? Its running the H743 with 2mb and the features.txt file says it supports scripting. Any way I can enable it?

Well you need a filesystem and since it doesn’t have an sdcard you will have to use littlefs which is only in 4.7. Also the flash it does have is small and slow so you would need to update the hwdef to support littlefs - either way you are on your own.

1 Like

Hi Andy,
I was also trying the same thing but in CubeOrangePlus board and I am also running into the same issue.The board will be rebooting on its own if we enable SCR_ENABLE and if i flash the same firmware by disabling the param SCR_ENABLE everything works perfectly fine.
I also have an sdcard inserted,but i want to try including the lua scripts in ROMFS so could you please help.

Thanks

What is the advantage of using ROMFS instead of an SD card, if your hardware supported it? SD card does not require a rebuild of Arducopter FW, drag and drop the *.lua file.

ArduPilot allows for Lua scripts to be included in the Read-Only Memory File System (ROMFS) of the firmware build, particularly useful for hardware without an SD card slot or for embedding essential scripts directly into the autopilot’s memory.

  • Build the ArduPilot firmware:
    When you build the ArduPilot firmware, the contents of ROMFS_custom, including your Lua scripts, will be incorporated into the ROMFS of the resulting .apj file.
1 Like