public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] avr: Add support AVR-DA and DB series devices
@ 2022-04-01 15:20 Joel Holdsworth
  2022-04-01 15:20 ` [PATCH 1/2] avr: Added AVR-DA and DB MCU series Joel Holdsworth
  2022-04-01 15:20 ` [PATCH 2/2] avr: Removed errant control characters Joel Holdsworth
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Holdsworth @ 2022-04-01 15:20 UTC (permalink / raw)
  To: gcc-patches
  Cc: Denis Chertykov, Georg-Johann Lay, Jakub Jelinek, Joern Rennecke,
	Joseph Myers, Martin Liska, Matwey V . Kornilov,
	Pitchumani Sivanupandi, Richard Sandiford,
	Senthil Kumar Selvaraj, Sivanupandi Pitchumani, Joel Holdsworth

In 2021, Microchip launched two new series of AVR microcontrollers:
AVR-DA and AVR-DB. This patch-set contains patches to add support for
the full set of both series of devices, by listing the memory layouts in
avr-mcus.def.

There is an open GitHub Pull Request to add support for these devices to
avr-libc here: https://github.com/avrdudes/avr-libc/pull/881

In addition, this patch-set includes a patch to remove non-printable
characters from avr-devices.cc.

Joel Holdsworth (2):
  avr: Added AVR-DA and DB MCU series
  avr: Removed errant control characters

 gcc/config/avr/avr-devices.cc        |  2 --
 gcc/config/avr/avr-mcus.def          | 22 ++++++++++++++++++++++
 gcc/config/avr/gen-avr-mmcu-specs.cc |  2 +-
 gcc/config/avr/gen-avr-mmcu-texi.cc  |  2 +-
 gcc/doc/avr-mmcu.texi                |  6 +++---
 5 files changed, 27 insertions(+), 7 deletions(-)

-- 
2.35.GIT


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] avr: Added AVR-DA and DB MCU series
  2022-04-01 15:20 [PATCH 0/2] avr: Add support AVR-DA and DB series devices Joel Holdsworth
@ 2022-04-01 15:20 ` Joel Holdsworth
  2022-05-28 19:18   ` Jeff Law
  2022-04-01 15:20 ` [PATCH 2/2] avr: Removed errant control characters Joel Holdsworth
  1 sibling, 1 reply; 5+ messages in thread
From: Joel Holdsworth @ 2022-04-01 15:20 UTC (permalink / raw)
  To: gcc-patches
  Cc: Denis Chertykov, Georg-Johann Lay, Jakub Jelinek, Joern Rennecke,
	Joseph Myers, Martin Liska, Matwey V . Kornilov,
	Pitchumani Sivanupandi, Richard Sandiford,
	Senthil Kumar Selvaraj, Sivanupandi Pitchumani, Joel Holdsworth

gcc/
        * config/avr/avr-mcus.def: Add device definitions.
        * doc/avr-mmcu.texi: Corresponding changes.
        * gcc/config/avr/gen-avr-mmcu-texi.c: Added support for avr
          device prefix.
        * gcc/config/avr/gen-avr-mmcu-specs.c: Prevent -mmcu=avr* flags
          from leaking into cc1.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
---
 gcc/config/avr/avr-mcus.def          | 22 ++++++++++++++++++++++
 gcc/config/avr/gen-avr-mmcu-specs.cc |  2 +-
 gcc/config/avr/gen-avr-mmcu-texi.cc  |  2 +-
 gcc/doc/avr-mmcu.texi                |  6 +++---
 4 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index 1e12ab30170..fa5e6685227 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -306,6 +306,14 @@ AVR_MCU ("atxmega16c4",      ARCH_AVRXMEGA2, AVR_ISA_RMW,  "__AVR_ATxmega16C4__"
 AVR_MCU ("atxmega32a4u",     ARCH_AVRXMEGA2, AVR_ISA_RMW,  "__AVR_ATxmega32A4U__", 0x2000, 0x0, 0x9000, 0)
 AVR_MCU ("atxmega32c4",      ARCH_AVRXMEGA2, AVR_ISA_RMW,  "__AVR_ATxmega32C4__",  0x2000, 0x0, 0x9000, 0)
 AVR_MCU ("atxmega32e5",      ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32E5__",  0x2000, 0x0, 0x9000, 0)
+AVR_MCU ("avr64da28",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DA28__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64da32",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DA32__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64da48",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DA48__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64da64",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DA64__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64db28",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DB28__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64db32",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DB32__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64db48",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DB48__",    0x6000, 0x0, 0x8000, 0x10000)
+AVR_MCU ("avr64db64",        ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_AVR64DB64__",    0x6000, 0x0, 0x8000, 0x10000)
 /* Xmega, Flash + RAM < 64K, flash visible in RAM address space */
 AVR_MCU ("avrxmega3",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  NULL,                  0x3f00, 0x0, 0x8000, 0)
 AVR_MCU ("attiny202",        ARCH_AVRXMEGA3, AVR_ISA_RCALL, "__AVR_ATtiny202__",   0x3f80, 0x0, 0x800,  0x8000)
@@ -342,6 +350,12 @@ AVR_MCU ("atmega3208",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_ATmega3208__"
 AVR_MCU ("atmega3209",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_ATmega3209__",  0x3800, 0x0, 0x8000, 0x4000)
 AVR_MCU ("atmega4808",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_ATmega4808__",  0x2800, 0x0, 0xc000, 0x4000)
 AVR_MCU ("atmega4809",       ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_ATmega4809__",  0x2800, 0x0, 0xc000, 0x4000)
+AVR_MCU ("avr32da28",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DA28__",   0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32da32",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DA32__",   0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32da48",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DA48__",   0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32db28",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DB28__",   0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32db32",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DB32__",   0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32db48",        ARCH_AVRXMEGA3, AVR_ISA_NONE,  "__AVR_AVR32DB48__",   0x7000, 0x0, 0x8000, 0x8000)
 /* Xmega, 64K < Flash <= 128K, RAM <= 64K */
 AVR_MCU ("avrxmega4",        ARCH_AVRXMEGA4, AVR_ISA_NONE, NULL,                   0x2000, 0x0, 0x11000, 0)
 AVR_MCU ("atxmega64a3",      ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64A3__",  0x2000, 0x0, 0x11000, 0)
@@ -352,6 +366,14 @@ AVR_MCU ("atxmega64b1",      ARCH_AVRXMEGA4, AVR_ISA_RMW,  "__AVR_ATxmega64B1__"
 AVR_MCU ("atxmega64b3",      ARCH_AVRXMEGA4, AVR_ISA_RMW,  "__AVR_ATxmega64B3__",  0x2000, 0x0, 0x11000, 0)
 AVR_MCU ("atxmega64c3",      ARCH_AVRXMEGA4, AVR_ISA_RMW,  "__AVR_ATxmega64C3__",  0x2000, 0x0, 0x11000, 0)
 AVR_MCU ("atxmega64d4",      ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64D4__",  0x2000, 0x0, 0x11000, 0)
+AVR_MCU ("avr128da28",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DA28__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128da32",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DA32__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128da48",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DA48__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128da64",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DA64__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128db28",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DB28__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128db32",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DB32__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128db48",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DB48__",   0x4000, 0x0, 0x8000,  0x20000)
+AVR_MCU ("avr128db64",       ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_AVR128DB64__",   0x4000, 0x0, 0x8000,  0x20000)
 /* Xmega, 64K < Flash <= 128K, RAM > 64K */
 AVR_MCU ("avrxmega5",        ARCH_AVRXMEGA5, AVR_ISA_NONE, NULL,                   0x2000, 0x0, 0x11000, 0)
 AVR_MCU ("atxmega64a1",      ARCH_AVRXMEGA5, AVR_ISA_NONE, "__AVR_ATxmega64A1__",  0x2000, 0x0, 0x11000, 0)
diff --git a/gcc/config/avr/gen-avr-mmcu-specs.cc b/gcc/config/avr/gen-avr-mmcu-specs.cc
index bf9aa2c46e2..1b75e05ade0 100644
--- a/gcc/config/avr/gen-avr-mmcu-specs.cc
+++ b/gcc/config/avr/gen-avr-mmcu-specs.cc
@@ -279,7 +279,7 @@ print_mcu (const avr_mcu_t *mcu)
   if (is_device)
     {
       fprintf (f, "*self_spec:\n");
-      fprintf (f, "\t%%{!mmcu=avr*: %%<mmcu=* -mmcu=%s} ", arch->name);
+      fprintf (f, "\t%%<mmcu=* -mmcu=%s ", arch->name);
       fprintf (f, "%s ", rcall_spec);
       fprintf (f, "%s\n\n", sp8_spec);
 
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-texi.cc
index d9c3a30877d..b1f12f5e562 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-texi.cc
@@ -53,7 +53,7 @@ c_prefix (const char *str)
 {
   static const char *const prefixes[] =
     {
-      "attiny", "atmega", "atxmega", "ata", "at90"
+      "attiny", "atmega", "atxmega", "ata", "at90", "avr"
     };
 
   int i, n = (int) (sizeof (prefixes) / sizeof (*prefixes));
diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi
index 8c09f08e53c..c3e9817928a 100644
--- a/gcc/doc/avr-mmcu.texi
+++ b/gcc/doc/avr-mmcu.texi
@@ -50,15 +50,15 @@
 
 @item avrxmega2
 ``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}.
+@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}, @code{avr64da28}, @code{avr64da32}, @code{avr64da48}, @code{avr64da64}, @code{avr64db28}, @code{avr64db32}, @code{avr64db48}, @code{avr64db64}.
 
 @item avrxmega3
 ``XMEGA'' devices with up to 64@tie{}KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
-@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny417}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}.
+@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny417}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}, @code{avr32da28}, @code{avr32da32}, @code{avr32da48}, @code{avr32db28}, @code{avr32db32}, @code{avr32db48}.
 
 @item avrxmega4
 ``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64a3u}, @code{atxmega64a4u}, @code{atxmega64b1}, @code{atxmega64b3}, @code{atxmega64c3}, @code{atxmega64d3}, @code{atxmega64d4}.
+@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64a3u}, @code{atxmega64a4u}, @code{atxmega64b1}, @code{atxmega64b3}, @code{atxmega64c3}, @code{atxmega64d3}, @code{atxmega64d4}, @code{avr128da28}, @code{avr128da32}, @code{avr128da48}, @code{avr128da64}, @code{avr128db28}, @code{avr128db32}, @code{avr128db48}, @code{avr128db64}.
 
 @item avrxmega5
 ``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-- 
2.35.GIT


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] avr: Removed errant control characters
  2022-04-01 15:20 [PATCH 0/2] avr: Add support AVR-DA and DB series devices Joel Holdsworth
  2022-04-01 15:20 ` [PATCH 1/2] avr: Added AVR-DA and DB MCU series Joel Holdsworth
@ 2022-04-01 15:20 ` Joel Holdsworth
  2022-05-28 19:08   ` Jeff Law
  1 sibling, 1 reply; 5+ messages in thread
From: Joel Holdsworth @ 2022-04-01 15:20 UTC (permalink / raw)
  To: gcc-patches
  Cc: Denis Chertykov, Georg-Johann Lay, Jakub Jelinek, Joern Rennecke,
	Joseph Myers, Martin Liska, Matwey V . Kornilov,
	Pitchumani Sivanupandi, Richard Sandiford,
	Senthil Kumar Selvaraj, Sivanupandi Pitchumani, Joel Holdsworth

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
---
 gcc/config/avr/avr-devices.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index aa284217f50..ff6a5441b77 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -126,8 +126,6 @@ avr_mcu_types[] =
 };
 
 
-\f
-
 #ifndef IN_GEN_AVR_MMCU_TEXI
 
 static char*
-- 
2.35.GIT


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] avr: Removed errant control characters
  2022-04-01 15:20 ` [PATCH 2/2] avr: Removed errant control characters Joel Holdsworth
@ 2022-05-28 19:08   ` Jeff Law
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Law @ 2022-05-28 19:08 UTC (permalink / raw)
  To: gcc-patches



On 4/1/2022 9:20 AM, Joel Holdsworth via Gcc-patches wrote:
> Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
> ---
>   gcc/config/avr/avr-devices.cc | 2 --
>   1 file changed, 2 deletions(-)
These aren't really errant.  There was a time when these form feeds were 
actually encouraged and you'll find them all over the place in GCC.

I'd just assume remove them all at this point, but I think that would 
need broader consensus.

jeff


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] avr: Added AVR-DA and DB MCU series
  2022-04-01 15:20 ` [PATCH 1/2] avr: Added AVR-DA and DB MCU series Joel Holdsworth
@ 2022-05-28 19:18   ` Jeff Law
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Law @ 2022-05-28 19:18 UTC (permalink / raw)
  To: gcc-patches



On 4/1/2022 9:20 AM, Joel Holdsworth via Gcc-patches wrote:
> gcc/
>          * config/avr/avr-mcus.def: Add device definitions.
>          * doc/avr-mmcu.texi: Corresponding changes.
>          * gcc/config/avr/gen-avr-mmcu-texi.c: Added support for avr
>            device prefix.
>          * gcc/config/avr/gen-avr-mmcu-specs.c: Prevent -mmcu=avr* flags
>            from leaking into cc1.
I fixed a few trivial issues with the ChangeLog and pushed this patch to 
the trunk.
jeff


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-28 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 15:20 [PATCH 0/2] avr: Add support AVR-DA and DB series devices Joel Holdsworth
2022-04-01 15:20 ` [PATCH 1/2] avr: Added AVR-DA and DB MCU series Joel Holdsworth
2022-05-28 19:18   ` Jeff Law
2022-04-01 15:20 ` [PATCH 2/2] avr: Removed errant control characters Joel Holdsworth
2022-05-28 19:08   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).