Before I try something which is technically impossible....
Does anyone know if the USB functions on the nRF52840 would work in the bootloader, or only in the application?
Before I try something which is technically impossible....
Does anyone know if the USB functions on the nRF52840 would work in the bootloader, or only in the application?
Nothing would stop you using USB as a transport for the bootloader, you could absolutely do it. The bootloader was originally written to be modular, with UART and BLE transports, but the UART got dropped because I don't think many people used it. Writing a USB version of that transport would be possible and then you get to use the rest of the bootloader code for free.
If you're going to do it, making it as simple as possible would keep the code size down and yes you can make the bootloader larger if you need and it probably would be larger. What driver were you intending on using on the PC end? If it's something complicated like CDC then the code will get a bit large, a custom dumb control channel + data endpoint would be smaller but then you have to write the driver.
Nothing would stop you using USB as a transport for the bootloader, you could absolutely do it. The bootloader was originally written to be modular, with UART and BLE transports, but the UART got dropped because I don't think many people used it. Writing a USB version of that transport would be possible and then you get to use the rest of the bootloader code for free.
If you're going to do it, making it as simple as possible would keep the code size down and yes you can make the bootloader larger if you need and it probably would be larger. What driver were you intending on using on the PC end? If it's something complicated like CDC then the code will get a bit large, a custom dumb control channel + data endpoint would be smaller but then you have to write the driver.