Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Urboot bootloader support for MicroCore #311

Merged
merged 6 commits into from
May 11, 2023
Merged

Add Urboot bootloader support for MicroCore #311

merged 6 commits into from
May 11, 2023

Conversation

MCUdude
Copy link
Contributor

@MCUdude MCUdude commented May 8, 2023

The latest version of MicroCore supports the new Urboot bootloader.
This PR allows setting fuses and burning the correct bootloader using PlatformIO.

The internal 9.6 and 4.8 MHz oscillator in the ATtiny13/A is notorious for being inaccurate. So much so that using a UART bootloader might become difficult. That's why MicroCore provides various bootloader binaries the bootloader script can choose from in order to use one that matches the user specification.

Specify the desired f_cpu and f_cpu_error, and the correct binary will be flashed.
There are a few rules though.

  • There only exist pre-compiled bootloader files for the following internal oscillator options:
    • 9.6 MHz
    • 4.8 MHz
    • 1.2 MHz
    • 600 kHz
    • 128 kHz
  • For each base frequency, the user can specify an error between -10 and 10 percent, in 1.25% steps.
  • f_cpu_error is only useful when the internal oscillator option is selected

I'd like to hear what @valeros thinks about this. I'll update the official PlatformIO docs and the MicroCore docs to reflect the changes when/if this gets merged.

Note that I will also migrate over to Urboot for my other Arduino cores as well, but this may take some time and is not covered in this PR.

MCUdude added 4 commits May 7, 2023 22:16
This will make it easier to add other Arduino cores in the future
defined in the board manifest file. The default value present in this file is only a fallback in case the definition is missing in both platformio.ini and the board manifest file
@MCUdude
Copy link
Contributor Author

MCUdude commented May 9, 2023

@valeros this is just a proposal, and I'd like to hear your thoughts regarding this. I'm open to feedback if you have ideas for new features or think things should be done differently. What's important is that the PlatformIO implementation is rock solid!

@valeros
Copy link
Member

valeros commented May 10, 2023

Hi @MCUdude ! Many thanks for the PR. Please review my comments below.

@valeros valeros merged commit 5c9a53f into platformio:develop May 11, 2023
@valeros
Copy link
Member

valeros commented May 11, 2023

Thanks for the PR, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants