diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-07 09:57:26 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-07 09:59:13 +0900 |
commit | 35426d7715ed548c043678f068ca881f51ecf592 (patch) | |
tree | 722add647e4a24146b23acb190bc9b811028b776 /entry.c | |
parent | 6db2dd96c55e947bd3cca66d5f647157367825f9 (diff) |
Fix MSP initial value and improve chx_sched
Diffstat (limited to 'entry.c')
-rw-r--r-- | entry.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,7 +1,8 @@ /* * entry.c - Entry routine when reset and interrupt vectors. * - * Copyright (C) 2013, 2014, 2015 Flying Stone Technology + * Copyright (C) 2013, 2014, 2015, 2016 + * Flying Stone Technology * Author: NIIBE Yutaka <gniibe@fsij.org> * * This file is a part of Chopstx, a thread library for embedded. @@ -93,7 +94,8 @@ uint32_t vectors_in_ram[48]; * This routine only changes PSP and not MSP. */ STATIC_ENTRY __attribute__ ((naked,section(".text.startup.0"))) -void entry (void) +void +entry (void) { asm volatile ("bl clock_init\n\t" /* Clear BSS section. */ @@ -157,7 +159,7 @@ void entry (void) typedef void (*handler)(void); handler vector_table[] __attribute__ ((section(".startup.vectors"))) = { - (handler)&__main_stack_end__, + (handler)(&__main_stack_end__ - 32), entry, nmi, /* nmi */ hard_fault, /* hard fault */ |