mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
9b1a3a2236
* esp32s3: add interrupt support This finally adds the long awaited support for interrupts on the Xtensa arch. Initially just for the ESP32-S3 but then others. Signed-off-by: deadprogram <ron@hybridgroup.com> * esp32s3: get interrupts working correctly There were a number of needed changes in order to get interrupts correctly working on the esp32s3 processor: - PS.UM=1 in interruptInit() - routed interrupts to user exception vector (0x340) instead of kernel (0x300) - Inline ISR in the vector slot - external handlers via j/call0 crashed (likely clang Xtensa literal pool issue with large movi constants in separate sections) - Disable INTENABLE (not just INT_CLR) - the USB RX interrupt is level-triggered; clearing INT_CLR alone causes infinite re-entry since data is still in the FIFO - Buffered() re-enables INTENABLE after draining the hardware FIFO Signed-off-by: deadprogram <ron@hybridgroup.com> --------- Signed-off-by: deadprogram <ron@hybridgroup.com>
23 lines
834 B
JSON
23 lines
834 B
JSON
{
|
|
"inherits": ["xtensa"],
|
|
"cpu": "esp32s3",
|
|
"features": "+atomctl,+bool,+clamps,+coprocessor,+debug,+density,+div32,+esp32s3,+exception,+fp,+highpriinterrupts,+interrupt,+loop,+mac16,+memctl,+minmax,+miscsr,+mul32,+mul32high,+nsa,+prid,+regprotect,+rvector,+s32c1i,+sext,+threadptr,+timerint,+windowed",
|
|
"build-tags": ["esp32s3", "esp"],
|
|
"scheduler": "tasks",
|
|
"serial": "usb",
|
|
"linker": "ld.lld",
|
|
"default-stack-size": 8192,
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"linkerscript": "targets/esp32s3.ld",
|
|
"extra-files": [
|
|
"src/device/esp/esp32.S",
|
|
"targets/esp32s3-interrupts.S",
|
|
"src/internal/task/task_stack_esp32.S"
|
|
],
|
|
"binary-format": "esp32s3",
|
|
"flash-method": "esp32jtag",
|
|
"emulator": "qemu-system-xtensa -machine esp32 -nographic -drive file={img},if=mtd,format=raw",
|
|
"gdb": ["xtensa-esp32-elf-gdb"]
|
|
}
|