Yes, I am sure that these parameters are correct. Unfortunately I couldn't check the stack size today - I have to do that the next day.
Next thing that seems odd is that I can't initialize chars like :char temp[10]=''hello''; as local variables in any function like main etc. I get an HardFaultException in that case. I can however declare the variable like: char temp[10]; locally.
what tools are you using e.g compiler, IDE, debugger etc? Check that your not running out of stack space i.e. increase the stack size and seeif the problem goes away.
I am experiencing some problems with my cortex m3. Every time I want to use any string operation like strcpy, strcmp or memcpy my Programm jumps into the HardFaultException. Is there something that I am overlooking? Everything else works so far. Meaning communication over UART with Interrupts running quite fine for instance... I have to admit, I am somewhat unexperienced with ARM Controllers. Would be great if somebody can help. [ This message was edited by: intrinsor on 18-06-2008 15:56 ]
about strings usage with IAR , Here is attached the patch. It is clearly linked to the Compiler librairies, so I presume that in GNU codesourcery has the same case may be. Hope this helps you :) Cheers, STOne-32.
We've all used ''string handling'' functions for years with simpler micros of the past. Understand your need and frustration.
Wonder if STM V2.0 fw may be ''too new'' for codesourcery? The abundance of tools is not always our friend... Perhaps you could try V1 and see if fault continues. If your problem persists I'll run several string handlers under IAR and confirm that it works. Sometimes we can glean a hint from other's success.
On 19-06-2008 at 00:28, Anonymous wrote: Next thing that seems odd is that I can't initialize chars like :char temp[10]=''hello''; as local variables in any function like main etc. I get an HardFaultException in that case. I can however declare the variable like: char temp[10]; locally. To initialize a variable like this, the compiler places a memcpy() to copy the read only data (''hello'') into the local variable that is on the stack.