Merge branch 'bugfix/bootloader_stack' into 'master'

bootloader: Check if DRAM segments are going to collide with stack



See merge request !330
This commit is contained in:
Angus Gratton
2016-12-22 12:15:18 +08:00
2 changed files with 40 additions and 3 deletions
+10
View File
@@ -26,6 +26,16 @@
#define WSR(reg, newval) asm volatile ("wsr %0, " #reg : : "r" (newval));
#define XSR(reg, swapval) asm volatile ("xsr %0, " #reg : "+r" (swapval));
/** @brief Read current stack pointer address
*
*/
static inline void *get_sp()
{
void *sp;
asm volatile ("mov %0, sp;" : "=r" (sp));
return sp;
}
/* Return true if the CPU is in an interrupt context
(PS.UM == 0)
*/