September 15, 2024

Biscotti firmware -- building from source

This proved to be an easy 20 minute job.

I may want to use the "biscotti.hex" file that came along with the sources, but I haven't decided yet.

I copied biscotti.c into its own directory, then alongside of it I copied the five tk-*.c files that it includes, which I found two levels higher in the directory structure.

Then I copied a simple Makefile from the first Lpodkalicki demo and used it as a starting point. I got rid of the C99 option as well as getting rid of setting F_CPU in the Makefile. Then I found I had to change "inline" to "static inline" every place I found it in the source files.

After doing this, I got a clean compile, but it was 18 bytes too big. I commented out all the "STROBE" modes in the code (I never intend to activate them) and then the size was 968 bytes, which fits just fine into the 1024 bytes available.

avr-gcc -Wall -g -Os -mmcu=attiny13 -I. -o biscotti.elf biscotti.c
avr-objcopy -O ihex biscotti.elf biscotti.hex
avr-size -C --mcu=attiny13 biscotti.elf
AVR Memory Usage
----------------
Device: attiny13
Program:     968 bytes (94.5% Full)
(.text + .data + .bootloader)
Data:         16 bytes (25.0% Full)
(.data + .bss + .noinit)
I placed this in /u1/Projects/Convoy/my_biscotti on my computer.
This uses:
avr-gcc --version
avr-gcc (Fedora 14.1.0-1.fc40) 14.1.0
avrdude
avrdude version 8.0, https://github.com/avrdudes/avrdude

Feedback? Questions? Drop me a line!

Tom's Light Info / [email protected]