Skip to content

Commit a2a3331

Browse files
committed
assorted changes and fices
1 parent ad01c83 commit a2a3331

File tree

3 files changed

+65
-55
lines changed

3 files changed

+65
-55
lines changed

megaavr/boards.txt

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ menu.bootloader-class=Bootloader type (installed by burn + must match 2 upload)
127127
avrda.name=AVR DA-series (no bootloader)
128128
avrdb.name=AVR DB-series (no bootloader)
129129
avrdd.name=AVR DD-series (no bootloader)
130-
#avrdu.name=AVR DU-series (no bootloader)
130+
avrdu.name=AVR DU-series (no bootloader)
131131
avrea.name=AVR EA-series (no bootloader)
132-
#avreb.name=AVR EB-series (no bootloader)
132+
avreb.name=AVR EB-series (no bootloader)
133133
avrdaopti.name=AVR DA-series (Optiboot)
134134
avrdbopti.name=AVR DB-series (Optiboot)
135135
avrddopti.name=AVR DD-series (Optiboot)
@@ -254,6 +254,27 @@ avrda.menu.chip.avr32da48.upload.maximum_size=32768
254254
avrda.menu.chip.avr32da48.upload.maximum_data_size=4096
255255
avrda.menu.chip.avr32da48.build.variant=48pin-standard
256256

257+
avrda.menu.chip.avr128da28s=AVR128DA28S
258+
avrda.menu.chip.avr128da28s.build.mcu=avr128da28
259+
avrda.menu.chip.avr128da28s.upload.maximum_size=131072
260+
avrda.menu.chip.avr128da28s.upload.maximum_data_size=16384
261+
avrda.menu.chip.avr128da28s.build.variant=28pin-standard
262+
avrda.menu.chip.avr128da32s=AVR128DA32S
263+
avrda.menu.chip.avr128da32s.build.mcu=avr128da32
264+
avrda.menu.chip.avr128da32s.upload.maximum_size=131072
265+
avrda.menu.chip.avr128da32s.upload.maximum_data_size=16384
266+
avrda.menu.chip.avr128da32s.build.variant=32pin-standard
267+
avrda.menu.chip.avr128da48s=AVR128DA48S
268+
avrda.menu.chip.avr128da48s.build.mcu=avr128da48
269+
avrda.menu.chip.avr128da48s.upload.maximum_size=131072
270+
avrda.menu.chip.avr128da48s.upload.maximum_data_size=16384
271+
avrda.menu.chip.avr128da48s.build.variant=48pin-standard
272+
avrda.menu.chip.avr128da64s=AVR128DA64S
273+
avrda.menu.chip.avr128da64s.build.mcu=avr128da64
274+
avrda.menu.chip.avr128da64s.upload.maximum_size=131072
275+
avrda.menu.chip.avr128da64s.upload.maximum_data_size=16384
276+
avrda.menu.chip.avr128da64s.build.variant=64pin-standard
277+
257278
#----------------------------------------#
258279
# Clock speed and source options #
259280
#________________________________________#
@@ -1937,43 +1958,43 @@ avrea.menu.wiremode.mands.build.wireabr=.wA
19371958
# SPM from app mode #
19381959
# To enable writing flash from app #
19391960
#_____________________________________#
1940-
avrea.menu.appspm.no=Disabled (Always use this - Other options UNSUPPORTED on EA!)
1961+
avrea.menu.appspm.no=Disabled (SPM write from app is not yet supported)
19411962
avrea.menu.appspm.no.bootloader.appspm=
19421963
avrea.menu.appspm.no.bootloader.BOOTSIZE=0x00
19431964
avrea.menu.appspm.no.build.appspmabr=
1944-
avrea.menu.appspm.full=Anywhere after 0x0200 (warning: App allowed to overwrite itself)
1945-
avrea.menu.appspm.full.bootloader.appspm=-DSPM_FROM_APP=-1
1946-
avrea.menu.appspm.full.build.appspmabr=.spmALL
1947-
avrea.menu.appspm.8plus=Above 8k (meant for 16k parts)
1948-
avrea.menu.appspm.8plus.bootloader.appspm=-DSPM_FROM_APP=32
1949-
avrea.menu.appspm.8plus.bootloader.CODESIZE=32
1950-
avrea.menu.appspm.12plus=Above 12k (meant for 16k parts)
1951-
avrea.menu.appspm.12plus.bootloader.appspm=-DSPM_FROM_APP=48
1952-
avrea.menu.appspm.12plus.bootloader.CODESIZE=48
1953-
avrea.menu.appspm.14plus=Above 14k (meant for 16k parts)
1954-
avrea.menu.appspm.14plus.bootloader.appspm=-DSPM_FROM_APP=56
1955-
avrea.menu.appspm.14plus.bootloader.CODESIZE=56
1956-
avrea.menu.appspm.16plus=Above 16k (AVR64/32 only, meant for 32k parts)
1957-
avrea.menu.appspm.16plus.bootloader.appspm=-DSPM_FROM_APP=64
1958-
avrea.menu.appspm.16plus.bootloader.CODESIZE=64
1959-
avrea.menu.appspm.24plus=Above 24k (AVR64/32 only, meant for 32k parts)
1960-
avrea.menu.appspm.24plus.bootloader.appspm=-DSPM_FROM_APP=96
1961-
avrea.menu.appspm.24plus.bootloader.CODESIZE=96
1962-
avrea.menu.appspm.28plus=Above 28k (AVR64/32 only, meant for 32k parts)
1963-
avrea.menu.appspm.28plus.bootloader.appspm=-DSPM_FROM_APP=112
1964-
avrea.menu.appspm.28plus.bootloader.CODESIZE=112
1965-
avrea.menu.appspm.32plus=Above 32k (AVR64 only)
1966-
avrea.menu.appspm.32plus.bootloader.appspm=-DSPM_FROM_APP=128
1967-
avrea.menu.appspm.32plus.bootloader.CODESIZE=128
1968-
avrea.menu.appspm.48plus=Above 48k (AVR64 only)
1969-
avrea.menu.appspm.48plus.bootloader.appspm=-DSPM_FROM_APP=192
1970-
avrea.menu.appspm.48plus.bootloader.CODESIZE=192
1971-
avrea.menu.appspm.56plus=Above 56k (AVR64 only)
1972-
avrea.menu.appspm.56plus.bootloader.appspm=-DSPM_FROM_APP=224
1973-
avrea.menu.appspm.56plus.bootloader.CODESIZE=224
1974-
avrea.menu.appspm.60plus=Above 60k (AVR64 only)
1975-
avrea.menu.appspm.60plus.bootloader.appspm=-DSPM_FROM_APP=240
1976-
avrea.menu.appspm.60plus.bootloader.CODESIZE=240
1965+
#avrea.menu.appspm.full=Anywhere after 0x0200 (warning: App allowed to overwrite itself)
1966+
#avrea.menu.appspm.full.bootloader.appspm=-DSPM_FROM_APP=-1
1967+
#avrea.menu.appspm.full.build.appspmabr=.spmALL
1968+
#avrea.menu.appspm.8plus=Above 8k (meant for 16k parts)
1969+
#avrea.menu.appspm.8plus.bootloader.appspm=-DSPM_FROM_APP=32
1970+
#avrea.menu.appspm.8plus.bootloader.CODESIZE=32
1971+
#avrea.menu.appspm.12plus=Above 12k (meant for 16k parts)
1972+
#avrea.menu.appspm.12plus.bootloader.appspm=-DSPM_FROM_APP=48
1973+
#avrea.menu.appspm.12plus.bootloader.CODESIZE=48
1974+
#avrea.menu.appspm.14plus=Above 14k (meant for 16k parts)
1975+
#avrea.menu.appspm.14plus.bootloader.appspm=-DSPM_FROM_APP=56
1976+
#avrea.menu.appspm.14plus.bootloader.CODESIZE=56
1977+
#avrea.menu.appspm.16plus=Above 16k (AVR64/32 only, meant for 32k parts)
1978+
#avrea.menu.appspm.16plus.bootloader.appspm=-DSPM_FROM_APP=64
1979+
#avrea.menu.appspm.16plus.bootloader.CODESIZE=64
1980+
#avrea.menu.appspm.24plus=Above 24k (AVR64/32 only, meant for 32k parts)
1981+
#avrea.menu.appspm.24plus.bootloader.appspm=-DSPM_FROM_APP=96
1982+
#avrea.menu.appspm.24plus.bootloader.CODESIZE=96
1983+
#avrea.menu.appspm.28plus=Above 28k (AVR64/32 only, meant for 32k parts)
1984+
#avrea.menu.appspm.28plus.bootloader.appspm=-DSPM_FROM_APP=112
1985+
#avrea.menu.appspm.28plus.bootloader.CODESIZE=112
1986+
#avrea.menu.appspm.32plus=Above 32k (AVR64 only)
1987+
#avrea.menu.appspm.32plus.bootloader.appspm=-DSPM_FROM_APP=128
1988+
#avrea.menu.appspm.32plus.bootloader.CODESIZE=128
1989+
#avrea.menu.appspm.48plus=Above 48k (AVR64 only)
1990+
#avrea.menu.appspm.48plus.bootloader.appspm=-DSPM_FROM_APP=192
1991+
#avrea.menu.appspm.48plus.bootloader.CODESIZE=192
1992+
#avrea.menu.appspm.56plus=Above 56k (AVR64 only)
1993+
#avrea.menu.appspm.56plus.bootloader.appspm=-DSPM_FROM_APP=224
1994+
#avrea.menu.appspm.56plus.bootloader.CODESIZE=224
1995+
#avrea.menu.appspm.60plus=Above 60k (AVR64 only)
1996+
#avrea.menu.appspm.60plus.bootloader.appspm=-DSPM_FROM_APP=240
1997+
#avrea.menu.appspm.60plus.bootloader.CODESIZE=240
19771998

19781999
#----------------------------------------#
19792000
# WDT MODE #
@@ -3594,6 +3615,7 @@ avrddopti.menu.flmap.lockdefault.build.flmapabr=.fld
35943615
avrddopti.menu.flmap.unlocked.build.flmapabr=.ful
35953616
avrddopti.menu.flmap.locksection0.build.flmapabr=.fl0
35963617

3618+
35973619
##########################################################################
35983620
# #
35993621
# ### # # #### ##### ### ### # #

megaavr/cores/dxcore/UART_swap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
// This is a MUCH simpler case - swap is trivial on those.
7171
#define HWSERIAL_MUX_TINY
7272
#else
73-
#error "This part is unsupported, or there is a bug in the core or a problem with your toolchain."
73+
#error "This part is unsupported, or there is a bug in the core or a problem with your toolchain. A USART struct exists, but cannot find registers that should be there. This can't happen - something is wrong"
7474
#endif
7575

7676
/* Okay, now we know what the mux register is, and whether it's a tiny-like mux or a Dx-like one. */
@@ -92,7 +92,7 @@
9292
#error "Only one USART, but this is a core for modern AVRs, and it's NOT a tinyAVR 0/1 or EB-series. Something is wrong!"
9393
// #warning "Only one USART, but this is not a tinyAVR. Something is wrong!"
9494
#else
95-
#error "No USARTs detected, all supported parts have at least 2, something is wrong!"
95+
#error "No USARTs detected, all supported parts have one or more - and this is a cant-happen anywauy. Something is wrong!"
9696
#endif
9797
#endif
9898
#endif

megaavr/cores/dxcore/core_devices.h

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -809,22 +809,10 @@
809809
#define ERRATA_DOES_NOT_APPLY (0)
810810

811811
#define checkErrata(errata) (errata == ERRATA_DOES_NOT_APPLY ? ERRATA_DOES_NOT_APPLY : (errata==ERRATA_IRREL ? ERRATA_DOES_NOT_APPLY : (errata > SYSCFG_REVID ? ERRATA_DOES_APPLY : ERRATA_DOES_NOT_APPLY)))
812+
/* YARGH! **NOT** **A** **COMPILETIME** **TEST** */
813+
/* You can't control #defines with it.
812814
813-
814-
/* When they're fixed, we'll replace these with a macro to check REVID and return 1 or 0 appropriately. */
815-
/* aaahahahah! Sorry...
816-
... I meant, *if* they're ever fixed.
817-
818-
Highly unlikely events come in groups, so if they get fixed, maybe put on a jacket or something as a precaution....
819-
just in case a pig coming in for a landing collides with you on your way to claim your lottery jackpot, killing you...
820-
And if in that unlikely event, contrary to your expectations, you end up in hell, yet find, instead of fire and brimstone there's just ice as far as you
821-
can see, the jacket will make etenal damnation to a frozen-over hell a bit less miserable.
822-
823-
That's how pessimistic I am left feeling about the prospects for errata fixes by this point
824-
*/
825-
826-
/* Okay, so what is all of this relevant errata?
827-
* Uhm, okay, why don't you take a seat, we're gonna be here a while */
815+
DB silicon with die rev 0x11 is available.
828816
829817
/* See Ref_Errata.md in the documentation, and the official errata document for more information.
830818
// The 128DA had a few unique and nasty ones. */
@@ -863,8 +851,8 @@ That's how pessimistic I am left feeling about the prospects for errata fixes by
863851

864852
// And both DA and DB had a whole slew of issues
865853
#if defined(__AVR_DA__) || defined(__AVR_DB__)
866-
#define ERRATA_TCD_PORTMUX (1) // *thud* *thud* *thud* - the sound of an embedded developer banging his head on the desk leaving a dent.
867-
#define ERRATA_DAC_DRIFT (1) // How much drift? I dunno - enough for Microchip to feel a need to add an erratum about it, but too much for them to be comfortable sharing any numbers.
854+
#define ERRATA_TCD_PORTMUX (1) // One of the most irritating erratums
855+
#define ERRATA_DAC_DRIFT (1) // How much drift? I dunno - enough for Microchip to feel a need to add an erratum about it.
868856
#define ERRATA_TCA_RESTART (1) // Is resets the direction, like the datasheet said. Appaently both the documentation and the silicon were wrong, it's not supposed to.
869857
#define ERRATA_CCL_PROTECTION (1) // Busted on all pre-DD parts
870858
#define ERRATA_TCD_ASYNC_COUNTPSC (1) // Busted on all pre-DD parts

0 commit comments

Comments
 (0)