Repository navigation
Conversation
A heap's name is now the list of its tags (dmheap): DMBOOT_DMA_HEAP_TAGS and
DMBOOT_MAIN_HEAP_TAGS name the DMA and the main heap ("dma", "main" by
default). The STM32F746's DMA heap - the DTCM, never cached, no wait states -
is "dma,fast,dtcm": drivers still find it as "dma", and modules asking for
"fast" memory (Dmod_MallocTagged) get it - dmmp3's decoder state took 70 %
of the CPU in the SDRAM, 15 % there.
The STM32F746G Discovery's flash modules get the decoders of carhmi's album
covers (dmimg_jpeg, dmimg_png): loaded by name, not in carhmi's .dmd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DMBOOT_DMA_HEAP_TAGS/DMBOOT_MAIN_HEAP_TAGSname the DMA and the main heap -"dma","main"by default, as before."dma,fast,dtcm"(configs/mcu/STM32F746xG.cmake,STM32F746ZG.cmake): drivers still find it as"dma"(dmheap_get_context_by_name()matches a tag), and modules asking for fast memory (Dmod_MallocTagged("fast", ...)) get it.dmimg_jpeganddmimg_png: the decoders of carhmi's album covers, which dmimg loads by name (not in carhmi's.dmd).Why
Every module's allocation lands in the SDRAM - the newest default heap - behind a 4 kB data cache. Measured on the board while carhmi-demo plays an MP3 (debugger sampling the PC):
"fast")Before merging - draft
This needs, in this order:
Dmod_MallocTagged) and Heaps tagged by their names, memory of a kind dmheap#22 (tags) merged, and the submoduleslib/dmod,lib/dmheapbumped here. Without the dmheap bump the olddmheap_get_context_by_name("dma")would not find a heap named"dma,fast,dtcm"and the DMA drivers would lose their heap - so not before.Tested on the board with those built locally: the DTCM heap named
dma,fast,dtcm; dmeth, dmsai, dmsdio, dmuart allocate in it as before; dmmp3's state there (memory -m -H fast); the SD card, the audio and the display work. Ethernet: the link is up and frames come in, but DHCP got no address - as all day on this board before this change too (the clock showed--:--), so not checked further.🤖 Generated with Claude Code