zauberzeug / lizard

Domain-specific language to specify behaviour of microcontroller managed hardware
MIT License
15 stars 5 forks source link

Long lizard config can't be applied #32

Closed rodja closed 8 months ago

rodja commented 8 months ago

When trying to install a long configuration, the ESP32 reboots before the new config can be saved. Maybe similar to https://github.com/zauberzeug/lizard/issues/23.

falkoschindler commented 8 months ago

Configuring the following startup script works well:

let stop do
end
estop1 = Input(34)
estop2 = Input(35)
core.heap
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end
when estop1.level == 0 or estop2.level == 0 then stop(); end;
when estop1.level == 0 or estop2.level == 0 then stop(); end;
when estop1.level == 0 or estop2.level == 0 then stop(); end;
when estop1.level == 0 or estop2.level == 0 then stop(); end;
en = Output(15)
v24 = Output(12)
en.on()
v24.on()

Adding one more short line (like another "when...") fails.

falkoschindler commented 8 months ago

The startup script seems to have reached a size limit of around 4000 bytes. We fixed the problem by storing it in chunks.