Skip to content

Releases: SpenceKonde/megaTinyCore

2.5.10 - CRITICAL BUGFIX for attachInterrupt

30 Jan 15:48
Compare
Choose a tag to compare

This corrects a serious defect that prevented attachInterrupt from working on PORTA when using the default configuration option.s

The references for the Comparator library are corrected. ( thanks @mechatroniks-git )

2.5.8 is removed from board manager json to get rid of the error message..

2.5.9 - CRITICAL BUGFIX for installation issue introduced in 2.5.8

20 Jan 02:39
64a7b1d
Compare
Choose a tag to compare

No changes to the core; I just screwed up the board manager json.

2.5.8 - Critical bugfix for non-windows users

19 Jan 07:05
Compare
Choose a tag to compare

Somehow, at some point (not sure exactly when or how) avrdude.pattern.program got changed to avrdide.pattern.program.windows, leaving other OS's out in the cold. Since I don't have non-windows systems to test on, and most people use SerialUPDI which is unaffected, it had gone unnoticed. This prevented users on effeced operating systems from uploading using any tool other than SerialUPDI (but not bootloading or uploading through a bootloader, just uploading to parts without a bootloader (or "upload using programmer" - but that generates an error intentionally, because doing that on a bootloader board is guaranteed not to work).

This also fixes installation for users on 32-bit linux, and responds to Wire as master trying to write more data than will fit in the buffer sending BUFFER_LENGTH bytes, instead of (size of data that was to be written) modulo BUFFER_LENGTH..

2.5.7 - better fix for #593, and SerialUPDI fixes

17 Jan 11:21
Compare
Choose a tag to compare

A better fix from @MX682X relating to the wire buffers is now added. This fix should be better than what we had in 2.5.6,

SerialUPDI had a bug that had not been noticed which prevented the standalone read operation from working That has been corrected. Also there are two more serialUPDI related changes:
More menu options to help the users whose combination of adapter and OS requires the write delay.
Verbose mode now works - I adjusted the priority of logging messages so -v is reasonable, while -v -v is rhe one with too much information for almost anyone.

2.5.6 - Critical bugfixes and SerialUPDI improvements

11 Jan 19:46
Compare
Choose a tag to compare

This update works around a bug in the the IDE that prevented the fix for Optiboot uploads from working. It also expands the list of SerialUPDI options and improves the accuracy of the write_delay functionality. These should help people who have been having problems getting SerialUPDI to work at speeds higher than 57600 baud, which was a particular problem on Mac and Linux systems.

2.5.5 - Critical bugfixes

11 Jan 06:00
Compare
Choose a tag to compare

This fixes 5 bugs, three of them critical and one serious, in the 2.5.x releases. Optiboot uploads were broken, attachInterrupt on the default settings was broken and would crash the sketch when an interrupt returned, the new Wire.endTransmission did not correctly implement the Wire API, resulting in "scanners" not working, and anything that checked for errors thinking that actual error conditions were successful any any successful transaction had failed. There was also another problem with the buffer size in Wire that broke some libraries in the wild, most notably the Adafruit OLED library.

These should all be resolved now.

2.5.4 - Another critical bugfix

23 Dec 03:40
Compare
Choose a tag to compare

Because the previous one didn't do the trick...

2.5.3 - CRITICAL bugfix

22 Dec 05:22
Compare
Choose a tag to compare

This corrects another pcrel compile error related to serial caused by me assuming the linker was smarter than it is when writing the assembly routines.

2.5.2 - CRITICAL 2.5.x bugfix

20 Dec 07:59
Compare
Choose a tag to compare

2.5.2 - This corrects a regression impacting burn bootloader on almost all configurations.
2.5.1 - This corrects the PCREL relocation truncated to fit linker error that can be generated when a sketch compiles to more than 8192 bytes in size. and uses serial introduced by 2.5.0. 2.5.0 is pulled, this is the first release that is usable with the huge featureset that was just introduced:

Totally Rewritten Wire library

Among other things, it supports DualMode (and master/slave without dual mode), which has been an oft-requested issue.

  • Completely new Wire.h library with exciting features - Thanks to @MX682X!
    • See the Wire library readme for more details.
    • Master + Slave on the same TWI - either using the same pins or in dual mode
    • Support for TWI1 assuming your device has it.
    • Enhanced slave functionality:
      • When set to match multiple addresses, method provided to find which address was used most recently.
      • After the master has read data from the slave, method provided to find out how many bytes were actually read.
      • Slave now has a way to test whether there is currently an ongoing transaction.
        All that, and it uses less flash too!

Serial is better now too!

That's not the only thing that's seen major rewrites: So has Serial - also thanks to @MX682X! These changes aren't as comprehensive, and I did more work here than on Wire.h (where I did virtually nothing other than the documentation). Check out the Serial Reference for more details, but in short

  • Added support for loopback, rs485, open drain mode!!
  • Added support for using event input instead of the RX pin (Untested)
  • Even added support for MSPI and synch (clocked) mode
  • Reimplemented ISRs in assembly, saving up to 1k of flash, and improving execution time such that you could receive bursts of characters at the maximum baud rate and not miss characters.
  • Adjusted serial buffer size 512b and 1k parts by adding an intermediate 32b serial buffer size.
  • Hoped for size improvements didn't materialize, but the assembly was enough to keep it from getting too bloated, at least.

Other new features:

  • Expanded Event library. Greatly Improved functionality for portable code/libraries
    • Add a set of compatibility defines to make life easier for people porting non-Event-library event-using code to 0/1-series.
  • Actually prevent disabling warnings - -Wall for all! You should not be compiling code with warnings disabled, the vast majority of the time, they're pointing to problems, and in the cases that aren't bugs, they're still a weak point that future bugs could come from (and that people will comment on when you post the code on forums to ask for help). I thought I'd done this a long time ago. Also pull in some warning-related flags from DxCore, including making implicit function declarations error, since the implied declarations when this happens are basically never result in working code, but it occasionally compiles and malfunctions.
  • Major progress on doc enhancements.
  • Using millis or micros (or rather attempting to) when they are unavailable due to millis being disabled, or in the case of micros, RTC used as millis time source, give better errors. You can test for #if defined(millis) and #if defined(micros) to check if those are available.
  • Clarified licence (for one thing, renamed to a .md so people can read it more easily, and know that it's readable if they're on windows) for tinyNeoPixel.
  • Harmonize Comparator.h with DxCore.
    Add avrdude.conf for the 32k 2-series parts which are now becoming available.
  • Port micros and delay-microseconds improvements from DxCore. (delayMicroseconds is more accurate now for the compiletime-unknown delays, and the micros math is faster because it was reimplemented in hand tuned assembly for the most important speeds).
  • SerialUPDI reference now links to it's actual location.
  • Port new attach interrupt from DxCore.
  • Port new printf option from DxCore.
  • Update callbacks to match DxCore 1.4.0, most notably the init_reset_flags(). It will automatically clear reset flags if not overridden, stashing them in GPIOR0 (chosen because has lower overhead than a variable)
  • Platform.txt organization and commenting. Fix issues where defines were missing from lib-discovery phase.
  • Reduce flash footprint of pinMode.
  • Improve methods used to block attempts to use "upload using programmer" when an optiboot board is selected. That confiuration is guaranteed not to work, and we should not do things that we know 100% will not work. We would need a merged output file for this, but the IDE doesn;t make those for us here. (only over on attinycore, where they're not usable and we must go out of our way to delete the damned things)
  • Timers.h shared with DxCore.

Bugfixes

  • Recent change to C++17 required additions to new.cpp and new.h, including sized deallocation (delete) and alignment-aware new and delete operators. The sized deallocation operator is called when existing code that worked before is compiled to the C++ 17 standard; since free() doesn't care about the size, implementation was straightforward. Discussion is ongoing about the aligned new and delete operators, which are also new in this version of the standards. It is likely that we will not support them, since other Arduino cores aren't even building to C++ 17 standard, so if your code needs aligned new/delete, it also won't work anywhere else in Arduino-land. While we are not shy about adding features, we do so only to support hardware features. If conditions change we will revisit this matter.
  • Fix timekeeping on clock speeds only supported with external clocks or tuning when a TCA or TCB is used for millis (it's still busted with the TCD)
  • Correct SYSCFG0 fuse settings when burning bootloader for 2-series parts - they default the reserved bits to 1 not 0, and worse still, setting them to 0 enables a mode we probably don't want.
  • Stop clearing fuse 4 by writing the default values for TCD0 on a 1-series. Now, with great difficulty, we only set that on parts that actually have the type D timer in order to keep our promise of burn bootloader restoring the chip to a fully known state. (well, except for the user row, and EEPROM if you've got it set to retain).
  • Fix theoretical EEPROM.h bug inherited from avr-libc, and keep millis() from losing time when writing more than one byte at a time; update and harmonize with DxCore.
  • Fix 402 with bad signature support.
  • Fix names of .lst and .map
  • Fix bug with disabled millis on tinyNeoPixel libraries not working. Again.

Like I said, this is HUGE.....

2.5.1 - CRITICAL 2.5.0 bugfix

19 Dec 17:21
Compare
Choose a tag to compare

This corrects the PCREL relocation truncated to fit linker error that can be generated when a sketch compiles to more than 8192 bytes in size. and uses serial introduced by 2.5.0. 2.5.0 is pulled, this is the first release that is usable with the huge featureset that was just introduced:

Totally Rewritten Wire library

Among other things, it supports DualMode (and master/slave without dual mode), which has been an oft-requested issue.

  • Completely new Wire.h library with exciting features - Thanks to @MX682X!
    • See the Wire library readme for more details.
    • Master + Slave on the same TWI - either using the same pins or in dual mode
    • Support for TWI1 assuming your device has it.
    • Enhanced slave functionality:
      • When set to match multiple addresses, method provided to find which address was used most recently.
      • After the master has read data from the slave, method provided to find out how many bytes were actually read.
      • Slave now has a way to test whether there is currently an ongoing transaction.
        All that, and it uses less flash too!

Serial is better now too!

That's not the only thing that's seen major rewrites: So has Serial - also thanks to @MX682X! These changes aren't as comprehensive, and I did more work here than on Wire.h (where I did virtually nothing other than the documentation). Check out the Serial Reference for more details, but in short

  • Added support for loopback, rs485, open drain mode!!
  • Added support for using event input instead of the RX pin (Untested)
  • Even added support for MSPI and synch (clocked) mode
  • Reimplemented ISRs in assembly, saving up to 1k of flash, and improving execution time such that you could receive bursts of characters at the maximum baud rate and not miss characters.
  • Adjusted serial buffer size 512b and 1k parts by adding an intermediate 32b serial buffer size.
  • Hoped for size improvements didn't materialize, but the assembly was enough to keep it from getting too bloated, at least.

Other new features:

  • Expanded Event library. Greatly Improved functionality for portable code/libraries
    • Add a set of compatibility defines to make life easier for people porting non-Event-library event-using code to 0/1-series.
  • Actually prevent disabling warnings - -Wall for all! You should not be compiling code with warnings disabled, the vast majority of the time, they're pointing to problems, and in the cases that aren't bugs, they're still a weak point that future bugs could come from (and that people will comment on when you post the code on forums to ask for help). I thought I'd done this a long time ago. Also pull in some warning-related flags from DxCore, including making implicit function declarations error, since the implied declarations when this happens are basically never result in working code, but it occasionally compiles and malfunctions.
  • Major progress on doc enhancements.
  • Using millis or micros (or rather attempting to) when they are unavailable due to millis being disabled, or in the case of micros, RTC used as millis time source, give better errors. You can test for #if defined(millis) and #if defined(micros) to check if those are available.
  • Clarified licence (for one thing, renamed to a .md so people can read it more easily, and know that it's readable if they're on windows) for tinyNeoPixel.
  • Harmonize Comparator.h with DxCore.
    Add avrdude.conf for the 32k 2-series parts which are now becoming available.
  • Port micros and delay-microseconds improvements from DxCore. (delayMicroseconds is more accurate now for the compiletime-unknown delays, and the micros math is faster because it was reimplemented in hand tuned assembly for the most important speeds).
  • SerialUPDI reference now links to it's actual location.
  • Port new attach interrupt from DxCore.
  • Port new printf option from DxCore.
  • Update callbacks to match DxCore 1.4.0, most notably the init_reset_flags(). It will automatically clear reset flags if not overridden, stashing them in GPIOR0 (chosen because has lower overhead than a variable)
  • Platform.txt organization and commenting. Fix issues where defines were missing from lib-discovery phase.
  • Reduce flash footprint of pinMode.
  • Improve methods used to block attempts to use "upload using programmer" when an optiboot board is selected. That confiuration is guaranteed not to work, and we should not do things that we know 100% will not work. We would need a merged output file for this, but the IDE doesn;t make those for us here. (only over on attinycore, where they're not usable and we must go out of our way to delete the damned things)
  • Timers.h shared with DxCore.

Bugfixes

  • Recent change to C++17 required additions to new.cpp and new.h, including sized deallocation (delete) and alignment-aware new and delete operators. The sized deallocation operator is called when existing code that worked before is compiled to the C++ 17 standard; since free() doesn't care about the size, implementation was straightforward. Discussion is ongoing about the aligned new and delete operators, which are also new in this version of the standards. It is likely that we will not support them, since other Arduino cores aren't even building to C++ 17 standard, so if your code needs aligned new/delete, it also won't work anywhere else in Arduino-land. While we are not shy about adding features, we do so only to support hardware features. If conditions change we will revisit this matter.
  • Fix timekeeping on clock speeds only supported with external clocks or tuning when a TCA or TCB is used for millis (it's still busted with the TCD)
  • Correct SYSCFG0 fuse settings when burning bootloader for 2-series parts - they default the reserved bits to 1 not 0, and worse still, setting them to 0 enables a mode we probably don't want.
  • Stop clearing fuse 4 by writing the default values for TCD0 on a 1-series. Now, with great difficulty, we only set that on parts that actually have the type D timer in order to keep our promise of burn bootloader restoring the chip to a fully known state. (well, except for the user row, and EEPROM if you've got it set to retain).
  • Fix theoretical EEPROM.h bug inherited from avr-libc, and keep millis() from losing time when writing more than one byte at a time; update and harmonize with DxCore.
  • Fix 402 with bad signature support.
  • Fix names of .lst and .map
  • Fix bug with disabled millis on tinyNeoPixel libraries not working. Again.

Like I said, this is HUGE.....