Welcome. Please log in or register.

kiloboot tftp update eeprom
mj Posted: 16 May 2020, 11:05 AM

Posts: 1
Joined: 15-March 20
I'm really impressed with what you've done.
I hope to have those skills in future ;-)

Meanwhile I'm trying to use kiloboot at home with two network cards, so I took the "Custom MAC address and Bootskip" branch from Github.

Idea 1)
My question is, is there a way to update thru TFTP program.bin and also to change IPs in EEPROM at once?

As I designed hardware reboot of 328p, I was thinking about switching upgrading program.bin to upgrade EEPROM memory and reboot.
And after this reboot, kiloboot will read changed IPs and update program.bin again, back to it's operational version.
Any other ideas?

Idea 2)
If I had a 10 cards with different MAC addresses and I would like to update specific one.
Would it be possible for kiloboot to ask for {last_three_bytes_of_mac_address}.bin file instead of program.bin?

I had a problem with upgrading (at the beginning) by dropping house fuse and both chips were updated at once, which was a problem.
That's the question origin.

Last edit by mj at 16 May 2020, 11:05 AM

mit Posted: 17 May 2020, 02:05 PM
yeah whatever

Posts: 253
Joined: 4-May 16

I think the easiest solution is to forget the EEPROM and use different hex files for different boards. You could use a makefile to generate a list of hex files, each with a different IP, different MAC address and a different filename. It's possible to pass preprocessor definitions to the assembler on the command line, something like

 avrasm2 -DmyIP=192,168,1,22 -fI -o "kiloboot.hex" kiloboot.asm 

Of course you need to then remove the definitions from the source file, so it doesn't get overwritten. I haven't tried this, but from a quick look, passing the filename will take some care as it needs quotes, and the .equ for the MAC address will need to be replaced with #define. But it shouldn't be too tricky.


Sign in to post a reply.