Update n_interrupts in avrdude.conf.in and introduce eind

This commit is contained in:
Stefan Rueger 2022-11-27 16:56:49 +00:00
parent 5a0975aee7
commit 58e2bca42c
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
7 changed files with 72 additions and 41 deletions

View File

@ -137,6 +137,7 @@
# rampz = <num> ; # IO addr of RAMPZ reg
# spmcr = <num> ; # mem addr of SPMC[S]R reg
# eecr = <num> ; # mem addr of EECR reg only when != 0x3f
# eind = <num> ; # mem addr of EIND reg
# mcu_base = <num> ;
# nvm_base = <num> ;
# ocd_base = <num> ;
@ -4677,6 +4678,7 @@ part parent "m324p"
desc = "ATmega324PB";
id = "m324pb";
mcuid = 113;
n_interrupts = 51;
signature = 0x1e 0x95 0x17;
;
@ -9436,7 +9438,6 @@ part parent "m1280"
desc = "ATmega1281";
id = "m1281";
mcuid = 139;
n_interrupts = 51;
signature = 0x1e 0x97 0x04;
;
@ -9574,7 +9575,6 @@ part parent "m2560"
desc = "ATmega2561";
id = "m2561";
mcuid = 144;
n_interrupts = 51;
signature = 0x1e 0x98 0x02;
;
@ -10878,6 +10878,7 @@ part
programlockpolltimeout = 5;
spmcr = 0x57;
eecr = 0x3f;
eind = 0x5c;
ocdrev = 1;
chip_erase = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
pgm_enable = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
@ -10968,7 +10969,7 @@ part
id = "usb82";
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
mcuid = 174;
n_interrupts = 58;
n_interrupts = 29;
n_boot_sections = 4;
boot_section_size = 512;
chip_erase_delay = 9000;
@ -11002,6 +11003,7 @@ part
programlockpolltimeout = 5;
spmcr = 0x57;
eecr = 0x3f;
eind = 0x5c;
ocdrev = 1;
chip_erase = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
pgm_enable = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
@ -11126,6 +11128,7 @@ part
programlockpolltimeout = 5;
spmcr = 0x57;
eecr = 0x3f;
eind = 0x5c;
ocdrev = 1;
chip_erase = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
pgm_enable = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
@ -11250,6 +11253,7 @@ part
programlockpolltimeout = 5;
spmcr = 0x57;
eecr = 0x3f;
eind = 0x5c;
ocdrev = 1;
chip_erase = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
pgm_enable = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
@ -11340,7 +11344,7 @@ part
id = "m8u2";
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
mcuid = 48;
n_interrupts = 58;
n_interrupts = 29;
n_boot_sections = 4;
boot_section_size = 512;
chip_erase_delay = 9000;
@ -11374,6 +11378,7 @@ part
programlockpolltimeout = 5;
spmcr = 0x57;
eecr = 0x3f;
eind = 0x5c;
ocdrev = 1;
chip_erase = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
pgm_enable = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
@ -11620,7 +11625,7 @@ part
id = "m325";
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
mcuid = 114;
n_interrupts = 23;
n_interrupts = 22;
n_boot_sections = 4;
boot_section_size = 512;
# stk500_devcode = 0x??; # No STK500v1 support?
@ -11767,7 +11772,6 @@ part parent "m325"
desc = "ATmega325PA";
id = "m325pa";
mcuid = 117;
n_interrupts = 22;
signature = 0x1e 0x95 0x0d;
;
@ -11780,7 +11784,7 @@ part
id = "m645";
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
mcuid = 132;
n_interrupts = 23;
n_interrupts = 22;
n_boot_sections = 4;
boot_section_size = 1024;
# stk500_devcode = 0x??; # No STK500v1 support?
@ -13565,6 +13569,7 @@ part parent ".reduced_core_tiny"
desc = "ATtiny102";
id = "t102";
mcuid = 6;
n_interrupts = 16;
signature = 0x1e 0x90 0x0c;
memory "flash"
@ -13583,6 +13588,7 @@ part parent ".reduced_core_tiny"
desc = "ATtiny104";
id = "t104";
mcuid = 7;
n_interrupts = 16;
signature = 0x1e 0x90 0x0b;
memory "flash"
@ -14531,6 +14537,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny424";
id = "t424";
mcuid = 292;
n_interrupts = 30;
signature = 0x1e 0x92 0x2c;
memory "eeprom"
@ -14556,6 +14563,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny426";
id = "t426";
mcuid = 293;
n_interrupts = 30;
signature = 0x1e 0x92 0x2b;
memory "eeprom"
@ -14581,6 +14589,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny427";
id = "t427";
mcuid = 294;
n_interrupts = 30;
signature = 0x1e 0x92 0x2a;
memory "eeprom"
@ -14606,6 +14615,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny824";
id = "t824";
mcuid = 301;
n_interrupts = 30;
signature = 0x1e 0x93 0x29;
memory "eeprom"
@ -14631,6 +14641,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny826";
id = "t826";
mcuid = 302;
n_interrupts = 30;
signature = 0x1e 0x93 0x28;
memory "eeprom"
@ -14656,6 +14667,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny827";
id = "t827";
mcuid = 303;
n_interrupts = 30;
signature = 0x1e 0x93 0x27;
memory "eeprom"
@ -14681,6 +14693,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny1624";
id = "t1624";
mcuid = 310;
n_interrupts = 30;
signature = 0x1e 0x94 0x2a;
memory "eeprom"
@ -14706,6 +14719,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny1626";
id = "t1626";
mcuid = 311;
n_interrupts = 30;
signature = 0x1e 0x94 0x29;
memory "eeprom"
@ -14731,6 +14745,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny1627";
id = "t1627";
mcuid = 312;
n_interrupts = 30;
signature = 0x1e 0x94 0x28;
memory "eeprom"
@ -14756,6 +14771,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny3224";
id = "t3224";
mcuid = 316;
n_interrupts = 30;
signature = 0x1e 0x95 0x28;
memory "eeprom"
@ -14781,6 +14797,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny3226";
id = "t3226";
mcuid = 317;
n_interrupts = 30;
signature = 0x1e 0x95 0x27;
memory "eeprom"
@ -14806,6 +14823,7 @@ part parent ".avr8x_tiny"
desc = "ATtiny3227";
id = "t3227";
mcuid = 318;
n_interrupts = 30;
signature = 0x1e 0x95 0x26;
memory "eeprom"
@ -15198,6 +15216,7 @@ part parent ".avrdx"
id = "avr32da28";
family_id = " AVR";
mcuid = 338;
n_interrupts = 41;
signature = 0x1e 0x95 0x34;
memory "eeprom"
@ -15223,6 +15242,7 @@ part parent ".avrdx"
id = "avr32da32";
family_id = " AVR";
mcuid = 342;
n_interrupts = 44;
signature = 0x1e 0x95 0x33;
memory "eeprom"
@ -15248,6 +15268,7 @@ part parent ".avrdx"
id = "avr32da48";
family_id = " AVR";
mcuid = 346;
n_interrupts = 58;
signature = 0x1e 0x95 0x32;
memory "eeprom"
@ -15273,6 +15294,7 @@ part parent ".avrdx"
id = "avr64da28";
family_id = " AVR";
mcuid = 351;
n_interrupts = 41;
signature = 0x1e 0x96 0x15;
memory "eeprom"
@ -15298,6 +15320,7 @@ part parent ".avrdx"
id = "avr64da32";
family_id = " AVR";
mcuid = 355;
n_interrupts = 44;
signature = 0x1e 0x96 0x14;
memory "eeprom"
@ -15323,6 +15346,7 @@ part parent ".avrdx"
id = "avr64da48";
family_id = " AVR";
mcuid = 359;
n_interrupts = 58;
signature = 0x1e 0x96 0x13;
memory "eeprom"
@ -15348,6 +15372,7 @@ part parent ".avrdx"
id = "avr64da64";
family_id = " AVR";
mcuid = 362;
n_interrupts = 64;
signature = 0x1e 0x96 0x12;
memory "eeprom"
@ -15373,6 +15398,7 @@ part parent ".avrdx"
id = "avr128da28";
family_id = " AVR";
mcuid = 364;
n_interrupts = 41;
signature = 0x1e 0x97 0x0a;
memory "eeprom"
@ -15398,6 +15424,7 @@ part parent ".avrdx"
id = "avr128da32";
family_id = " AVR";
mcuid = 366;
n_interrupts = 44;
signature = 0x1e 0x97 0x09;
memory "eeprom"
@ -15423,6 +15450,7 @@ part parent ".avrdx"
id = "avr128da48";
family_id = " AVR";
mcuid = 368;
n_interrupts = 58;
signature = 0x1e 0x97 0x08;
memory "eeprom"
@ -15448,6 +15476,7 @@ part parent ".avrdx"
id = "avr128da64";
family_id = " AVR";
mcuid = 370;
n_interrupts = 64;
signature = 0x1e 0x97 0x07;
memory "eeprom"
@ -15472,6 +15501,7 @@ part parent ".avrdx"
desc = "AVR32DB28";
id = "avr32db28";
mcuid = 339;
n_interrupts = 42;
signature = 0x1e 0x95 0x37;
memory "eeprom"
@ -15496,6 +15526,7 @@ part parent ".avrdx"
desc = "AVR32DB32";
id = "avr32db32";
mcuid = 343;
n_interrupts = 44;
signature = 0x1e 0x95 0x36;
memory "eeprom"
@ -15520,6 +15551,7 @@ part parent ".avrdx"
desc = "AVR32DB48";
id = "avr32db48";
mcuid = 347;
n_interrupts = 61;
signature = 0x1e 0x95 0x35;
memory "eeprom"
@ -15544,6 +15576,7 @@ part parent ".avrdx"
desc = "AVR64DB28";
id = "avr64db28";
mcuid = 352;
n_interrupts = 42;
signature = 0x1e 0x96 0x19;
memory "eeprom"
@ -15568,6 +15601,7 @@ part parent ".avrdx"
desc = "AVR64DB32";
id = "avr64db32";
mcuid = 356;
n_interrupts = 44;
signature = 0x1e 0x96 0x18;
memory "eeprom"
@ -15592,6 +15626,7 @@ part parent ".avrdx"
desc = "AVR64DB48";
id = "avr64db48";
mcuid = 360;
n_interrupts = 61;
signature = 0x1e 0x96 0x17;
memory "eeprom"
@ -15616,6 +15651,7 @@ part parent ".avrdx"
desc = "AVR64DB64";
id = "avr64db64";
mcuid = 363;
n_interrupts = 65;
signature = 0x1e 0x96 0x16;
memory "eeprom"
@ -15640,6 +15676,7 @@ part parent ".avrdx"
desc = "AVR128DB28";
id = "avr128db28";
mcuid = 365;
n_interrupts = 42;
signature = 0x1e 0x97 0x0e;
memory "eeprom"
@ -15664,6 +15701,7 @@ part parent ".avrdx"
desc = "AVR128DB32";
id = "avr128db32";
mcuid = 367;
n_interrupts = 44;
signature = 0x1e 0x97 0x0d;
memory "eeprom"
@ -15688,6 +15726,7 @@ part parent ".avrdx"
desc = "AVR128DB48";
id = "avr128db48";
mcuid = 369;
n_interrupts = 61;
signature = 0x1e 0x97 0x0c;
memory "eeprom"
@ -15712,6 +15751,7 @@ part parent ".avrdx"
desc = "AVR128DB64";
id = "avr128db64";
mcuid = 371;
n_interrupts = 65;
signature = 0x1e 0x97 0x0b;
memory "eeprom"
@ -15736,6 +15776,7 @@ part parent ".avrdx"
desc = "AVR16DD14";
id = "avr16dd14";
mcuid = 329;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x94 0x34;
@ -15761,6 +15802,7 @@ part parent ".avrdx"
desc = "AVR16DD20";
id = "avr16dd20";
mcuid = 330;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x94 0x33;
@ -15786,6 +15828,7 @@ part parent ".avrdx"
desc = "AVR16DD28";
id = "avr16dd28";
mcuid = 331;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x94 0x32;
@ -15811,6 +15854,7 @@ part parent ".avrdx"
desc = "AVR16DD32";
id = "avr16dd32";
mcuid = 333;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x94 0x31;
@ -15836,6 +15880,7 @@ part parent ".avrdx"
desc = "AVR32DD14";
id = "avr32dd14";
mcuid = 336;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x95 0x3b;
@ -15861,6 +15906,7 @@ part parent ".avrdx"
desc = "AVR32DD20";
id = "avr32dd20";
mcuid = 337;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x95 0x3a;
@ -15886,6 +15932,7 @@ part parent ".avrdx"
desc = "AVR32DD28";
id = "avr32dd28";
mcuid = 340;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x95 0x39;
@ -15911,6 +15958,7 @@ part parent ".avrdx"
desc = "AVR32DD32";
id = "avr32dd32";
mcuid = 344;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x95 0x38;
@ -15936,6 +15984,7 @@ part parent ".avrdx"
desc = "AVR64DD14";
id = "avr64dd14";
mcuid = 349;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x96 0x1d;
@ -15961,6 +16010,7 @@ part parent ".avrdx"
desc = "AVR64DD20";
id = "avr64dd20";
mcuid = 350;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x96 0x1c;
@ -15986,6 +16036,7 @@ part parent ".avrdx"
desc = "AVR64DD28";
id = "avr64dd28";
mcuid = 353;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x96 0x1b;
@ -16011,6 +16062,7 @@ part parent ".avrdx"
desc = "AVR64DD32";
id = "avr64dd32";
mcuid = 357;
n_interrupts = 36;
hvupdi_variant = 2;
signature = 0x1e 0x96 0x1a;
@ -16257,6 +16309,7 @@ part parent ".avrex"
desc = "AVR64EA28";
id = "avr64ea28";
mcuid = 354;
n_interrupts = 37;
signature = 0x1e 0x96 0x20;
memory "eeprom"
@ -16282,6 +16335,7 @@ part parent ".avrex"
desc = "AVR64EA32";
id = "avr64ea32";
mcuid = 358;
n_interrupts = 37;
signature = 0x1e 0x96 0x1f;
memory "eeprom"
@ -16307,6 +16361,7 @@ part parent ".avrex"
desc = "AVR64EA48";
id = "avr64ea48";
mcuid = 361;
n_interrupts = 45;
signature = 0x1e 0x96 0x1e;
memory "eeprom"

View File

@ -73,6 +73,11 @@ Component_t avr_comp[] = {
part_comp_desc(n_boot_sections, COMP_INT),
part_comp_desc(boot_section_size, COMP_INT),
part_comp_desc(autobaud_sync, COMP_CHAR),
part_comp_desc(idr, COMP_CHAR),
part_comp_desc(rampz, COMP_CHAR),
part_comp_desc(spmcr, COMP_CHAR),
part_comp_desc(eecr, COMP_CHAR),
part_comp_desc(eind, COMP_CHAR),
// AVRMEM
mem_comp_desc(n_word_writes, COMP_INT),

View File

@ -196,12 +196,8 @@ static int pin_name;
%token K_HAS_PDI /* MCU has PDI i/f rather than ISP (ATxmega). */
%token K_HAS_UPDI /* MCU has UPDI i/f (AVR8X). */
%token K_HAS_TPI /* MCU has TPI i/f rather than ISP (ATtiny4/5/9/10). */
%token K_IDR /* address of OCD register in IO space */
%token K_IS_AT90S1200 /* chip is an AT90S1200 (needs special treatment) */
%token K_IS_AVR32 /* chip is in the avr32 family */
%token K_RAMPZ /* address of RAMPZ reg. in IO space */
%token K_SPMCR /* address of SPMC[S]R in memory space */
%token K_EECR /* address of EECR in memory space */
%token K_FLASH_INSTR /* flash instructions */
%token K_EEPROM_INSTR /* EEPROM instructions */
@ -1201,30 +1197,6 @@ part_parm :
free_token($3);
} |
K_IDR TKN_EQUAL numexpr
{
current_part->idr = $3->value.number;
free_token($3);
} |
K_RAMPZ TKN_EQUAL numexpr
{
current_part->rampz = $3->value.number;
free_token($3);
} |
K_SPMCR TKN_EQUAL numexpr
{
current_part->spmcr = $3->value.number;
free_token($3);
} |
K_EECR TKN_EQUAL numexpr
{
current_part->eecr = $3->value.number;
free_token($3);
} |
K_MCU_BASE TKN_EQUAL numexpr
{
current_part->mcu_base = $3->value.number;

View File

@ -56,7 +56,7 @@
// Inject part parameters into a semi-automated rewrite of avrdude.conf
// - Add entries to the tables below; they get written on -p*/si or -c*/si
// - Use the output in a new avrdude.conf
// - Output again with -p* or -c* (no /i) and use that for final avrdude.conf
// - Output again with -p*/s or -c*/s (no /i) and use that for final avrdude.conf
// - Remove entries from below tables
static struct {
@ -712,6 +712,7 @@ static void dev_part_strct(const AVRPART *p, bool tsv, const AVRPART *base, bool
_if_partout(intcmp, "0x%02x", rampz);
_if_partout(intcmp, "0x%02x", spmcr);
_if_partout(intcmp, "0x%02x", eecr);
_if_partout(intcmp, "0x%02x", eind);
_if_partout(intcmp, "0x%04x", mcu_base);
_if_partout(intcmp, "0x%04x", nvm_base);
_if_partout(intcmp, "0x%04x", ocd_base);

View File

@ -2051,6 +2051,7 @@ part
rampz = <num> ; # IO addr of RAMPZ reg
spmcr = <num> ; # mem addr of SPMC[S]R reg
eecr = <num> ; # mem addr of EECR reg only when != 0x3f
eind = <num> ; # mem addr of EIND reg
mcu_base = <num> ;
nvm_base = <num> ;
ocd_base = <num> ;

View File

@ -122,7 +122,7 @@ SIGN [+-]
(?x: prog_modes | mcuid | n_interrupts | n_page_erase | n_word_writes | n_boot_sections |
boot_section_size | autobaud_sync) { /* Components for assignment */
boot_section_size | autobaud_sync | idr | rampz | spmcr | eecr | eind ) { /* struct components */
Component_t *cp = cfg_comp_search(yytext, current_strct);
if(!cp) {
@ -166,7 +166,6 @@ default_spi { yylval=NULL; return K_DEFAULT_SPI; }
delay { yylval=NULL; ccap(); return K_DELAY; }
desc { yylval=NULL; ccap(); return K_DESC; }
devicecode { yylval=NULL; ccap(); return K_DEVICECODE; }
eecr { yylval=NULL; ccap(); return K_EECR; }
eeprom { yylval=NULL; return K_EEPROM; }
eeprom_instr { yylval=NULL; ccap(); return K_EEPROM_INSTR; }
enablepageprogramming { yylval=NULL; ccap(); return K_ENABLEPAGEPROGRAMMING; }
@ -186,7 +185,6 @@ hvspcmdexedelay { yylval=NULL; ccap(); return K_HVSPCMDEXEDELAY; }
hvupdi_support { yylval=NULL; ccap(); return K_HVUPDI_SUPPORT; }
hvupdi_variant { yylval=NULL; ccap(); return K_HVUPDI_VARIANT; }
id { yylval=NULL; ccap(); return K_ID; }
idr { yylval=NULL; ccap(); return K_IDR; }
io { yylval=new_token(K_IO); return K_IO; }
is_at90s1200 { yylval=NULL; ccap(); return K_IS_AT90S1200; }
is_avr32 { yylval=NULL; ccap(); return K_IS_AVR32; }
@ -232,7 +230,6 @@ programlockpulsewidth { yylval=NULL; ccap(); return K_PROGRAMLOCKPULSEWIDTH; }
programmer { yylval=NULL; ccap(); return K_PROGRAMMER; }
pseudo { yylval=new_token(K_PSEUDO); return K_PSEUDO; }
pwroff_after_write { yylval=NULL; ccap(); return K_PWROFF_AFTER_WRITE; }
rampz { yylval=NULL; ccap(); return K_RAMPZ; }
rdyled { yylval=NULL; ccap(); return K_RDYLED; }
read { yylval=new_token(K_READ); ccap(); return K_READ; }
read_hi { yylval=new_token(K_READ_HI); ccap(); return K_READ_HI; }
@ -253,7 +250,6 @@ serial { yylval=NULL; ccap(); return K_SERIAL; }
signature { yylval=NULL; ccap(); return K_SIGNATURE; }
size { yylval=NULL; ccap(); return K_SIZE; }
spi { yylval=NULL; return K_SPI; }
spmcr { yylval=NULL; ccap(); return K_SPMCR; }
stabdelay { yylval=NULL; ccap(); return K_STABDELAY; }
stk500_devcode { yylval=NULL; ccap(); return K_STK500_DEVCODE; }
synchcycles { yylval=NULL; ccap(); return K_SYNCHCYCLES; }

View File

@ -295,6 +295,7 @@ typedef struct avrpart {
unsigned char rampz; /* I/O address of RAMPZ reg */
unsigned char spmcr; /* memory address of SPMCR reg */
unsigned char eecr; /* memory address of EECR reg */
unsigned char eind; /* memory address of EIND reg */
unsigned int mcu_base; /* Base address of MCU control block in ATxmega devices */
unsigned int nvm_base; /* Base address of NVM controller in ATxmega devices */
unsigned int ocd_base; /* Base address of OCD module in AVR8X/UPDI devices */