Even empty sketches hang in mbed_die() on my Portenta H7

I am running Arduino IDE 2.0.0 using version 3.3.0 of the Arduino Mbed OS Portenta Boards package. My build environment in macOS version 12.6 on a M2 based Mac. I have tried building and uploading the basic empty sketch that comes up when I first open the IDE and also the Blinky example. They both cause the blinking RED light of death immediately after upload.

If I attach GDB via JLink then I see the following callstack:

(gdb) bt
#0  0x0804a826 in _wait_us_ticks ()
#1  0x0804980c in mbed_die ()
#2  0x08049940 in mbed_halt_system ()
#3  0x08049c4a in mbed_error ()
#4  0x08049714 in mbed_assert_internal ()
#5  0x08052faa in pin_function ()
#6  0x080517ea in USBPhyHw::init(USBPhyEvents*) ()
#7  0x0804730e in USBDevice::init() ()
#8  0x08047360 in USBDevice::connect() ()
#9  0x08041f1c in main ()
    at /Users/user/Library/Arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/cores/arduino/main.cpp:40

I do see the following odd message when I turn verbose compile messages on:

/Users/user/Library/Arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs_v2.elf syntax error: no colon char on the first line character at line 1

It has been awhile since I last used my Portenta H7 board, probably 2020.

Hopefully someone here can set me in the right direction to get this working again.

I debugged the call stack a little bit more and figured out that the cause was the boot loader on my device was too old to properly report the USB speed to USBPhyHw::init(). This resulted in the const PinMap *map pointer pointing to NULL and passing in garbage to the pin_function().

I used the already connected JLink to upgrade the boot loader to the one found at the following location on my Mac.

~/Library/Arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs_v2.elf

That got everything back up and running as expected.