Build custom bootloader from scratch

Have a look at the Zephyr project for other options.

Arduino is migrating their mbed Arduino core for Giga, nano, rp2040 boards across to a zephyr based rtos core.

So will still be compatible.