watchdog: Fix register naming
[simavr] / examples / board_simduino / README
1
2 This will emulate an arduino. Right now it loads the bootloader, then wait on it's "serial port"
3 (a pseudo tty) until someone programs it... eventualy it timesout and run the previous
4 app that was programmed.
5
6
7 Once that bridge is setup, launch simduino:
8
9 % ./simduino
10         Starting atmega328 - flashend 7fff ramend 08ff e2end 03ff
11         atmega328 init
12         read_ihex_file: ATmegaBOOT_168_atmega328.ihex, unsupported check type 03
13         Booloader 7800: 1950
14         uart_pty_init bridge on port *** /dev/pts/11 ***
15         uart_pty_connect: /tmp/simavr-uart0 now points to /dev/pts/11
16         note: export SIMAVR_UART_XTERM=1 and install picocom to get a terminal
17         UART-0 configured to 0010 = 58823 bps (x1), 5 data 1 stop
18         Roughtly 136 usec per bytes
19
20 What that is done, you have a few seconds to program it:
21
22 % avrdude -p m328p -c arduino -P /tmp/simavr-uart0 -U flash:w:atmega328p_dummy_blinky.hex
23
24         avrdude: AVR device initialized and ready to accept instructions
25         
26         Reading | ################################################## | 100% 0.01s
27         
28         avrdude: Device signature = 0x1e950f
29         avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
30                  To disable this feature, specify the -D option.
31         avrdude: erasing chip
32         avrdude: reading input file "atmega328p_dummy_blinky.hex"
33         avrdude: input file atmega328p_dummy_blinky.hex auto detected as Intel Hex
34         avrdude: writing flash (394 bytes):
35         
36         Writing | ################################################## | 100% 0.15s
37         
38         avrdude: 394 bytes of flash written
39         avrdude: verifying flash memory against atmega328p_dummy_blinky.hex:
40         avrdude: load data flash data from input file atmega328p_dummy_blinky.hex:
41         avrdude: input file atmega328p_dummy_blinky.hex auto detected as Intel Hex
42         avrdude: input file atmega328p_dummy_blinky.hex contains 394 bytes
43         avrdude: reading on-chip flash data:
44         
45         Reading | ################################################## | 100% 0.13s
46         
47         avrdude: verifying ...
48         avrdude: 394 bytes of flash verified
49         
50         avrdude: safemode: Fuses OK
51         
52         avrdude done.  Thank you.
53
54 simduino will display that:
55
56         Erasing page 0000 (128)
57         Writing page 0000 (128)
58         Erasing page 0001 (128)
59         Writing page 0001 (128)
60         Erasing page 0002 (128)
61         Writing page 0002 (128)
62         Erasing page 0003 (128)
63         Writing page 0003 (128)
64
65 And then jump to the program that was programmed. The example doesn't do anything useful, it's
66 a placeholder...
67
68 Michel Pollet <buserror@gmail.com>