My problem is that I have a banch of tasks, they are creating each other and works fine as I expected. They are small and simple. But some of them needs to use RFID driver which immidietly increases heap size more than 2k! Basicaly, only one existing task can execute RFID related functions. Why should we copy the content of function to the RAM all the time. Why we can’t just keep it in flash? I do not have enought memory for that. The sequence works like that - one task creates another and immidietly delete themselve and release the memory. But before it is done, it still needs 2k of ram for new task which is also using have RFID driver requests. The way to optimise that is to create independent task for RFID driver and perform communication between tasks with messages of notifications. But it is a bit dirty - driver needs to use some handlers, which is a bit complicated to configure outside. So, in summary, I need to understand, if we do not require to have a multiple instance of one task, can we keep it in flash and not copy to ram?
Thanks in advance,