-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Heap init code improvements and updates #8458
Conversation
Moved secondary heap init code to flash. External -24 IRAM, +32 IROM IRAM -76 IRAM, +64 IROM General updates to umm_init call path and DEFINES to better align with upstream. Name changes: UMM_INIT_HEAP with UMM_CHECK_INITIALIZED, umm_init_stage_2 with _umm_init_heap, and umm_init_common with umm_init_heap. Add file umm_cfgport.h to hold port-specific values. Stay focused on heap initialization only move-related defines. Improved comments. Created a wrapper function for running pre-SDK code from flash. Updated hwdt_app_entry to use it. Update umm_init with option to run from ICACHE. Added build define UMM_INIT_USE_ICACHE to move umm_init call path to flash. When used frees up 160 bytes of IRAM at a cost of 208 bytes of IROM Defaults to no change, umm_init call path will be in IRAM.
Would it be more efficient to change default settings ? Other than that, LGTM and thanks ! |
@d-a-v I was being over-cautious. The experience we have with using switching cache on and off before the SDK initializes is with HWDT Stack Dump, which for me has worked fine without issue. I don't know how often it gets used. I also used it in one of the methods in my "ideas for config erase" PR. So I played it safe and left it as an option to turn on. Hmm, if we have a while before the next dot release and you guys feel comfortable with the change, I could switch the default around? |
We think it is OK to go this way ! |
…to UMM_INIT_USE_IRAM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Moved secondary heap init code to flash.
General updates to
umm_init
call path and defines to better align with upstream. Name changes:UMM_INIT_HEAP
withUMM_CHECK_INITIALIZED
,umm_init_stage_2
with_umm_init_heap
, andumm_init_common
withumm_init_heap
.Add file
umm_cfgport
.h to hold port-specific values. Stay focused on heap initialization only move-related defines.Improved comments.
Created a wrapper function for running pre-SDK code from flash.
Updated
hwdt_app_entry
to use it.Update
umm_init
with the option to run from ICACHE.Added build defineUMM_INIT_USE_ICACHE
to moveumm_init
call path to flash.Added build define
UMM_INIT_USE_IRAM
to moveumm_init
call path back to IRAM.Using ICACHE frees up 160 bytes of IRAM at a cost of 208 bytes of IROM.
Defaults to no change,umm_init
call path will be in IRAM.Defaults with
umm_init
call path in ICACHE.