pimoroni / pga

1 stars 0 forks source link

Stuck in bootloader #6

Closed dyaa closed 1 month ago

dyaa commented 2 months ago

Hi, I've got my hands on pga2350, and i connected it using Adafruit usbc breakout board exactly this way, got the volume after booting with bootsel and all is fine until here.

I've copied many different uf2 files from the latest 2 releases related to the pga2350, yet it keeps rebooting into the bootloader, and picotool info seems to only see the device information giving me a sense that micropython did not boot

picotool info -a
Program Information
 none

Fixed Pin Information
 none

Build Information
 none

Device Information
 type:                   RP2350
 revision:               A2
 package:                QFN80
 chipid:                 0xXXXXXXXXXXXXXXXX
 flash devinfo:          0x0cXX
 current cpu:            ARM
 available cpus:         ARM, RISC-V
 default cpu:            ARM
 secure boot:            0
 debug enable:           1
 secure debug enable:    1
 boot_random:            4ee2se9b:d3d7cee0:dc151633:39722a37
 boot type:              bootsel
 last booted partition:  none
 diagnostic source:      window
 last boot diagnostics:  0x0000XXXX
 reboot param 0:         0x10000XXX
 reboot param 1:         0x0000XXXX
 rom gitrev:             0x312e2XXX

I can only see the volume, but nothing coming in ls /dev/tty.*

any idea how to unblock this and have micropython up and ready? thanks in advance

Gadgetoid commented 2 months ago

The non “with-filesystem” builds should work!

The “with-filesystem” builds from here should work too - https://github.com/pimoroni/pga/actions/runs/10901460006

Will double check this tomorrow and tag a new release!

dyaa commented 2 months ago

while

picotool info -a ~/Downloads/pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython-with-filesystem.uf2
File ~/Downloads/pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython-with-filesystem.uf2:

Program Information
 name:            MicroPython
 version:         feature/psram, pga2350-psram acc6c23479941ec994419b729c76ad9cbd768b8a
 features:        USB REPL
                  thread support
 frozen modules:  rp2, _boot, version, _boot_fat, asyncio, asyncio/core, asyncio/event, asyncio/funcs, asyncio/lock,
                  asyncio/stream, uasyncio, onewire, ds18x20, dht, neopixel, frozen_example
 binary start:    0x10000000
 binary end:      0x100b22b0
 target chip:     RP2350
 image type:      ARM Secure
 embedded drive:  0x10200000-0x11000000 (14336K): MicroPython

Fixed Pin Information
 none

Build Information
 sdk version:       2.0.0
 pico_board:        pga2350
 build date:        Sep 17 2024
 build attributes:  MinSizeRel

and

picotool config ~/Downloads/pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython-with-filesystem.uf2
File ~/Downloads/pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython-with-filesystem.uf2:

ERROR: Hmm uncaught not mapped

for both the psram and without (both with-filesystem) no results, and drag-and-drop doesnt reboot it.

Will double check this tomorrow and tag a new release!

Thanks in advance

dyaa commented 2 months ago

Any update @Gadgetoid? 🙏

Gadgetoid commented 2 months ago

Looking at this now...

Edit, okay that's weird, I flashed pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython-with-filesystem.uf2 and it did, indeed, seem to stall and not automatically reboot at the end of the flash.

After a wait and a manual reset:

> MicroPython feature/psram, pga2350-psram acc6c23479941ec994419b729c76ad9cbd768b8a on 2024-09-17; PGA2350 (PSRAM) with RP2350

I wonder if it has stalled waiting for the last block.

If I flash pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython.uf2 then it will reset as normal and show up with no problems.

Gadgetoid commented 2 months ago

Hmm I think there are still some issues with my with-filesystem firmware builds, but those don't explain why you're not seeing a working MicroPython.

The reboot bug is because I'm reporting one too many blocks in the with-filesystem UF2, so it just sits forever waiting for the next block... which never comes. Got sidetracked with sparse UF2s (removing the zero padding between app and filesystem) but will fast track a fix for this bug.

dyaa commented 1 month ago

If I flash pga2350-psram-acc6c23479941ec994419b729c76ad9cbd768b8a-micropython.uf2 then it will reset as normal and show up with no problems.

Tested that, and it worked, I believe indeed with-filesystem might have an issue.

Gadgetoid commented 1 month ago

I believe indeed with-filesystem might have an issue.

Still poking it today, juggling the filesystem builds not working with my board/Thonny refusing to list the filesystem, or refusing to connect at all.

That said the with-filesystem build is effectively useless unless you fork this repository and add your own customisations! (and currently broken, since no files get included 🤦)