Heap size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-11 2: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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-11 4:14 AM
Hi
Ricart.Carles
,Could you please indicate the heap_size value you need to use.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-12 1:31 AM
Hi,
I need to work with a 4kbytes .
carles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-16 1: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-17 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-17 9: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-09 8:50 AM
This was resolved how?
Up vote any posts that you find helpful, it shows what's working..
