Linus Torvalds on bad hardware architectures: lore.kernel.org/all/CAHk-=wj…
xtensa scores a lot of points in that list with confidence and a few more as optional features.
A couple new changes in the esp32-linux-build scripts:
- update to linux-6.11 and buildroot-2024.08
- new configuration for the Espressif Box-3 supporting SPI display and USB host controller
xtensa FDPIC toolchain gets initial TLS and NPTL support with uClibc-ng. New linux builds for esp32s3 and esp32 will have it enabled by default. xtensa FDPIC support in musl libc is next.
On esp32 as long as DPORT_{PRO,APP}_CACHE_CTRL1_REG bits DPORT_{PRO,APP}_CACHE_MASK_IRAM1 are set, reads from the region 0x4040_0000..0x407F_FFFF (VAddr2 in esp32 TRM terminology) return 0xbad00bad. Clearing these bits makes the VAddr2 mappings work.
Got linux-6.7-rc8 + userspace running on esp32 with 4M FLASH and 4M PSRAM. It took some time to find a workaround for the unfortunate default FLASH mapping. Build script: github.com/jcmvbkbc/esp32-li…
c++ exceptions and c cleanup routines are now working in the xtensa FDPIC toolchain. TLS and NPTL are next.
Got GPIO kernel driver working in esp32s3 xtensa linux, and with that bitbanged SPI and I2C. Can scan i2c bus with i2cdetect. Got an example i2c accelerometer working in the kernel iio framework.
xtensa gcc compiler port is nicely parameterized by the WINDOW_SIZE macro, that specifies the size of a register window used for function calls. It's fixed as 8 right now, so I thought that changing it to 4 might be a quick way to get gcc to use call4 instead. Ha-ha, what a fool
Turns out xtensa windowed ABI assignment of hard frame pointer to a7 messes up gcc idea of call-clobbered registers with WINDOW_SIZE of 4, even when the frame pointer is not in use.
