Skip to content

Commit b99175a

Browse files
aykevldeadprogram
authored andcommitted
avr: configure emulator in board files
Instead of specifying the emulator command in atmega328p.json, specify it in the two boards based on it (arduino and arduino-nano). This makes the configuration consistent with the machine package, which only defines the CPUFrequency function in the board files (and not in machine_atmega328p.json).
1 parent de3ffe0 commit b99175a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

targets/arduino-nano.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"-Wl,--defsym=_bootloader_size=512",
66
"-Wl,--defsym=_stack_size=512"
77
],
8-
"flash-command": "avrdude -c arduino -p atmega328p -b 57600 -P {port} -U flash:w:{hex}:i"
8+
"flash-command": "avrdude -c arduino -p atmega328p -b 57600 -P {port} -U flash:w:{hex}:i",
9+
"emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"]
910
}

targets/arduino.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"-Wl,--defsym=_bootloader_size=512",
66
"-Wl,--defsym=_stack_size=512"
77
],
8-
"flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i"
8+
"flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i",
9+
"emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"]
910
}

targets/atmega328p.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
"extra-files": [
1313
"targets/avr.S",
1414
"src/device/avr/atmega328p.s"
15-
],
16-
"emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"]
15+
]
1716
}

0 commit comments

Comments
 (0)