Merge branch 'DarkFlippers:dev' into 420

This commit is contained in:
RogueMaster
2022-10-29 14:28:20 -04:00
committed by GitHub
+14 -1
View File
@@ -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);