mumblecake Posted February 2, 2015 Report Posted February 2, 2015 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 Quote
TK. Posted February 2, 2015 Report Posted February 2, 2015 Some time ago I also spent some thought on this - at least it's feasible, the topic is on my agenda :) It requires that the .NGR parser transforms the commands into byte code. With this kind of compression huge scripts could be processed with very high speed. Do I understand you correctly that you would like to implement this? :) Best Regards, Thorsten. Quote
mumblecake Posted February 3, 2015 Author Report Posted February 3, 2015 Once I'm done with the physical build of my organ I will have a look at the source code. I was looking for an interesting project to brush up my text based coding skills (job wise I'm only doing Mickey Mouse coding aka LabVIEW ;)). Don't expect any results within the next 2-3 months though. Quote
TK. Posted February 9, 2015 Report Posted February 9, 2015 Probably I will be able to provide my solution earlier :-) Best Regards, Thorsten. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.