2012-01-06 06:31 AM
Hi,
I have stm32f103rb6 chip. Im trying to implement PolarSSL Crypto Library. But when i try to use library functions, this error occurs ''The stack pointer for stack 'CSTACK' (currently 0x1FFF7E60) is outside the stack range (0x20000758 to 0x20000F58) ''.Iam not sure but I think this is a stack owerflow problem. Can i solve this problem by using FreeRTOS. Is anyone has a advice?Thanks. #freertos #stack-problem #stack #stm322012-01-06 07:00 AM
It looks like you have a 2048 byte stack. You are using >32KB
Just how much memory do you need for this library, and how much space are you using with local/automatic variables? If you don't know how much you are using you'll need to examine your code, as there is insufficient detail in your post to make a diagnosis.2012-08-22 04:14 AM
2012-08-22 09:44 AM
I'm not sure why this wasn't started as a new thread?
It's probably complaining about the stack because it's looking at the constraints of one piece of code, but using the settings from another. If you have stack-checking on this might complicate IAP code. Perhaps review the .MAP files to confirm linker placement for each. There's no objects attached for review. You'd need to step into the code, and perhaps have a proper Hard Fault handler to identify why/where the code is failing. You should check to see what System_Init() is doing in the secondary code, as setting up clocks/plls assuming reset conditions is problematic. Check that the vector table is correctly assigned to the new address. Please use complete English words, you are not texting, ST does not charge by the character.2012-08-23 01:37 AM
Hi,
PolarSSL stack has been ported on STM32F2 and STM32F4 devices, have a look at the following Application notes: AN3365 for STM32F2 and AN3967 for STM32F4 . Just you need to know the amount of memory used by the stack, and how much space are available in STM32F103. If the memory used by the stack exceeds the memory available in STM32F103, in this case you can use a part of stack like some crypto algorithms.