/
README
73 lines (44 loc) · 2.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
zbusloader v0.02
-------------------
zbusloader is a bootloader application targetted at the Atmel AVR
ATmega8. In theory it should work for other devices but since
it heavily relies on assembler code, especially regarding the
startup code, this probably requires quite some adjustments.
One of the main design goals is to keep the loader small in flash
memory footprint. This is I shouldn't ever be more than 512 bytes long.
a) Using zbusloader
* make sure you've got gcc-avr and avr-libc installed
* edit pinconfig.h to fit your needs
* Type `make' to compile the whole thing.
* If everything goes well, type `make load' to flash the
bootloader code to your device. Maybe you need to modify the
command, i.e. the Makefile.
* In order to adjust the fuse bits of your microcontroller you
might want to use `make fuse'.
In order to flash data, use the zbusloader application from below
contrib. Use it something like
contrib/zbusloader -H 192.168.23.244 -f myfile.bin
where -H specifies the IP address of your (bridging) ethersex.
Don't forget to enable `zbus_raw' on it.
b) Hacking zbusloader (and what hacks I used already)
Just a few notes to get you started in zbusloader hacking:
* zbusloader does NOT rely on avr-libc's standard startup code,
mainly for size reasons. This is
* you must NOT activate any other interrupts, since there is no
intact interrupt vector table
* don't just `sei' if you want to, this reenables the overflow
interrupt of timer 1, see below.
* my startup code does NOT initialize .bss and .data, this is
your global variables will not have the values you expect.
* TIMER 1 OVF interrupt abuse:
The current bootloader timeout implementation works like this:
* We initialize the 16-bit timer in such a way that it overflows
after about 2 seconds. From the interrupt vector we launch
the application
* If we receive a valid bootloading packet we simply disable all
interrupts, therefore the automatic activation of the
application.
If it doesn't work, you might want to write an e-mail to
<ethersex@keyb.de> or <stesie@brokenpipe.de> or <stettberger@dokucode.de>
Have fun!
kiwi, stesie && stettberger