From 4f5b872098d7cc6c6cd0307ae8d9f336762b2677 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 22 Jan 2020 20:41:24 +0000 Subject: [PATCH] * patch by Christo Crause: avrtiny26 controller is not subarch avr25 but avr2, resolves #36620 git-svn-id: trunk@44021 - (cherry picked from commit d2a059bd02887993320d4177bc5502b22f83fd56) --- compiler/avr/cpuinfo.pas | 4 ++-- rtl/embedded/Makefile | 12 ++++++++---- rtl/embedded/Makefile.fpc | 6 +++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/compiler/avr/cpuinfo.pas b/compiler/avr/cpuinfo.pas index 5b53e5be05..a7648ac6b9 100644 --- a/compiler/avr/cpuinfo.pas +++ b/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:'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:'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:'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) @@ -464,7 +464,7 @@ Const ( { cpu_none } [], { cpu_avrtiny } [CPUAVR_16_REGS,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_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], diff --git a/rtl/embedded/Makefile b/rtl/embedded/Makefile index 51cb62bd27..bc71464d0c 100644 --- a/rtl/embedded/Makefile +++ b/rtl/embedded/Makefile @@ -389,11 +389,15 @@ ifeq ($(SUBARCH),avrtiny) CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40 CPU_UNITS_DEFINED=1 endif +ifeq ($(SUBARCH),avr2) +CPU_UNITS=attiny26 +CPU_UNITS_DEFINED=1 +endif 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 endif ifeq ($(SUBARCH),avr35) diff --git a/rtl/embedded/Makefile.fpc b/rtl/embedded/Makefile.fpc index d0c5f25019..edf87b1774 100644 --- a/rtl/embedded/Makefile.fpc +++ b/rtl/embedded/Makefile.fpc @@ -105,8 +105,12 @@ ifeq ($(SUBARCH),avrtiny) CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40 CPU_UNITS_DEFINED=1 endif +ifeq ($(SUBARCH),avr2) +CPU_UNITS=attiny26 +CPU_UNITS_DEFINED=1 +endif 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 \ attiny87 attiny84 attiny13a attiny45 attiny828 attiny4313 attiny13 attiny261 \ attiny861a attiny28 attiny44 attiny2313a attiny461a attiny261a attiny25