瀏覽代碼

* patch by Christo Crause: avrtiny26 controller is not subarch avr25 but avr2, resolves #36620

git-svn-id: trunk@44021 -
florian 5 年之前
父節點
當前提交
d2a059bd02
共有 3 個文件被更改,包括 15 次插入7 次删除
  1. 2 2
      compiler/avr/cpuinfo.pas
  2. 8 4
      rtl/embedded/Makefile
  3. 5 1
      rtl/embedded/Makefile.fpc

+ 2 - 2
compiler/avr/cpuinfo.pas

@@ -289,7 +289,7 @@ Const
         ,(controllertypestr:'ATTINY44A'; controllerunitstr:'ATTINY44A'; cputype: cpu_avr25; fputype:fpu_soft; flashbase:0; flashsize:4096; srambase:96; sramsize:256; eeprombase:0; eepromsize:256)
         ,(controllertypestr:'ATTINY44A'; controllerunitstr:'ATTINY44A'; cputype: cpu_avr25; fputype:fpu_soft; flashbase:0; flashsize:4096; srambase:96; sramsize:256; eeprombase:0; eepromsize:256)
         ,(controllertypestr:'ATMEGA649A'; controllerunitstr:'ATMEGA649A'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:65536; srambase:256; sramsize:4096; eeprombase:0; eepromsize:2048)
         ,(controllertypestr:'ATMEGA649A'; controllerunitstr:'ATMEGA649A'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:65536; srambase:256; sramsize:4096; eeprombase:0; eepromsize:2048)
         ,(controllertypestr:'ATMEGA32U4'; controllerunitstr:'ATMEGA32U4'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2560; eeprombase:0; eepromsize:1024)
         ,(controllertypestr:'ATMEGA32U4'; controllerunitstr:'ATMEGA32U4'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:32768; srambase:256; sramsize:2560; eeprombase:0; eepromsize:1024)
-        ,(controllertypestr:'ATTINY26'; controllerunitstr:'ATTINY26'; cputype: cpu_avr25; fputype:fpu_soft; flashbase:0; flashsize:2048; srambase:96; sramsize:128; eeprombase:0; eepromsize:128)
+        ,(controllertypestr:'ATTINY26'; controllerunitstr:'ATTINY26'; cputype: cpu_avr2; fputype:fpu_soft; flashbase:0; flashsize:2048; srambase:96; sramsize:128; eeprombase:0; eepromsize:128)
         ,(controllertypestr:'AT90USB1287'; controllerunitstr:'AT90USB1287'; cputype: cpu_avr51; fputype:fpu_soft; flashbase:0; flashsize:131072; srambase:256; sramsize:8192; eeprombase:0; eepromsize:4096)
         ,(controllertypestr:'AT90USB1287'; controllerunitstr:'AT90USB1287'; cputype: cpu_avr51; fputype:fpu_soft; flashbase:0; flashsize:131072; srambase:256; sramsize:8192; eeprombase:0; eepromsize:4096)
         ,(controllertypestr:'AT90PWM161'; controllerunitstr:'AT90PWM161'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:16384; srambase:256; sramsize:1024; eeprombase:0; eepromsize:512)
         ,(controllertypestr:'AT90PWM161'; controllerunitstr:'AT90PWM161'; cputype: cpu_avr5; fputype:fpu_soft; flashbase:0; flashsize:16384; srambase:256; sramsize:1024; eeprombase:0; eepromsize:512)
         ,(controllertypestr:'ATTINY48'; controllerunitstr:'ATTINY48'; cputype: cpu_avr25; fputype:fpu_soft; flashbase:0; flashsize:4096; srambase:256; sramsize:256; eeprombase:0; eepromsize:64)
         ,(controllertypestr:'ATTINY48'; controllerunitstr:'ATTINY48'; cputype: cpu_avr25; fputype:fpu_soft; flashbase:0; flashsize:4096; srambase:256; sramsize:256; eeprombase:0; eepromsize:64)
@@ -464,7 +464,7 @@ Const
      ( { cpu_none    } [],
      ( { cpu_none    } [],
        { cpu_avrtiny } [CPUAVR_16_REGS,CPUAVR_2_BYTE_PC],
        { cpu_avrtiny } [CPUAVR_16_REGS,CPUAVR_2_BYTE_PC],
        { cpu_avr1    } [CPUAVR_2_BYTE_PC],
        { cpu_avr1    } [CPUAVR_2_BYTE_PC],
-       { cpu_avr2    } [CPUAVR_2_BYTE_PC],
+       { cpu_avr2    } [CPUAVR_HAS_LPMX,CPUAVR_2_BYTE_PC],
        { cpu_avr25   } [CPUAVR_HAS_MOVW,CPUAVR_HAS_LPMX,CPUAVR_2_BYTE_PC],
        { cpu_avr25   } [CPUAVR_HAS_MOVW,CPUAVR_HAS_LPMX,CPUAVR_2_BYTE_PC],
        { cpu_avr3    } [CPUAVR_HAS_JMP_CALL,CPUAVR_2_BYTE_PC],
        { cpu_avr3    } [CPUAVR_HAS_JMP_CALL,CPUAVR_2_BYTE_PC],
        { cpu_avr31   } [CPUAVR_HAS_JMP_CALL,CPUAVR_HAS_RAMPZ,CPUAVR_HAS_ELPM,CPUAVR_2_BYTE_PC],
        { cpu_avr31   } [CPUAVR_HAS_JMP_CALL,CPUAVR_HAS_RAMPZ,CPUAVR_HAS_ELPM,CPUAVR_2_BYTE_PC],

+ 8 - 4
rtl/embedded/Makefile

@@ -389,11 +389,15 @@ ifeq ($(SUBARCH),avrtiny)
 CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40
 CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40
 CPU_UNITS_DEFINED=1
 CPU_UNITS_DEFINED=1
 endif
 endif
+ifeq ($(SUBARCH),avr2)
+CPU_UNITS=attiny26
+CPU_UNITS_DEFINED=1
+endif
 ifeq ($(SUBARCH),avr25)
 ifeq ($(SUBARCH),avr25)
-CPU_UNITS=attiny44a attiny26 attiny48 attiny84a attiny2313 attiny461 attiny43u \
-          attiny24a attiny88 attiny861 attiny85 attiny24 \
-          attiny87 attiny84 attiny13a attiny45 attiny828 attiny4313 attiny13 attiny261 \
-          attiny861a attiny28 attiny44 attiny2313a attiny461a attiny261a attiny25
+CPU_UNITS=attiny44a attiny48 attiny84a attiny2313 attiny461 attiny43u \
+	  attiny24a attiny88 attiny861 attiny85 attiny24 \
+	  attiny87 attiny84 attiny13a attiny45 attiny828 attiny4313 attiny13 attiny261 \
+	  attiny861a attiny28 attiny44 attiny2313a attiny461a attiny261a attiny25
 CPU_UNITS_DEFINED=1
 CPU_UNITS_DEFINED=1
 endif
 endif
 ifeq ($(SUBARCH),avr35)
 ifeq ($(SUBARCH),avr35)

+ 5 - 1
rtl/embedded/Makefile.fpc

@@ -105,8 +105,12 @@ ifeq ($(SUBARCH),avrtiny)
 CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40
 CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40
 CPU_UNITS_DEFINED=1
 CPU_UNITS_DEFINED=1
 endif
 endif
+ifeq ($(SUBARCH),avr2)
+CPU_UNITS=attiny26
+CPU_UNITS_DEFINED=1
+endif
 ifeq ($(SUBARCH),avr25)
 ifeq ($(SUBARCH),avr25)
-CPU_UNITS=attiny44a attiny26 attiny48 attiny84a attiny2313 attiny461 attiny43u \
+CPU_UNITS=attiny44a attiny48 attiny84a attiny2313 attiny461 attiny43u \
           attiny24a attiny88 attiny861 attiny85 attiny24 \
           attiny24a attiny88 attiny861 attiny85 attiny24 \
           attiny87 attiny84 attiny13a attiny45 attiny828 attiny4313 attiny13 attiny261 \
           attiny87 attiny84 attiny13a attiny45 attiny828 attiny4313 attiny13 attiny261 \
           attiny861a attiny28 attiny44 attiny2313a attiny461a attiny261a attiny25
           attiny861a attiny28 attiny44 attiny2313a attiny461a attiny261a attiny25