diff --git a/components/ulp/ld/esp32s2.ulp.riscv.ld b/components/ulp/ld/esp32s2.ulp.riscv.ld index 983481df29..a0733bff7f 100644 --- a/components/ulp/ld/esp32s2.ulp.riscv.ld +++ b/components/ulp/ld/esp32s2.ulp.riscv.ld @@ -12,6 +12,7 @@ SECTIONS . = ORIGIN(ram); .text : { + *start.S.obj(.text.vectors) /* Default reset vector must link to offset 0x0 */ *(.text) *(.text*) } >ram diff --git a/components/ulp/ulp_riscv/start.S b/components/ulp/ulp_riscv/start.S index 1da9b755b0..949fd7fb48 100644 --- a/components/ulp/ulp_riscv/start.S +++ b/components/ulp/ulp_riscv/start.S @@ -1,4 +1,4 @@ - .section .text + .section .text.vectors .global irq_vector .global reset_vector @@ -11,6 +11,8 @@ reset_vector: irq_vector: ret + .section .text + __start: /* setup the stack pointer */ la sp, __stack_top