From b99175a4361b83045d6fbe5d97931d9b488d8614 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sun, 6 Sep 2020 18:33:56 +0200 Subject: [PATCH] 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). --- targets/arduino-nano.json | 3 ++- targets/arduino.json | 3 ++- targets/atmega328p.json | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/targets/arduino-nano.json b/targets/arduino-nano.json index b1f278094..9f3a3b9fd 100644 --- a/targets/arduino-nano.json +++ b/targets/arduino-nano.json @@ -5,5 +5,6 @@ "-Wl,--defsym=_bootloader_size=512", "-Wl,--defsym=_stack_size=512" ], - "flash-command": "avrdude -c arduino -p atmega328p -b 57600 -P {port} -U flash:w:{hex}:i" + "flash-command": "avrdude -c arduino -p atmega328p -b 57600 -P {port} -U flash:w:{hex}:i", + "emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"] } diff --git a/targets/arduino.json b/targets/arduino.json index fbbca7a8f..ebe8af51f 100644 --- a/targets/arduino.json +++ b/targets/arduino.json @@ -5,5 +5,6 @@ "-Wl,--defsym=_bootloader_size=512", "-Wl,--defsym=_stack_size=512" ], - "flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i" + "flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i", + "emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"] } diff --git a/targets/atmega328p.json b/targets/atmega328p.json index 181da6938..7a10eceba 100644 --- a/targets/atmega328p.json +++ b/targets/atmega328p.json @@ -12,6 +12,5 @@ "extra-files": [ "targets/avr.S", "src/device/avr/atmega328p.s" - ], - "emulator": ["simavr", "-m", "atmega328p", "-f", "16000000"] + ] }