2017-01-11 02:32 AM
Hi,
I'm working with a stm32f437VI. I need more heap memory. I changed the Heap size in de startup_stm32f427x.s (Heap_Size EQU 0x00000200), but when I did a malloc and worked with the variable, and exception error happen. I don't know if this is the way to increase the heap memory, or exsist other way.
Thanks in advance,
2017-01-11 04:14 AM
Hi
Ricart.Carles
,Could you please indicate the heap_size value you need to use.
Khouloud.
2017-01-12 01:31 AM
Hi,
I need to work with a 4kbytes .
carles.
2017-01-13 10:22 AM
Hi
Ricart.Carles
,Hi I need more information for further investigation:
I did a malloc and worked with the variable, and exception error happen.
Could you please give as more details about the encountered error.
2. What IDE are you using?
Khouloud.
2017-01-16 01:22 AM
Hi,
I'm working with keil5.
The error is a 'HardFault_Handler'.
When I increase the heap size in the way that I told you before, the compiler accepts the malloc. If I don't increase the memory, the compiler give me an error becouse the heap size is small than the memory allocated. This part looks fine, but when I work with the memory allocated, the exception error occurs. If I work with a small memory allocated (less than ->
Heap_Size EQU 0x00000200)
, the program works.But when I increase the allocated memory and increase the heap_size, the programs doesn't works.carles.
2017-01-17 07:22 AM
Hi
Ricart.Carles
,I do not see any issue that could cause this encountered hard fault.
Please share your code in order
toreproduce your case and
to identify what is going wrong.Khouloud.
2017-01-17 09:05 AM
Simple question, what address does malloc() give you? How are you then accessing the memory? Are you casting to a structure pointer?
Show the specific code that is faulting. Ideally use a proper Hard Fault Handler instead of a while() loop
Present the problem in a fashion that can be solved, 'doesn't work' really doesn't help diagnose what is actually wrong.
2017-02-09 08:50 AM
This was resolved how?