I wrote an article on writing a tiny pseudo-bootloader a while back[0] that got a bit of traction on HN at the time; you may enjoy it as an accesible and fun stepping stone into the space. There’s an accompanying GH repo[1] with all the resources you need to run it yourself :)