ktownsend wrote on Tuesday, October 06, 2009:
I’ve been trying to squeeze FreeRTOS onto an LPC2103 (8KB SRam and 32KB Flash) and am able to get it working with the following config setting:
configTOTAL_HEAP_SIZE = 4 * 1024
Which I think should be enough for the kind of basic tasks I’m doing (reading an LM75, etc.), but I don’t have enough experience with FreeRTOS to say for sure. I also adjusted the size of the heap/stack for the LPC2103 to try to claw back a bit of memory. I was wondering if anyone would be able to guess (from their experience) if the following settings are likely to cause a problem with FreeRTOS or if I should be adjusting them up or down:
- Heap Size: 1024 Bytes
- Abort Mode Stack: 4 Bytes
- FIQ Stack: 32 Bytes
- IRQ Stack: 256 Bytes
- Supervisor Stack: 256 Bytes
- Undefined Stack: 4 Bytes
- User/System Stack: 0 Bytes
- .
Since FreeRTOS runs in supervisor mode I’m assuming I don’t really need the User/System stack space, but I’m not completely sure.
In any case, with the settings above FreeRTOS at least runs and uses:
- **19,732 Bytes Flash** (12.7KB Free)
- **5,868 SRAM** (2.2 KB Free)
If anyone can suggest something to improve on this or let me know if I’m doing something dangerous, I’d certainly be glad to hear it now rather than 3 months down the road.