Hi,
due to the very limited RAM on some NG platforms (LPC17 & STM32) and due to ongoing support for all platforms decision was made to parse the script file from the SD card on each call of a script section.
I am completely aware that in particular on the LPC17 and the STM32 platform loading the ngr into RAM is not feasible as the RAM is simply not sufficient. On the STM32F4 however it could be done if the event definitions of both ngc and ngr would fit in.
What I propose is a flag in the ngc file:
pre_load_ngr 0/1
which gets placed at the beginning of the ngc file. When the parser gets to the point of the flag it would then analyse the necessary size of ngc + ngr event definitions. If the RAM size of the core is insufficient it ignores the flag and proceeds as normal with parsing the script from the SD card on each call. If the RAM size is sufficient it stores the script in RAM (either bare string which gets parsed on each call or already in a parsed and more machine friendly form) and calls it from there on each section call.
What do I hope to achieve with this: It’s a neater solution compared to parsing the file from disk every time. More importantly though: I hope to achieve higher long term reliability. I execute safety critical code as part of my script (safety critical for the equipment) and if the SD card would give up while the core is still running I get a good go at frying my stuff.
Without having spent any time on the source code I’m not really able assess how feasible my suggestion is, so apologies if I just made a preposterously difficult proposal ![]()
BR Mathis