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.
7 Once that bridge is setup, launch simduino:
10 Starting atmega328 - flashend 7fff ramend 08ff e2end 03ff
12 read_ihex_file: ATmegaBOOT_168_atmega328.ihex, unsupported check type 03
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
20 What that is done, you have a few seconds to program it:
22 % avrdude -p m328p -c arduino -P /tmp/simavr-uart0 -U flash:w:atmega328p_dummy_blinky.hex
24 avrdude: AVR device initialized and ready to accept instructions
26 Reading | ################################################## | 100% 0.01s
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.
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):
36 Writing | ################################################## | 100% 0.15s
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:
45 Reading | ################################################## | 100% 0.13s
47 avrdude: verifying ...
48 avrdude: 394 bytes of flash verified
50 avrdude: safemode: Fuses OK
52 avrdude done. Thank you.
54 simduino will display that:
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)
65 And then jump to the program that was programmed. The example doesn't do anything useful, it's
68 Michel Pollet <buserror@gmail.com>