View Issue Details

IDProjectCategoryView StatusLast Update
0036659FPCCompilerpublic2020-02-05 20:53
ReporterChristo Crause Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0036659: AVR [patch] Board aliases to to onboard controllers
DescriptionSome controller boards popular with hobbyists (e.g. Arduino series) are sometimes better known by their brand name and not by the contoller itself. It may help beginners to get running in FPC if they can reference the board name as an alias for the controller name.

Other developer boards (such as Xplained Pro series from Micropchip) have specific pin groups connected to headers. It is may be beneficial if a library can make use of the board ID to preconfigure these pin groups.

Attached please find a patch that declare aliases for a few of these boards.
TagsNo tags attached.
Fixed in Revision44111
FPCOldBugId
FPCTarget-
Attached Files

Activities

Christo Crause

2020-02-04 20:45

reporter  

boardaliases.patch (3,702 bytes)   
Index: compiler/avr/cpuinfo.pas
===================================================================
--- compiler/avr/cpuinfo.pas	(revision 44104)
+++ compiler/avr/cpuinfo.pas	(working copy)
@@ -242,7 +242,19 @@
       ct_attiny3216,
       ct_attiny3217,
       ct_attiny102,
-      ct_attiny104
+      ct_attiny104,
+      // Controller board aliases
+      ct_arduinoleonardo,
+      ct_arduinomega,
+      ct_arduinomicro,
+      ct_arduinonano,
+      ct_arduinonanoevery,
+      ct_arduinouno,
+      ct_atmega324xpro,
+      ct_atmega1284pxplained,
+      ct_atmega4809xpro,
+      ct_attiny817xpro,
+      ct_attiny3217xpro
      );
 
    tcontrollerdatatype = record
@@ -506,6 +518,18 @@
         ,(controllertypestr:'ATTINY3217'; controllerunitstr:'ATTINY3217'; cputype: cpu_avrxmega3; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:14336; sramsize:2048; eeprombase:5120; eepromsize:256)
         ,(controllertypestr:'ATTINY102'; controllerunitstr:'ATTINY102'; cputype: cpu_avrtiny; fputype:fpu_soft; flashbase:0; flashsize:1024; srambase:64; sramsize:32; eeprombase:0; eepromsize:0)
         ,(controllertypestr:'ATTINY104'; controllerunitstr:'ATTINY104'; cputype: cpu_avrtiny; fputype:fpu_soft; flashbase:0; flashsize:1024; srambase:64; sramsize:32; eeprombase:0; eepromsize:0)
+        // Controller board aliases
+        ,(controllertypestr:'ARDUINOLEONARDO'; controllerunitstr:'ATMEGA32U4'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2560; eeprombase:0; eepromsize:1024)
+        ,(controllertypestr:'ARDUINOMEGA'; controllerunitstr:'ATMEGA2560'; cputype: cpu_avr6; fputype:fpu_soft; flashbase:0; flashsize:262144; srambase:512; sramsize:8192; eeprombase:0; eepromsize:4096)
+        ,(controllertypestr:'ARDUINOMICRO'; controllerunitstr:'ATMEGA32U4'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2560; eeprombase:0; eepromsize:1024)
+        ,(controllertypestr:'ARDUINONANO'; controllerunitstr:'ATMEGA328P'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2048; eeprombase:0; eepromsize:1024)
+        ,(controllertypestr:'ARDUINONANOEVERY'; controllerunitstr:'ATMEGA4809'; cputype: cpu_avrxmega3; fputype:fpu_soft; flashbase:0; flashsize:49152; srambase:10240; sramsize:6144; eeprombase:5120; eepromsize:256)
+        ,(controllertypestr:'ARDUINOUNO'; controllerunitstr:'ATMEGA328P'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2048; eeprombase:0; eepromsize:1024)
+        ,(controllertypestr:'ATMEGA324XPRO'; controllerunitstr:'ATMEGA324P'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2048; eeprombase:0; eepromsize:1024)
+        ,(controllertypestr:'ATMEGA1284PXPLAINED'; controllerunitstr:'ATMEGA1284P'; cputype: cpu_avr51; fputype:fpu_soft; flashbase:0; flashsize:131072; srambase:256; sramsize:16384; eeprombase:0; eepromsize:4096)
+        ,(controllertypestr:'ATMEGA4809XPRO'; controllerunitstr:'ATMEGA4809'; cputype: cpu_avrxmega3; fputype:fpu_soft; flashbase:0; flashsize:49152; srambase:10240; sramsize:6144; eeprombase:5120; eepromsize:256)
+        ,(controllertypestr:'ATTINY817XPRO'; controllerunitstr:'ATTINY817'; cputype: cpu_avrxmega3; fputype:fpu_soft; flashbase:0; flashsize:8192; srambase:15872; sramsize:512; eeprombase:5120; eepromsize:128)
+        ,(controllertypestr:'ATTINY3217XPRO'; controllerunitstr:'ATTINY3217'; cputype: cpu_avrxmega3; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:14336; sramsize:2048; eeprombase:5120; eepromsize:256)
    );
 
    { Supported optimizations, only used for information }
boardaliases.patch (3,702 bytes)   

Florian

2020-02-04 22:14

administrator   ~0120889

Thanks, applied.

Christo Crause

2020-02-05 20:53

reporter   ~0120893

Thank you.

Issue History

Date Modified Username Field Change
2020-02-04 20:45 Christo Crause New Issue
2020-02-04 20:45 Christo Crause File Added: boardaliases.patch
2020-02-04 22:14 Florian Assigned To => Florian
2020-02-04 22:14 Florian Status new => resolved
2020-02-04 22:14 Florian Resolution open => fixed
2020-02-04 22:14 Florian Fixed in Version => 3.3.1
2020-02-04 22:14 Florian Fixed in Revision => 44111
2020-02-04 22:14 Florian FPCTarget => -
2020-02-04 22:14 Florian Note Added: 0120889
2020-02-05 20:53 Christo Crause Status resolved => closed
2020-02-05 20:53 Christo Crause Note Added: 0120893