On 12/21/19 2:02 AM, Philippe Mathieu-Daudé wrote:
Add some microcontrollers from the megaAVR family (ATmega series):
- middle range: ATmega168 and ATmega328
- high range: ATmega1280 and ATmega2560
For product comparison:
https://www.microchip.com/wwwproducts/ProductCompare/ATmega168P/ATmega328P
https://www.microchip.com/wwwproducts/ProductCompare/ATmega1280/ATmega2560
Datasheets:
http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
---
v2:
- Reword description adding more information (Aleksandar)
- Use DEFINE_TYPES and memory_region_init_ram (Igor)
Cc: Igor Mammedov <imamm...@redhat.com>
---
hw/avr/atmega.h | 48 +++++
hw/avr/atmega.c | 460 +++++++++++++++++++++++++++++++++++++++++++
hw/avr/Makefile.objs | 1 +
3 files changed, 509 insertions(+)
create mode 100644 hw/avr/atmega.h
create mode 100644 hw/avr/atmega.c
[...]
diff --git a/hw/avr/Makefile.objs b/hw/avr/Makefile.objs
index 626b7064b3..4b6b911820 100644
--- a/hw/avr/Makefile.objs
+++ b/hw/avr/Makefile.objs
@@ -1 +1,2 @@
obj-y += sample.o
+obj-y += atmega.o
Should this have a proper Kconfig entry, and in next patch Arduino
selects it? Probably cleaner and in match with other archs.