HWA
Bare metal programming with style
|
Diabolo is a bootloader developed using HWA for assembler programming for the device side, and Python for the host application.
The source code of Diabolo is in the atmel/avr/examples/diabolo/
directory.
In order to install Diabolo on the microcontroller, you must edit the file device/diabolo.sx
to either include a preconfigured target definition or define the following symbols:
Optionnally, you can also define additionnal fuses:
Then, you must include the HWA header that suits your target:
If you have avrdude
installed on your system and your ISP is usbasp
you just have to wire the target device to your programmer and that will program the Flash memory and the fuse bytes:
make install
Otherwise, you'll have to edit the device/Makefile
to suit your programming tools.
Once you have installed Diabolo on your microcontroller, you can check that everything works with the software/diabolo.py
application.
Assuming you have only one USB-Serial adapter, that should display the status of your device:
python diabolo.py
and that should dump the program memory entirely:
python diabolo.py --read-flash --full --hexdump
Type python diabolo.py --help
for a description of the command line arguments.
Diabolo launches the application by jumping to the address the immediately follows the interrupt vectors. That fails if the application uses PROGMEM data and GCC stores it at that address.