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

Support for Urboot and Mighty/Mini/Mega/MajorCore v3.0.0 #320

Closed
MCUdude opened this issue Oct 25, 2023 · 2 comments
Closed

Support for Urboot and Mighty/Mini/Mega/MajorCore v3.0.0 #320

MCUdude opened this issue Oct 25, 2023 · 2 comments

Comments

@MCUdude
Copy link
Contributor

MCUdude commented Oct 25, 2023

Version 3.0.0 of Mighty/Mini/Mega/MajorCore has been released, and Optiboot has been replaced with Urboot.
Urboot is superior to Optiboot in virtually every way (Read more about the excellent Urboot bootloader here), but it will require different fuse settings. Optiboot is still bundled, but Urboot should be the default bootloader.

Status Task Can be done without further ado Who?
Update Avrdude to 7.2-arduino.1
(7.2 is backwards compatible with 7.1, so all cores
that uses 7.1 can be upgraded to use 7.2)
YES @valeros or @ivankravets
Update Mighty/Mini/Mega/MajorCore to v3.0.0 YES @valeros or @ivankravets
🟡 Update fuses and bootloader script to support
Urboot, and make Urboot the default bootloader
for all Mighty/Mini/Mega/MajorCore targets
NO, a PR for this are needed first. See PR #321 @MCUdude

When everything is done, I'm thinking about providing a template like this to help users get the most out of these cores (the current version of the template can be found here):

[platformio]
default_envs = Upload_UART ; Default build target

; Common settings for all environments
[env]
platform = atmelavr
framework = arduino

; TARGET SETTINGS
board = ATmega1284P
board_build.f_cpu = 16000000L
board_build.variant = standard

; BUILD OPTIONS
build_unflags =
build_flags = 

; SERIAL MONITOR OPTIONS
monitor_port = ${env:Upload_UART.upload_port}
monitor_speed = 9600

; Run the following command to upload with this environment
; pio run -e Upload_UART -t upload
[env:Upload_UART]
upload_protocol = urclock
upload_port = /dev/cu.usbserial*
; Urboot has auto-baud detection, so "any" baud rate can be used
board_upload.speed = 250000


; Run the following command to upload with this environment
; pio run -e Upload_ISP -t upload
[env:Upload_ISP]
upload_protocol = custom
upload_flags =
  -C$PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf
  -p$BOARD_MCU
  -cusbasp
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i


; Run the following command to set fuses
; pio run -e fuses_bootloader -t fuses
; Run the following command to set fuses + burn bootloader
; pio run -e fuses_bootloader -t bootloader
[env:fuses_bootloader]
board_hardware.oscillator = external ; Oscillator type
board_hardware.uart = uart0          ; Set UART to use for serial upload (For Optiboot, use "uart0_optiboot")
board_hardware.bod = 2.7v            ; Set brown-out detection
board_hardware.eesave = yes          ; Preserve EEPROM when uploading using programmer
upload_protocol = usbasp             ; Use the USBasp as programmer
upload_flags =                       ; Select USB as upload port and divide the SPI clock by 8
  -PUSB
  -B8

Bottom line:

  • upload_protocol = urclock are backwards compatible with upload_protocol = arduino
  • Millions(!) of pre-compiled Urboot bootloader binaries can be found here, including the ones bundled with Mighty/Mini/Mega/MajorCore
  • Optiboot will still be available, but board_hardware.uart = uartN_optiboot has to be specified to burn Optiboot. upload_protocol = arduino is also required for uploading using the Optiboot bootloader
@MCUdude
Copy link
Contributor Author

MCUdude commented Oct 26, 2023

Thanks @valeros!
I'll try to find some time next week to implement Urboot support for the fuses.py and bootloader.py scripts.

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

No branches or pull requests

2 participants