Closed rgov closed 6 months ago
Performed a bisection of commits between 8.0.5 and 8.1.0 and found this was the first that fails: https://github.com/adafruit/circuitpython/commit/cbfb2d0f55a59d025c186cb6bdfea8ce5a8afb6c (which modifies ports/raspberrypi/supervisor/port.c
).
After reverting that commit, rp2040js can run all the way up to 9.0.0!
$ git apply -R <(git diff cbfb2d0'^':ports/raspberrypi/supervisor/port.c cbfb2d0:ports/raspberrypi/supervisor/port.c)
Good job! I believe this is the culprit:
// Load from the XIP memory space that doesn't cache. That way we don't
// evict anything else. The code we're loading is linked to the RAM address
// anyway.
size_t nocache = 0x03000000;
That would be the offset from XIP_BASE
to XIP_NOCACHE_NOALLOC_BASE
. The RP2040 datasheet, §2.6.3.1 "XIP Cache" explains this is a "mirror" of the base address which bypasses the cache.
Thanks again for spotting the issue. One of the best bug reports I ever received :)
rp2040js is unable to boot newer CircuitPython firmware. The default version is 8.0.2, which indeed works. Since then, several releases have been made. I tested a few of them:
[RP2040] read from address 100a692d, which is not 32 bit aligned
Others including 8.2.9 and 9.0.0-beta.0 fail with similar unaligned read errors: