mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
esp32: implement task based scheduler
This has been a *lot* of work, trying to understand the Xtensa windowed registers ABI. But in the end I managed to come up with a very simple implementation that so far seems to work very well. I tested this with both blinky examples (with blinky2 slightly edited) and ./testdata/coroutines.go to verify that it actually works. Most development happened on the ESP32 QEMU fork from Espressif (https://github.com/espressif/qemu/wiki) but I also verified that it works on a real ESP32.
This commit is contained in:
committed by
Ron Evans
parent
abb09e869e
commit
caf35cfc41
+4
-1
@@ -2,13 +2,16 @@
|
||||
"inherits": ["xtensa"],
|
||||
"cpu": "esp32",
|
||||
"build-tags": ["esp32", "esp"],
|
||||
"scheduler": "tasks",
|
||||
"linker": "xtensa-esp32-elf-ld",
|
||||
"default-stack-size": 2048,
|
||||
"cflags": [
|
||||
"-mcpu=esp32"
|
||||
],
|
||||
"linkerscript": "targets/esp32.ld",
|
||||
"extra-files": [
|
||||
"src/device/esp/esp32.S"
|
||||
"src/device/esp/esp32.S",
|
||||
"src/internal/task/task_stack_esp32.S"
|
||||
],
|
||||
"binary-format": "esp32",
|
||||
"flash-command": "esptool.py --chip=esp32 --port {port} write_flash 0x1000 {bin} -ff 80m -fm dout"
|
||||
|
||||
Reference in New Issue
Block a user