8000 py/asmthumb: Use existing macro to properly clear the D-cache. · russbot/circuitpython@f9ecaa1 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit f9ecaa1

Browse files
committed
py/asmthumb: Use existing macro to properly clear the D-cache.
This macro is provided by stmhal/mphalport.h and makes sure the addr and size arguments are correctly aligned.
1 parent 64a3c52 commit f9ecaa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

py/asmthumb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
// wrapper around everything in this file
3434
#if MICROPY_EMIT_THUMB || MICROPY_EMIT_INLINE_THUMB
3535

36+
#include "py/mphal.h"
3637
#include "py/asmthumb.h"
3738

3839
#define UNSIGNED_FIT8(x) (((x) & 0xffffff00) == 0)
@@ -53,7 +54,7 @@ void asm_thumb_end_pass(asm_thumb_t *as) {
5354
#if defined(MCU_SERIES_F7)
5455
if (as->base.pass == MP_ASM_PASS_EMIT) {
5556
// flush D-cache, so the code emitted is stored in memory
56-
SCB_CleanDCache_by_Addr((uint32_t*)as->base.code_base, as->base.code_size);
57+
MP_HAL_CLEAN_DCACHE(as->base.code_base, as->base.code_size);
5758
// invalidate I-cache
5859
SCB_InvalidateICache();
5960
}

0 commit comments

Comments
 (0)
0