USB DFU bootloader for the lpc1756. Supports writing binary files using dfu-util 0.11. Has a override input that prevents the bootloader from starting the application.
The bootloader should be easy to change to a different target. (As long as it has the USB driver, flash driver and pin_in working)
The bootloader uses klib. This repo can be cloned in the klib project folder. See build.yml for more info on compiling this project.
dfu-util -D ./klib.bin
Currently dfuSe is not supported. This means the content of klib.bin
will be written at location app_vector_address
. This also prevents dfu-util from overwriting the bootloader.
Size can be optimized further by removing the CRP section in the linkerscript (decreasing the size to ≈3800 bytes. This makes it fit in the first sector).
The bootloader expects the user application to start at the address specified in app_vector_address
. This means the user application needs to modify the linkerscript so the vector table is in this location.
The bootloader expects the normal vector table that includes the stack, reset handler and the other interrupts. The bootloader will
setup the stack and move the vector table to app_vector_address
. This allows the user application to trigger interrupts without moving the vector table to ram. After this setup the bootloader will call the reset handler.