diff --git a/readme.md b/readme.md index e15826f2f..750291152 100644 --- a/readme.md +++ b/readme.md @@ -403,15 +403,17 @@ features a bare-metal startup _without_ using any of the SDK. The bare-metal startup was taken from the work of [Chalandi/Baremetal_esp32s3_nosdk](https://github.com/Chalandi/Baremetal_esp32s3_nosdk). The multicore system first boots core0 which subsequently -starts up core1 and also starts up the RISCV coprocessor core. +starts up core1 and also starts up the RISC-V-ULP coprocessor core. Blinky runs in the standard `ref_app` on core0 toggling `port7` while an endless timer loop on core1 toggles `port6`. These LED ports togle in near unison at the normal blinky feequency of $\frac{1}{2}~\text{Hz}$. -The RISCV coprocessor toggles `port17` at a randomly chosen -frequency slightly higher than that of the regular blinky show. +The RISC-V-ULP coprocessor performs an LED dimming +show on `port17` at a randomly chosen frequency +that is asynchronous to the regular blinky show. Self-procured LEDs and resistors need to be fitted externally -on the port pins in order to observe blinking on this particular board. +on the port pins in order to observe blinking and dimming +on this particular board. The NXP(R) OM13093 LPC11C24 board ARM(R) Cortex(R)-M0+ configuration called `target lpc11c24` toggles the LED on `port0.8`. diff --git a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.h b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.h index dc68a65e7..11cac2614 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.h +++ b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.h @@ -30,7 +30,6 @@ static auto set_direction_output() -> void { mcal::reg::reg_access_static::bit_set(); - mcal::reg::reg_access_static::reg_set(); // Set the pin to output low. mcal::reg::reg_access_static::bit_clr(); diff --git a/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S b/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S index 40b167013..d65c8caf9 100644 --- a/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S +++ b/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S @@ -1,11 +1,11 @@ .section .coprocessor, "a" .global coprocessor_bin coprocessor_bin: - .byte 0x6F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0xC1, 0x43, 0x6F, 0x00, 0x00, 0x22, 0x41, 0x11, 0x06, 0xC6 - .byte 0x21, 0x22, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0xB7, 0x16, 0x00, 0x50, 0x03, 0xA7, 0x86, 0x01 - .byte 0xB7, 0x17, 0x00, 0x50, 0x93, 0x87, 0x07, 0x03, 0x3A, 0x95, 0x63, 0x74, 0xF5, 0x00, 0x23, 0xAC - .byte 0xA6, 0x00, 0x3A, 0x85, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 + .byte 0x6F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00 + .byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0xC1, 0x47, 0x6F, 0x00, 0xC0, 0x57, 0x41, 0x11, 0x06, 0xC6 + .byte 0x21, 0x22, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0xB7, 0x16, 0x00, 0x50, 0x03, 0xA7, 0x86, 0x05 + .byte 0xB7, 0x17, 0x00, 0x50, 0x93, 0x87, 0x07, 0x07, 0x3A, 0x95, 0x63, 0x74, 0xF5, 0x00, 0x23, 0xAC + .byte 0xA6, 0x04, 0x3A, 0x85, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00 .byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00 .byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00 @@ -17,90 +17,90 @@ coprocessor_bin: .byte 0x7D, 0x55, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0x01, 0x11, 0x2E, 0xC2, 0x32, 0xC4, 0x36, 0xC6, 0x3A, 0xC8, 0x3E, 0xCA, 0x42, 0xCC, 0x46, 0xCE - .byte 0x01, 0xA0, 0x00, 0x00, 0x37, 0x15, 0x00, 0x50, 0x13, 0x05, 0x05, 0x03, 0x82, 0x80, 0x00, 0x00 + .byte 0x01, 0xA0, 0x00, 0x00, 0x37, 0x15, 0x00, 0x50, 0x13, 0x05, 0x05, 0x07, 0x82, 0x80, 0x00, 0x00 .byte 0x41, 0x11, 0x06, 0xC6, 0xC5, 0x3F, 0x83, 0x47, 0x05, 0x00, 0x81, 0xE7, 0x85, 0x47, 0x23, 0x00 .byte 0xF5, 0x00, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0x01, 0x45, 0x81, 0x45, 0x82, 0x80, 0x00, 0x00 .byte 0x03, 0x45, 0x45, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0xA9, 0x67, 0x83, 0xA6, 0x07, 0x40, 0x03, 0x47, 0x45, 0x00, 0x37, 0x06, 0x00, 0x08, 0xB1, 0x8E .byte 0x23, 0xA0, 0xD7, 0x40, 0x93, 0x47, 0x17, 0x00, 0x23, 0x02, 0xF5, 0x00, 0x82, 0x80, 0x00, 0x00 - .byte 0xA1, 0x45, 0xED, 0xB5, 0xB7, 0x17, 0x00, 0x50, 0x03, 0xC7, 0x87, 0x03, 0x41, 0x11, 0x22, 0xC4 - .byte 0x06, 0xC6, 0x37, 0x14, 0x00, 0x50, 0x19, 0xC7, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x04, 0x22, 0x44 - .byte 0x41, 0x01, 0x82, 0x80, 0x29, 0x67, 0x83, 0x25, 0x07, 0x40, 0xB7, 0x16, 0x00, 0x50, 0x37, 0x06 - .byte 0x00, 0xF8, 0x13, 0x08, 0x04, 0x04, 0x93, 0x86, 0x86, 0x00, 0x7D, 0x16, 0x23, 0x20, 0xD8, 0x00 - .byte 0xF1, 0x8D, 0x23, 0x20, 0xB7, 0x40, 0x03, 0x25, 0x87, 0x4C, 0xB7, 0x08, 0x08, 0x00, 0xBA, 0x86 - .byte 0x33, 0x65, 0x15, 0x01, 0x23, 0x24, 0xA7, 0x4C, 0x23, 0x26, 0x07, 0x46, 0x83, 0x25, 0x07, 0x40 - .byte 0x37, 0x05, 0x00, 0x50, 0x13, 0x05, 0xC5, 0x13, 0x6D, 0x8E, 0x23, 0x20, 0xC7, 0x40, 0x03, 0x27 - .byte 0xC7, 0x40, 0x37, 0x06, 0x00, 0x08, 0x51, 0x8F, 0x23, 0xA6, 0xE6, 0x40, 0x05, 0x47, 0x23, 0x02 - .byte 0x08, 0x00, 0x23, 0x8C, 0xE7, 0x02, 0x8D, 0x3D, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x04, 0x22, 0x44 - .byte 0x41, 0x01, 0x82, 0x80, 0x82, 0x80, 0x00, 0x00, 0x41, 0x11, 0x01, 0x45, 0x06, 0xC6, 0xDD, 0x3F - .byte 0xB2, 0x40, 0x01, 0x45, 0x41, 0x01, 0x29, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x22, 0xC4 - .byte 0x06, 0xC6, 0x37, 0x14, 0x00, 0x50, 0xCD, 0x37, 0xB1, 0x37, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 - .byte 0x37, 0x07, 0x06, 0x00, 0x83, 0x27, 0x84, 0x04, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x04 - .byte 0x75, 0xFB, 0xDD, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x06, 0xC6, 0x31, 0x20, 0xAD, 0x20 - .byte 0xF1, 0x37, 0x01, 0x00, 0x01, 0x00, 0xF5, 0xBF, 0xB7, 0x16, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50 - .byte 0x93, 0x86, 0xC6, 0x01, 0x93, 0x05, 0x87, 0x01, 0xB7, 0x17, 0x00, 0x50, 0x33, 0x85, 0xB6, 0x40 - .byte 0x13, 0x86, 0x87, 0x01, 0x2A, 0x96, 0x63, 0x8D, 0xB6, 0x00, 0x13, 0x07, 0x87, 0x01, 0x93, 0x87 - .byte 0x87, 0x01, 0x94, 0x43, 0x91, 0x07, 0x11, 0x07, 0x23, 0x2E, 0xD7, 0xFE, 0xE3, 0x1B, 0xF6, 0xFE - .byte 0xB7, 0x17, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0x07, 0x02, 0x13, 0x07, 0xC7, 0x04 - .byte 0x63, 0x89, 0xE6, 0x00, 0x93, 0x87, 0x07, 0x02, 0x23, 0xA0, 0x07, 0x00, 0x91, 0x07, 0xE3, 0x9D - .byte 0xE7, 0xFE, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x22, 0xC4, 0x26, 0xC2, 0x37, 0x14 - .byte 0x00, 0x50, 0xB7, 0x14, 0x00, 0x50, 0x06, 0xC6, 0x93, 0x07, 0x84, 0x01, 0x93, 0x84, 0x84, 0x01 - .byte 0x63, 0x8A, 0x97, 0x00, 0x13, 0x04, 0x84, 0x01, 0x83, 0x27, 0xC4, 0xFF, 0x71, 0x14, 0x82, 0x97 - .byte 0xE3, 0x1C, 0x94, 0xFE, 0xB2, 0x40, 0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0xA1, 0x45, 0xED, 0xB5, 0xB7, 0x17, 0x00, 0x50, 0x03, 0xC7, 0x87, 0x07, 0x41, 0x11, 0x22, 0xC4 + .byte 0x06, 0xC6, 0x37, 0x14, 0x00, 0x50, 0x19, 0xC7, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x08, 0x22, 0x44 + .byte 0x41, 0x01, 0x82, 0x80, 0xB7, 0x16, 0x00, 0x50, 0x29, 0x67, 0x13, 0x08, 0x04, 0x08, 0x93, 0x86 + .byte 0x86, 0x00, 0x23, 0x20, 0xD8, 0x00, 0x83, 0x26, 0x07, 0x40, 0x37, 0x06, 0x00, 0xF8, 0x7D, 0x16 + .byte 0xF1, 0x8E, 0x23, 0x20, 0xD7, 0x40, 0x03, 0x25, 0x87, 0x4C, 0xB7, 0x08, 0x08, 0x00, 0xBA, 0x86 + .byte 0x33, 0x65, 0x15, 0x01, 0x23, 0x24, 0xA7, 0x4C, 0x83, 0x25, 0x07, 0x40, 0xB7, 0x08, 0x00, 0x08 + .byte 0x37, 0x05, 0x00, 0x50, 0x6D, 0x8E, 0x23, 0x20, 0xC7, 0x40, 0x03, 0x27, 0xC7, 0x40, 0x13, 0x05 + .byte 0xC5, 0x13, 0x33, 0x67, 0x17, 0x01, 0x23, 0xA6, 0xE6, 0x40, 0x05, 0x47, 0x23, 0x02, 0x08, 0x00 + .byte 0x23, 0x8C, 0xE7, 0x06, 0x95, 0x3D, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x08, 0x22, 0x44, 0x41, 0x01 + .byte 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x41, 0x11, 0x01, 0x45, 0x06, 0xC6, 0xDD, 0x3F + .byte 0xB2, 0x40, 0x01, 0x45, 0x41, 0x01, 0x29, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x56, 0xC2 + .byte 0xB7, 0x1A, 0x00, 0x50, 0x22, 0xCC, 0x26, 0xCA, 0x4E, 0xC6, 0x52, 0xC4, 0x06, 0xCE, 0x4A, 0xC8 + .byte 0x93, 0x8A, 0x8A, 0x01, 0xD1, 0x3F, 0x01, 0x4A, 0x81, 0x44, 0x81, 0x49, 0x37, 0x14, 0x00, 0x50 + .byte 0x93, 0x97, 0x29, 0x00, 0xD6, 0x97, 0x9C, 0x43, 0x4E, 0x89, 0x82, 0x87, 0x25, 0x37, 0x1C, 0x41 + .byte 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0xC0, 0x03, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x39, 0x37, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27 + .byte 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x85, 0x04, 0x93, 0xF7, 0xF4, 0x3F, 0xE9, 0xF3 + .byte 0x05, 0x0A, 0x93, 0x79, 0xFA, 0x00, 0x6D, 0xBF, 0xF5, 0x35, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 + .byte 0x13, 0x07, 0x00, 0x02, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08 + .byte 0x75, 0xFB, 0xC9, 0x3D, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x6D, 0xBF + .byte 0x55, 0x3D, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x21, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17 + .byte 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x71, 0x3D, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 + .byte 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0xC1, 0xB7, 0x61, 0x35, 0x1C, 0x41 + .byte 0x9C, 0x47, 0x82, 0x97, 0x19, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0x75, 0xFB, 0x85, 0x3D, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x11, 0x47, 0x83, 0x27 + .byte 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0xB1, 0xBF, 0x99, 0x3D + .byte 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x11, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x3D, 0x3D, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x19, 0x47 + .byte 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x2D, 0xB7 + .byte 0x15, 0x35, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x21, 0x35, 0x1C, 0x41 + .byte 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0x00, 0x02, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0xCD, 0xBD, 0xF5, 0x33, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 + .byte 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0xD9, 0x33 + .byte 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x21, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07 + .byte 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x4D, 0xBD, 0x75, 0x33, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 + .byte 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x69, 0x3B, 0x1C, 0x41, 0x9C, 0x47 + .byte 0x82, 0x97, 0x13, 0x07, 0xC0, 0x03, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0x75, 0xFB, 0x51, 0xB5, 0xBD, 0x3B, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27 + .byte 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0xB5, 0x33, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97 + .byte 0x13, 0x07, 0xF0, 0x03, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08 + .byte 0x75, 0xFB, 0x99, 0xBD, 0x81, 0x3B, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27, 0x84, 0x08 + .byte 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08 + .byte 0x15, 0x3B, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0xE0, 0x03, 0x83, 0x27, 0x84, 0x08 + .byte 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x39, 0xBD, 0x21, 0x3B, 0x1C, 0x41 + .byte 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27 + .byte 0x84, 0x08, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x83, 0x27, 0x84, 0x08, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0xCD, 0x39, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0xD0, 0x03, 0x83, 0x27 + .byte 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0xF1, 0xBB, 0xD9, 0x39 + .byte 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x19, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0xE3, 0x1A, 0x09, 0xFE, 0x7D, 0x39, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07 + .byte 0xC0, 0x03, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB + .byte 0x65, 0xB3, 0x4D, 0x31, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x19, 0x47, 0x83, 0x27, 0x84, 0x08 + .byte 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x69, 0x31, 0x1C, 0x41, 0x9C, 0x47 + .byte 0x82, 0x97, 0x13, 0x07, 0xA0, 0x03, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0x75, 0xFB, 0x95, 0xBB, 0xBD, 0x31, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07 + .byte 0x00, 0x02, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB + .byte 0x91, 0x39, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0x00, 0x02, 0x83, 0x27, 0x84, 0x08 + .byte 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x3D, 0xBB, 0x25, 0x39, 0x1C, 0x41 + .byte 0x9C, 0x47, 0x82, 0x97, 0x21, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24 + .byte 0xF4, 0x08, 0x75, 0xFB, 0x05, 0x31, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0x80, 0x03 + .byte 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0x29, 0xB3 + .byte 0x11, 0x31, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x13, 0x07, 0xC0, 0x03, 0x83, 0x27, 0x84, 0x08 + .byte 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08, 0x75, 0xFB, 0xED, 0x36, 0x1C, 0x41, 0x9C, 0x47 + .byte 0x82, 0x97, 0x11, 0x47, 0x83, 0x27, 0x84, 0x08, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x08 + .byte 0x75, 0xFB, 0xD9, 0xB9, 0x41, 0x11, 0x06, 0xC6, 0x31, 0x20, 0xAD, 0x20, 0x85, 0x39, 0x01, 0x00 + .byte 0x01, 0x00, 0xF5, 0xBF, 0xB7, 0x16, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0xC6, 0x05 + .byte 0x93, 0x05, 0x87, 0x05, 0xB7, 0x17, 0x00, 0x50, 0x33, 0x85, 0xB6, 0x40, 0x13, 0x86, 0x87, 0x05 + .byte 0x2A, 0x96, 0x63, 0x8D, 0xB6, 0x00, 0x13, 0x07, 0x87, 0x05, 0x93, 0x87, 0x87, 0x05, 0x94, 0x43 + .byte 0x91, 0x07, 0x11, 0x07, 0x23, 0x2E, 0xD7, 0xFE, 0xE3, 0x1B, 0xF6, 0xFE, 0xB7, 0x17, 0x00, 0x50 + .byte 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0x07, 0x06, 0x13, 0x07, 0xC7, 0x08, 0x63, 0x89, 0xE6, 0x00 + .byte 0x93, 0x87, 0x07, 0x06, 0x23, 0xA0, 0x07, 0x00, 0x91, 0x07, 0xE3, 0x9D, 0xE7, 0xFE, 0x82, 0x80 + .byte 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x22, 0xC4, 0x26, 0xC2, 0x37, 0x14, 0x00, 0x50, 0xB7, 0x14 + .byte 0x00, 0x50, 0x06, 0xC6, 0x93, 0x07, 0x84, 0x05, 0x93, 0x84, 0x84, 0x05, 0x63, 0x8A, 0x97, 0x00 + .byte 0x13, 0x04, 0x84, 0x05, 0x83, 0x27, 0xC4, 0xFF, 0x71, 0x14, 0x82, 0x97, 0xE3, 0x1C, 0x94, 0xFE + .byte 0xB2, 0x40, 0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -258,4 +258,8 @@ coprocessor_bin: .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x50, 0x60, 0x01, 0x00, 0x50 - .byte 0x40, 0x01, 0x00, 0x50, 0x30, 0x01, 0x00, 0x50, 0x28, 0x10, 0x00, 0x50 + .byte 0x40, 0x01, 0x00, 0x50, 0x30, 0x01, 0x00, 0x50, 0x60, 0x05, 0x00, 0x50, 0xF6, 0x04, 0x00, 0x50 + .byte 0x2C, 0x05, 0x00, 0x50, 0xC2, 0x04, 0x00, 0x50, 0x8E, 0x04, 0x00, 0x50, 0x4C, 0x04, 0x00, 0x50 + .byte 0x14, 0x04, 0x00, 0x50, 0xE6, 0x03, 0x00, 0x50, 0xB8, 0x03, 0x00, 0x50, 0x40, 0x03, 0x00, 0x50 + .byte 0x78, 0x03, 0x00, 0x50, 0x0E, 0x03, 0x00, 0x50, 0xDC, 0x02, 0x00, 0x50, 0xB0, 0x02, 0x00, 0x50 + .byte 0x78, 0x02, 0x00, 0x50, 0x3C, 0x02, 0x00, 0x50, 0x68, 0x10, 0x00, 0x50 diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop.ld b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop.ld index f601b8e1b..d2a1d7053 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop.ld +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop.ld @@ -60,9 +60,6 @@ SECTIONS . = ALIGN(4); *(.rodata*) . = ALIGN(4); - PROVIDE(__INTVECT_BASE_ADDRESS = .); - *(.intvect_core*) - . = ALIGN(4); } > D_SRAM /* Section for constructors */ diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Appli/main.cpp b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Appli/main.cpp index a7b895f82..7abfdfe93 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Appli/main.cpp +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Appli/main.cpp @@ -27,7 +27,7 @@ #include #include -extern "C" void main(); +extern "C" auto main() -> int; namespace mcal { @@ -44,25 +44,47 @@ namespace { volatile std::uint32_t main_counter { }; - auto delay() -> void + auto delay(const std::uint32_t loop_count) -> void { - constexpr std::uint32_t loop_count{ UINT32_C(0x00060000) }; - - for (std::uint32_t loop{ UINT32_C(0) }; loop < loop_count; ++loop) + for (std::uint32_t loop { UINT32_C(0) }; loop < loop_count; ++loop) { main_counter = std::uint32_t { main_counter + UINT8_C(1) }; } } } -extern "C" void main() +extern "C" auto main() -> int { mcal::init(); + unsigned prescaler { UINT8_C(0) }; + unsigned cycle { UINT8_C(0) }; + for(;;) { - mcal::led::led0().toggle(); + switch(unsigned { cycle % unsigned { UINT8_C(16) } }) + { + case unsigned { UINT8_C( 0) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(60) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 4) }); break; + case unsigned { UINT8_C( 1) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(32) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(32) }); break; + case unsigned { UINT8_C( 2) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 8) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(56) }); break; + case unsigned { UINT8_C( 3) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 6) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(58) }); break; + case unsigned { UINT8_C( 4) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 4) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(60) }); break; + case unsigned { UINT8_C( 5) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 3) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(61) }); break; + case unsigned { UINT8_C( 6) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 2) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(62) }); break; + case unsigned { UINT8_C( 7) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 1) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(63) }); break; + case unsigned { UINT8_C( 8) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 1) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(60) }); break; + case unsigned { UINT8_C( 9) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 2) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(32) }); break; + case unsigned { UINT8_C(10) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 3) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 8) }); break; + case unsigned { UINT8_C(11) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 4) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 6) }); break; + case unsigned { UINT8_C(12) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 6) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 4) }); break; + case unsigned { UINT8_C(13) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 8) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 3) }); break; + case unsigned { UINT8_C(14) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(32) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 2) }); break; + case unsigned { UINT8_C(15) }: mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C(60) }); mcal::led::led0().toggle(); delay(std::uint32_t { UINT8_C( 1) }); break; + } - delay(); + if(unsigned { ++prescaler % unsigned { UINT8_C(1024) } } == unsigned { UINT8_C(0) }) + { + ++cycle; + } } } diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/IntVectTable.S b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/IntVectTable.S index 7bacf5dcf..324135dd1 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/IntVectTable.S +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/IntVectTable.S @@ -8,35 +8,39 @@ // Originally from: /****************************************************************************************** Filename : IntVectTable.S - + Core : RISC-V - + MCU : ESP32-S3 - + Author : Chalandi Amine - + Owner : Chalandi Amine - + Date : 22.02.2025 - + Description : interrupt vector table implementation for ULP-RISC-V Co-processor - + ******************************************************************************************/ /******************************************************************************************* - \brief - - \param - - \return + \brief + + \param + + \return ********************************************************************************************/ .section .vector .type _InterruptVectorTable, @function .align 4 -.extern _IRQ_VECTORS .globl _InterruptVectorTable _InterruptVectorTable: - /* reset vector */ - j _start - + /* reset vector */ + .org _InterruptVectorTable + 0x00 + j _start + + .org _InterruptVectorTable + 0x0C + AlignmentDummy: + nop // 2-byte op + nop // 2-byte op diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/boot.S b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/boot.S index 633996641..bac4872d7 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/boot.S +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/boot.S @@ -24,17 +24,17 @@ ******************************************************************************************/ /******************************************************************************************* - \brief - - \param - - \return + \brief + + \param + + \return ********************************************************************************************/ .section .boot .type _start, @function .align 4 .extern __STACK_TOP -.extern Startup_Init +.extern __my_startup .globl _start _start: @@ -42,6 +42,6 @@ _start: la sp, __STACK_TOP /* setup C/C++ runtime environment */ - j Startup_Init + j __my_startup .size _start, .-_start diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/crt0.cpp b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/crt0.cpp index b9910975a..9aa031e8e 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/crt0.cpp +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/startup/from_no_sdk/Code/Startup/crt0.cpp @@ -19,10 +19,10 @@ extern "C" { extern auto main() -> int; - void Startup_Init() __attribute__((used, noinline)); + void __my_startup() __attribute__((used, noinline)); } -void Startup_Init() +void __my_startup() { // Initialize statics from ROM to RAM. // Zero-clear default-initialized static RAM.