diff --git a/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_start.s b/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_start.s index 039093e..725f937 100644 --- a/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_start.s +++ b/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_start.s @@ -11,7 +11,7 @@ .file "phy6222_start.s" /* *.ld: g_top_irqstack = ORIGIN(sram) + LENGTH(sram) */ - .global g_top_irqstack + .global g_stack .text .align 2 @@ -21,14 +21,14 @@ .type __start, %function __start: - ldr r1, = g_top_irqstack + ldr r1, = g_irqstack_top msr msp, r1 /* r2>>sp */ bl c_start /* R0=IRQ, R1=register save area on stack */ .size __start, .-__start - +#if 0 // Implemented in phy6222_vectors.c .section .isr_vector .align 4 .globl __Vectors @@ -38,7 +38,17 @@ __Vectors: .long __start .size __Vectors, . - __Vectors +#endif +.section .irq_stack + + .align 4 + .global g_irqstack_base + .global g_irqstack_top + +g_irqstack_base: + .space 0x400 +g_irqstack_top: .end diff --git a/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_vectors.c b/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_vectors.c index 5c328cc..cd06fa6 100644 --- a/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_vectors.c +++ b/bthome_phy6222/SDK/misc/CMSIS/device/phyplus/phy6222_vectors.c @@ -1,15 +1,13 @@ #define locate_data(n) __attribute__ ((section(n))) -extern unsigned int g_top_irqstack; +extern unsigned int g_irqstack_top; extern void __start(void); const unsigned _vectors[] locate_data(".isr_vector") = { /* Initial stack */ - - (unsigned)(&g_top_irqstack), + (unsigned)(&g_irqstack_top), /* Reset exception handler */ - - (unsigned)& __start, + (unsigned)(&__start), };