simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add support for atmega328p


From: Hu Jialun
Subject: [PATCH] Add support for atmega328p
Date: Thu, 16 Sep 2021 11:17:35 +0800

ATmega328P and ATmega328 has very minor differences and can be used
interchangeably in the simulator.
https://rajeshkovvuri.wordpress.com/2011/11/01/atmega328p-and-atmega328-what-is-the-difference/
---
 libsim/atmega668base.cpp | 1 +
 libsim/avrsignature.cpp  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libsim/atmega668base.cpp b/libsim/atmega668base.cpp
index 06dc1e4..0ac92ed 100644
--- a/libsim/atmega668base.cpp
+++ b/libsim/atmega668base.cpp
@@ -34,6 +34,7 @@ AVR_REGISTER(atmega48, AvrDevice_atmega48)
 AVR_REGISTER(atmega88, AvrDevice_atmega88)
 AVR_REGISTER(atmega168, AvrDevice_atmega168)
 AVR_REGISTER(atmega328, AvrDevice_atmega328)
+AVR_REGISTER(atmega328P, AvrDevice_atmega328)
 
 AvrDevice_atmega668base::~AvrDevice_atmega668base() {
     delete usart0;
diff --git a/libsim/avrsignature.cpp b/libsim/avrsignature.cpp
index ce4c192..e13f1a5 100644
--- a/libsim/avrsignature.cpp
+++ b/libsim/avrsignature.cpp
@@ -116,6 +116,7 @@ std::map<unsigned int, std::string> AvrSignatureToNameMap = 
InitMap<unsigned int
         << std::make_pair<unsigned int, std::string>(0x1e9604, "atmega6490")
         << std::make_pair<unsigned int, std::string>(0x1e9503, "atmega329")
         << std::make_pair<unsigned int, std::string>(0x1e9514, "atmega328")
+        << std::make_pair<unsigned int, std::string>(0x1e950f, "atmega328p")
         << std::make_pair<unsigned int, std::string>(0x1e9505, "atmega325")
         << std::make_pair<unsigned int, std::string>(0x1e9702, "atmega128")
         << std::make_pair<unsigned int, std::string>(0x1e9442, "atxmega16d4")
-- 
2.33.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]