This compact loader is written in assembler and takes up 512 bytes of program memory. Project can be built with sdcc-compiler. The program must be burned into the microcontroller memory at zero address. After starting, program checks the status of the P3.0 port (see the start:
label in dfu.asm). If P3.0=0, then the DFU-loader is executed. Otherwise, the application program is executed. All interrupt vectors are redirected to address 0x200, so the application program must be linked to this address as well. To flash DFU-firmware, you can use the Silabs adapter or the Versaloon adapter. The tools directory contains program and driver for Versaloon. For a DFU device, you need to install winusb or libusb driver. On windows this can be done with tools/zadig.
The example directory contains a simple application program that uses xprintf library. Use tools/dfu-util or make run
to download. This project was tested on the C8051F320 microcontroller, but can be used on any C8051F32x/F34x MCUs.