EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Problem with task stack in FreeRTOS

Started by CRISTAFOL October 18, 2007
Hello, sorry I am new in ARM
I use:
Olimex LPC2214
IAR Embedded Workbench Kickstart for ARM 5.10
FreeRTOS v4.4.0
Link with heap-3.c
Debug with Olimex Wiggler

I have CSTACK in [0x40000000 .. 0x40001000]
and the HEAP in [0x40001000 .. 0x40003000]

In the call to the function vPortStartFirstTask() I have this error:
"The stack pointer for stack 'CSTACK' (currently 0x400011EC) is outside
the stack range (0x40000000 to 0x40001000)"

FreeRTOS creates the task stack in the memory HEAP, and SP is limited to
[0x40000000 .. 0x40001000]
I dont see the solution.
Any suggestions?

Thanks
Cristal Bell




An Engineer's Guide to the LPC2100 Series

> -----Original Message-----
> From: l...
> [mailto:l...] On Behalf Of CRISTAFOL
> Sent: 17 October 2007 22:50
> To: l...
> Subject: [lpc2000] Problem with task stack in FreeRTOS
>
> Hello, sorry I am new in ARM
> I use:
> Olimex LPC2214
> IAR Embedded Workbench Kickstart for ARM 5.10
> FreeRTOS v4.4.0
> Link with heap-3.c
> Debug with Olimex Wiggler
>
> I have CSTACK in [0x40000000 .. 0x40001000]
> and the HEAP in [0x40001000 .. 0x40003000]
>
> In the call to the function vPortStartFirstTask() I have this error:
> "The stack pointer for stack 'CSTACK' (currently 0x400011EC)
> is outside
> the stack range (0x40000000 to 0x40001000)"
>
> FreeRTOS creates the task stack in the memory HEAP, and SP is
> limited to
> [0x40000000 .. 0x40001000]
> I dont see the solution.
> Any suggestions?
>
> Thanks
> Cristal Bell
>

Hi,

I'm surprised you got that far using V5.x. Currently all the projects are
setup for V4.x. There was a new V4.x version that was released at the same
time as their first V5.x project. I didn't use V5.x because it does not yet
support the Cortex M3, which is presumably the same reason they released a
new 4.x version too. When Cortex-M3 is supported then I will switch to use
V5.x for everything.

I don't know if it would help or not, but you could try using heap_2.c, and
setting the heap to zero in the linker script.
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.



> If it helps I have a recent IAR 5x port of FreeRTOS. It's for LPC2148
> but it may give you some ideas. Let me know and I'll bundle it up.
>
I would appreciate a copy of that myself. It might save me some time
porting over the V4.x projects. Can you send it to me on r _dot_ barry [at]
freertos.org. Thanks!

Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.



FreeRTOS.org Info wrote:
>> If it helps I have a recent IAR 5x port of FreeRTOS. It's for LPC2148
>> but it may give you some ideas. Let me know and I'll bundle it up.
>>
>>
> I would appreciate a copy of that myself. It might save me some time
> porting over the V4.x projects. Can you send it to me on r _dot_ barry [at]
> freertos.org. Thanks!
>

It's located here:
http://www.indyelectronics.com/freertos45.lpc2148.iar5.zip

Extract it over the FreeRTOSV4.5.0 folder.

Project is located:
FreeRTOSV4.5.0/FreeRTOS/Demo/ARM7_LPC2148_IAR5

Joel Winarske
CRISTAFOL wrote:
> Hello, sorry I am new in ARM
> I use:
> Olimex LPC2214
> IAR Embedded Workbench Kickstart for ARM 5.10
> FreeRTOS v4.4.0
> Link with heap-3.c
> Debug with Olimex Wiggler
>
> I have CSTACK in [0x40000000 .. 0x40001000]
> and the HEAP in [0x40001000 .. 0x40003000]
>
> In the call to the function vPortStartFirstTask() I have this error:
> "The stack pointer for stack 'CSTACK' (currently 0x400011EC) is outside
> the stack range (0x40000000 to 0x40001000)"
>
> FreeRTOS creates the task stack in the memory HEAP, and SP is limited to
> [0x40000000 .. 0x40001000]
> I dont see the solution.
> Any suggestions?
>
If it helps I have a recent IAR 5x port of FreeRTOS. It's for LPC2148
but it may give you some ideas. Let me know and I'll bundle it up.
Joel
> It's located here:
> http://www.indyelectronics.com/freertos45.lpc2148.iar5.zip
>
>
Got it, thanks.
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.




The 2024 Embedded Online Conference