diff --git a/ChangeLog b/ChangeLog index af6977f..b438544 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2019-04-12 NIIBE Yutaka + + * entry.c [__ARM_ARCH_7EM__] (entry): Fix for Cortex-M4. + 2019-04-11 NIIBE Yutaka * chopstx-cortex-m.c: Support Cortex-M4 (not touching FPU). diff --git a/entry.c b/entry.c index 4547d54..8377972 100644 --- a/entry.c +++ b/entry.c @@ -73,7 +73,7 @@ main (int argc, const char *argv[]) #endif extern uint8_t __main_stack_end__; -#if defined(__ARM_ARCH_7M__) +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) extern void svc (void); #endif extern void preempt (void); @@ -169,7 +169,7 @@ entry (void) "bl chx_systick_init\n\t" "bl gpio_init\n\t" /* Enable interrupts. */ -#if defined(__ARM_ARCH_7M__) +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) "mov r0, #0\n\t" "msr BASEPRI, r0\n\t" #endif @@ -199,7 +199,7 @@ handler vector_table[] __attribute__ ((section(".startup.vectors"))) = { none, none, none, /* reserved */ #if defined(__ARM_ARCH_6M__) none, /* SVCall */ -#elif defined(__ARM_ARCH_7M__) +#elif defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) svc, /* SVCall */ #endif none, /* Debug */ diff --git a/example-led/Makefile b/example-led/Makefile index 66d311d..2e9af44 100644 --- a/example-led/Makefile +++ b/example-led/Makefile @@ -26,9 +26,9 @@ OBJCOPY = $(CROSS)objcopy ### MCU = cortex-m3 ### MCU = cortex-m0 -MCU = cortex-m3 +MCU = cortex-m4 CWARN = -Wall -Wextra -Wstrict-prototypes -DEFS = -DUSE_SYS3 -DFREE_STANDING -DMHZ=48 +DEFS = -DUSE_SYS3 -DFREE_STANDING -DMHZ=80 ### DEFS = -DFREE_STANDING -DUSE_SYS3 -DBUSY_LOOP -DCHX_FLAGS_MAIN=CHOPSTX_SCHED_RR OPT = -O3 -Os -g LIBS =