mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-12 23:48:10 -07:00
Merge branch 'DarkFlippers:dev' into 420
This commit is contained in:
+14
-1
@@ -24,7 +24,8 @@ PLACE_IN_SECTION("MB_MEM2") uint32_t __furi_check_registers[12] = {0};
|
||||
: \
|
||||
: "memory");
|
||||
|
||||
// Restore registers and halt MCU
|
||||
#ifdef FURI_DEBUG
|
||||
// Restore registers and halt MCU with bkpt mcu debug state
|
||||
#define RESTORE_REGISTERS_AND_HALT_MCU() \
|
||||
asm volatile("ldr r12, =__furi_check_registers \n" \
|
||||
"ldm r12, {r0-r11} \n" \
|
||||
@@ -35,6 +36,18 @@ PLACE_IN_SECTION("MB_MEM2") uint32_t __furi_check_registers[12] = {0};
|
||||
: \
|
||||
: \
|
||||
: "memory");
|
||||
#else
|
||||
// Restore registers and halt MCU for release builds without bkpt instruction
|
||||
#define RESTORE_REGISTERS_AND_HALT_MCU() \
|
||||
asm volatile("ldr r12, =__furi_check_registers \n" \
|
||||
"ldm r12, {r0-r11} \n" \
|
||||
"loop%=: \n" \
|
||||
"wfi \n" \
|
||||
"b loop%= \n" \
|
||||
: \
|
||||
: \
|
||||
: "memory");
|
||||
#endif
|
||||
|
||||
extern size_t xPortGetTotalHeapSize(void);
|
||||
extern size_t xPortGetFreeHeapSize(void);
|
||||
|
||||
Reference in New Issue
Block a user