Many thanks for providing the incantation for getting the MicroPython source from GitHub with RP235X and Pico 2 support included.
I used my recommended build instructions described here - viewtopic.php?p=1972803#p1972803 - but modified to use a '~/rp235x' top-level directory as I already have '~/pico/micropython' -
That worked for me though it seemed to take a lot longer "Linking CXX executable firmware.elf" than it usually does for a Pico or PIco W. I would expect it to work if my '~/rp235x' is replaced by '~/pico'.So it builds as expected but that doesn't include User C Modules.
I can't help with adding those if wanting to do it the supposedly recommended way because I gave up on trying to make that work. For my port of MicroPython I simply put them in a './own' directory and update the 'CMakeLists.txt' to have them included in the build.
I also can't test the MicroPython that's been built because I don't have a Pico 2 or other RP235X board to test with. I'd be surprised if it doesn't work.
Using my own tools to peek inside the 'firmware.uf2' ...That second USB which doesn't look right seems to be benign, a manifestation of MicroPython adding Dynamic USB, and I see similar for the Pico and Pico W.
Being 'Copy to RAM' was rather surprising. That would seem to waste 62% of the memory users could have otherwise had, leaves just 192KB, which is not a lot more than Pico and Pico W, not enough for a VGA 640 x 480 8-bit frame buffer. Let's hope that's a 'while developing' setting, not a concrete implementation decision. I guess I should also check that my utility is reporting it correctly.
I used my recommended build instructions described here - viewtopic.php?p=1972803#p1972803 - but modified to use a '~/rp235x' top-level directory as I already have '~/pico/micropython' -
Code:
mkdir ~/rp235xcd ~/rp235xgit clone https://github.com/dpgeorge/micropython.git --branch rp2-add-rp2350git clone https://github.com/micropython/micropython-lib.gitcd micropythongit submodule update --initmake -C mpy-cross
Code:
cd ~/rp235x/micropython/ports/rp2mkdir build-rp235xcd build-rp235xcmake -DMICROPY_BOARD=RPI_PICO2 ..make
Code:
pi@Pi4B:~/rp235x/micropython/ports/rp2/build-rp235x $ picotool info -a firmware.uf2File firmware.uf2:Program Information name: MicroPython version: v1.23.0-319.g8a14546c2 features: thread support USB REPL frozen modules: neopixel, dht, ds18x20, onewire, uasyncio, asyncio/stream, asyncio/lock, asyncio/funcs, asyncio/event, asyncio/core, asyncio, rp2, _boot_fat, _boot binary start: 0x10000000 binary end: 0x1004f724 target chip: RP2350 image type: ARM Secure embedded drive: 0x10100000-0x10400000 (3072K): MicroPythonFixed Pin Information noneBuild Information sdk version: 2.0.0 pico_board: pico2 build date: Sep 18 2024 build attributes: MinSizeRel
I can't help with adding those if wanting to do it the supposedly recommended way because I gave up on trying to make that work. For my port of MicroPython I simply put them in a './own' directory and update the 'CMakeLists.txt' to have them included in the build.
I also can't test the MicroPython that's been built because I don't have a Pico 2 or other RP235X board to test with. I'd be surprised if it doesn't work.
Using my own tools to peek inside the 'firmware.uf2' ...
Code:
Program Name : MicroPythonProgram Version : v1.23.0-319.g8a14546c2Target Device : RP2350Target Chip : Cortex-M33Target ISA : ARMv8-MTarget Code : RP2350 ARM-S - Secure ARM ImageTarget Board : Pico 2Code Execution Type : Copy to RAMBuild Date : Sep 18 2024Pico SDK Version : 2.0.0Build Attributes : MinSizeRelProgram Area Used : 10000000 to 1004F723 317 KB 325,412 bytesERRATA-E10 FIX : 10FFFF00 to 10FFFFFF 256 bytesBinary Info Root Entry : 10000124 to 10000137 5 quads 20 bytesMeta Block : 10000138 to 1000014B 5 quads 20 bytesCopy Table Information : 100001BC to 100001EF 13 quads 52 bytesUSB Configuration Info : 10043483 to 100434CD Configuration 1USB Device Descriptor : 100434CE to 100434DF 2E8A:0005 [1.0] USB 2.0Binary Info Pointers : 1004B6D4 to 1004B737 25 quads 100 bytesUSB Device Descriptor : 1004D264 to 1004D275 C1E8:1003 [240.1] USB 240.42Meta Block : 1004F710 to 1004F723 5 quads 20 bytesIncluded File System : 10100000 to 103FFFFF 'MP' "MicroPython" 3 MBBinary Info Tag Name : 'RP' - Raspberry Pi Pico SDKBinary Info Tag Name : 'MP' - frozen modulesUSB Device Information : 2E8A:0005 [1.0] Raspberry Pi MicroPythonUSB Device Information : C1E8:1003 [240.1]
Being 'Copy to RAM' was rather surprising. That would seem to waste 62% of the memory users could have otherwise had, leaves just 192KB, which is not a lot more than Pico and Pico W, not enough for a VGA 640 x 480 8-bit frame buffer. Let's hope that's a 'while developing' setting, not a concrete implementation decision. I guess I should also check that my utility is reporting it correctly.
Statistics: Posted by hippy — Wed Sep 18, 2024 7:06 am