mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 11:06:30 -04:00
added flash utility
This commit is contained in:
parent
8840a6e894
commit
f5d4fce945
14 changed files with 605 additions and 4 deletions
|
@ -36,6 +36,7 @@ inline uint32_t get_free_stack_space(){
|
|||
return stack_space_left;
|
||||
}
|
||||
|
||||
/* Executes a breakpoint only when a debugger is attached. */
|
||||
#define HALT_IF_DEBUGGING() \
|
||||
do { \
|
||||
if ((*(volatile uint32_t *)0xE000EDF0) & (1 << 0)) { \
|
||||
|
@ -43,4 +44,9 @@ inline uint32_t get_free_stack_space(){
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
/* Stops execution until a debugger is attached. */
|
||||
#define HALT_UNTIL_DEBUGGING() \
|
||||
while (!((*(volatile uint32_t *)0xE000EDF0) & (1 << 0))) {} \
|
||||
__asm__ __volatile__("bkpt 1")
|
||||
|
||||
#endif/*__DEBUG_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue