for (;;) {
}
}
+
+__attribute__ ((noreturn))
+void
+jump_to_application (volatile uint32_t *address)
+{
+ volatile uint32_t *vtor = (uint32_t *) 0xe000ed08;
+ *vtor = (uint32_t) address;
+
+ asm volatile ("" ::: "memory");
+ asm volatile ("msr msp, %0" :: "r" (*(address + 0)) : "sp");
+ asm volatile ("bx %0" :: "r" (*(address + 1)));
+
+ for (;;) {
+ }
+}