I'm discovering the joys of the STM32F7 dcache at the moment. For best performance I've setup all normal memory (including data, bss and primary heap) in SRAM so it benefits from the cache, and use a malloc_dma() method to allocate from a heap in DTCM.
One thing I've found very annoying is that gdb on openocd doesn't see into the dcache. It took me ages to work out why ch.dbg.panic_reason was always zero after a chSysHalt() - it was because it was cached. I've fixed that by doing:
dmaBufferFlush(0x20020000, 0x60000);
in chSysHalt(), but I'm wondering if anyone has a more elegant solution? Can openocd be taught to snoop the dcache?
I'm using a STM32F765 if it matters.
Cheers, Tridge
gdb and STM32F7 dcache
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 54 guests