Hi!
I am working on lpc1837 based project, in which I have a bootloader that should load a firmware image.
The firmware works with RTX kernel and bootloader doesn't. I had compiled firmware with base address as 0x1a020020 (0x20 bytes from 0x1a020000 used by firmware header info). And I had given the same for bootloader to branch and execute firmware. But this requires that I should handle stack and heap sizes in startup files which I couldn't understand well.
Can anyone help me how to get this?
Thanks in advance. ChetaN
Thanks Pier.
I actually wanted to know about the stack size for the tasks created in firmware, because size of stack for task is what posing a problem in my case,rest of it is okay from the beginning. I mean the total application is working well.
The thing is that I have added much code in the tasks which, as far I could understand, need more stack size. But I couldn't get how much this size should be in these tasks. I can't try just by going on increasing stack size. This was my actual problem. And regarding previous doubts, they're well cleared by Thorsten.
I'd be thankful if you could suggest any method for this stack size.
Hi,
afaik there is no "magic weappon" finding the proper stack size as investigating your code. Our RTX does a stack check, it looks if the magic word it writes to the stack ends has been overwritten.
You know, that in RTX you can set the generic stack size, but you can also create tasks with a user defined RAM area as stack?
A good method would be that you manually fill your RAM with a pattern you can identify, and let your program run for a while. Then stop and read all the memory (you must find the task stacks, that can be a bit more tricky ...). After that you can see how much stack each task needs...
If you have no recursive function calls, it should be possible that you calculate the worst case stack through your function calls.
Thanks again!
I'll try this.