Skip to content

Commit

Permalink
Fix 32-pin DD-series variant, keep 28-pin parts from using it
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Feb 24, 2023
1 parent 0c5c3bc commit 1e92e3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ These are typically planned for release in a future version (usually the next on
* Enhancement: Add the the Optimization Level menu that megaTinycore got.
* Enhancement: Improve Wire.h compatibility with other cores that have falled behind.
* Enhancement: Add option for 48 MHz crystal options. Because it turns out that a DB with E-spec temp rating often runs at that speed.
* Bugfix: Correct issue with compiling for 32-pin DD-series for Optiboot. Correct several board.txt issues where the correct properties were assigned to the wrong boards.

### 1.5.4
* **Critical (per Microchip) Bugfix** Correct an issue that someone with a Microchip logo as their avatar called critical (I defer to Microchip's wisdom regarding it's criticality), which would cause a crash when the old attach interrupt mode is used for pins on PORTC due to a copy/paste error from tinyAVR. This issue has been present since 1.4.x versions somewhere.
Expand Down
18 changes: 9 additions & 9 deletions megaavr/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1081,24 +1081,24 @@ avrdd.menu.chip.avr64dd32.build.mcu=avr64dd32
avrdd.menu.chip.avr64dd32.upload.maximum_size=65536
avrdd.menu.chip.avr64dd32.upload.maximum_data_size=8192
avrdd.menu.chip.avr64dd32.build.variant=32pin-ddseries
avrdd.menu.chip.avr64dd20.build.highestcb=B2
avrdd.menu.chip.avr64dd32.build.highestcb=B2
avrdd.menu.chip.avr64dd28.build.mcu=avr64dd28
avrdd.menu.chip.avr64dd28.upload.maximum_size=65536
avrdd.menu.chip.avr64dd28.upload.maximum_data_size=8192
avrdd.menu.chip.avr64dd28.build.variant=28pin-ddseries
avrdd.menu.chip.avr64dd20.build.highestcb=B2
avrdd.menu.chip.avr64dd28.build.highestcb=B2
avrdd.menu.chip.avr64dd20.build.mcu=avr64dd20
avrdd.menu.chip.avr64dd20.upload.maximum_size=65536
avrdd.menu.chip.avr64dd20.upload.maximum_data_size=8192
avrdd.menu.chip.avr64dd20.build.highestcb=B1
avrdd.menu.chip.avr64dd20.build.variant=20pin-ddseries
avrdd.menu.chip.avr32dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr64dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr64dd14.build.mcu=avr64dd14
avrdd.menu.chip.avr64dd14.upload.maximum_size=65536
avrdd.menu.chip.avr64dd14.upload.maximum_data_size=8192
avrdd.menu.chip.avr64dd14.build.highestcb=B1
avrdd.menu.chip.avr64dd14.build.variant=14pin-ddseries
avrdd.menu.chip.avr32dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr64dd14.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr32dd32.build.mcu=avr32dd32
avrdd.menu.chip.avr32dd32.upload.maximum_size=32768
avrdd.menu.chip.avr32dd32.upload.maximum_data_size=4096
Expand All @@ -1118,7 +1118,7 @@ avrdd.menu.chip.avr32dd14.upload.maximum_size=32768
avrdd.menu.chip.avr32dd14.upload.maximum_data_size=4096
avrdd.menu.chip.avr32dd14.build.highestcb=B1
avrdd.menu.chip.avr32dd14.build.variant=14pin-ddseries
avrdd.menu.chip.avr32dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr32dd14.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr16dd32.build.mcu=avr16dd32
avrdd.menu.chip.avr16dd32.upload.maximum_size=16384
avrdd.menu.chip.avr16dd32.upload.maximum_data_size=2048
Expand All @@ -1132,13 +1132,13 @@ avrdd.menu.chip.avr16dd20.upload.maximum_size=16384
avrdd.menu.chip.avr16dd20.upload.maximum_data_size=2048
avrdd.menu.chip.avr16dd20.build.highestcb=B1
avrdd.menu.chip.avr16dd20.build.variant=20pin-ddseries
avrdd.menu.chip.avr32dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr16dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr16dd14.build.mcu=avr16dd14
avrdd.menu.chip.avr16dd14.upload.maximum_size=16384
avrdd.menu.chip.avr16dd14.upload.maximum_data_size=2048
avrdd.menu.chip.avr16dd14.build.highestcb=B1
avrdd.menu.chip.avr16dd14.build.variant=14pin-ddseries
avrdd.menu.chip.avr32dd20.build.defaultswaps=-DMUX_DEFAULT_USART1=2
avrdd.menu.chip.avr16dd14.build.defaultswaps=-DMUX_DEFAULT_USART1=2

#----------------------------------------#
# Clock speed and source options #
Expand Down Expand Up @@ -3019,7 +3019,7 @@ avrddopti.menu.chip.avr32dd28.build.mcu=avr32dd28
avrddopti.menu.chip.avr32dd28.bootloader.class=optiboot_32dd
avrddopti.menu.chip.avr32dd28.upload.maximum_size=32256
avrddopti.menu.chip.avr32dd28.upload.maximum_data_size=4096
avrddopti.menu.chip.avr32dd28.build.variant=32pin-ddseries
avrddopti.menu.chip.avr32dd28.build.variant=28pin-ddseries
avrddopti.menu.chip.avr32dd20.build.mcu=avr32dd20
avrddopti.menu.chip.avr32dd20.bootloader.class=optiboot_32dd
avrddopti.menu.chip.avr32dd20.upload.maximum_size=32256
Expand All @@ -3044,7 +3044,7 @@ avrddopti.menu.chip.avr16dd28.build.mcu=avr16dd28
avrddopti.menu.chip.avr16dd28.bootloader.class=optiboot_32dd
avrddopti.menu.chip.avr16dd28.upload.maximum_size=15872
avrddopti.menu.chip.avr16dd28.upload.maximum_data_size=2048
avrddopti.menu.chip.avr16dd28.build.variant=32pin-ddseries
avrddopti.menu.chip.avr16dd28.build.variant=28pin-ddseries
avrddopti.menu.chip.avr16dd20.build.mcu=avr16dd20
avrddopti.menu.chip.avr16dd20.bootloader.class=optiboot_32dd
avrddopti.menu.chip.avr16dd20.upload.maximum_size=15872
Expand Down
2 changes: 1 addition & 1 deletion megaavr/variants/32pin-ddseries/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Include guard and include basic libraries. We are normally including this inside
#endif
#else /* If we ARE using a bootloader, we can't be sure if MVIO is enabled :-( */
#define IS_MVIO_ENABLED() ((FUSE.SYSCFG1 & 0x01) == 0)
#define digitalPinToAnalogInput(p) ((p) >= PIN_PD0 ? (((p) < PIN_PF0) ? ((p) - PIN_PD0) : ((p) < PIN_PF6) ? ((p) - 4) : NOT_A_PIN) : (((p) > PIN_PA1 && !(IS_MVIO_ENABLED() && (p) >= PIN_PC0)) ? ((p) + 20* : NOT_A_PIN))
#define digitalPinToAnalogInput(p) ((p) >= PIN_PD0 ? (((p) < PIN_PF0) ? ((p) - PIN_PD0) : ((p) < PIN_PF6) ? ((p) - 4) : NOT_A_PIN) : (((p) > PIN_PA1 && !(IS_MVIO_ENABLED() && (p) >= PIN_PC0)) ? ((p) + 20) : NOT_A_PIN))
#define analogChannelToDigitalPin(p) ((p) > (IS_MVIO_ENABLED() ? 27 : 31) ? NOT_A_PIN : ((p) < 8) ? ((p) + PIN_PD0) : (((p) > 21) ? ((p) - 20) : ((p) > 15 ) ? ((p) + 4) : NOT_A_PIN))
#endif

Expand Down

0 comments on commit 1e92e3e

Please sign in to comment.