2022-08-10 04:43 AM
STM32F469NI controller and IDE System workbench version 4.5.2 MCU with 2MB flash and 320kb RAM are used. for LCD ST emWin graphic library with GUI interface we using.
The problem is that we are updated new touch driver code. The touch is detected, but if we go to another screen, the structure does not change, and the controller code is running touch irq pin detecting when we touch. So we assumed it was a stack issue, so we removed two variables and everything was fine.
Could you please tell me how to resolve the problem and if there is a tool for memory optimization?
how to find how much memory stack and heap size?
THe code details:
section size addr
.isr_vector 436 134217728
.text 257092 134218176
.rodata 192716 134475268
.init_array 4 134667984
.fini_array 4 134667988
.data 3296 536870912
.ccmram 0 268435456
.bss 197008 536874208
._user_heap_stack 1536 537071216
.ARM.attributes 46 0
.debug_info 863228 0
.debug_abbrev 46865 0
.debug_aranges 9832 0
.debug_ranges 8944 0
.debug_macro 117622 0
.debug_line 283470 0
.debug_str 769386 0
.comment 257 0
.debug_frame 43260 0
.stabstr 223 0
Total 2795225
2022-08-10 05:53 AM
few points:
hth
KnarfB
2022-08-10 06:00 AM
Variables from interrupts, make sure they are volatile.
Sure basic methods like filling the stack space with a pattern to find the low water mark could be employed.
Basic understanding of MCU operation, stacks and heaps, would also be helpful.