-
Notifications
You must be signed in to change notification settings - Fork 249
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
Unable to upload the program to the ATmega328PB at PlatformIO. #276
Comments
Sorry, but PlatformIO hasn't been updated to use Urboot yet. |
No problem! I understood about Urboot after reading the PR and related issues you showed me. Very nice improvements! Until these are released in the near future, I will continue to work with the Arduino IDE. Thanks for the clear explanation. |
The PlatformIO MiniCore template has now been updated with Utboot support: |
(Sorry I don't think I understand your one sentence correctly...) So does that mean that even with the latest version, I can't upload code with PlatformIO? Maybe if I wrote the bootloader using 3.0.0 in the Arduino IDE (the first way in this issue),
pio run -t bootloader -e fuses_bootloader |
Sorry, that was a late night typo. It was supposed to be now instead of not 😅 You can not set the correct fuses, flash the Urboot bootloader and upload using PlatformIO. |
Working in the middle of the night is what fails :) Good news, I successfully wrote it in my environment!
Only one problem remained. That is that the code upload speed only worked at 38400 bps. I'll leave the record here in case it might be of help to others. This is the [platformio]
default_envs = Upload_UART
[env]
platform = atmelavr #latest stable
board = ATmega328PB
framework = arduino
monitor_speed = 115200
board_build.f_cpu = 8000000L
[env:Upload_UART]
upload_protocol = urclock
board_upload.speed = 38400
; https://github.com/MCUdude/MiniCore/blob/master/PlatformIO.md
[env:fuses_bootloader]
board_hardware.oscillator = internal
board_bootloader.type = urboot
board_bootloader.speed = 115200
board_hardware.uart = uart0
board_hardware.bod = 2.7v
board_hardware.eesave = yes
upload_protocol = atmelice_isp Log of writing boot loader:
|
I use MegaCore and MiniCore. Thanks for the great project.
Please comment if you have any tips as I am unable to upload the program to the ATmega328PB at PlatformIO.
I have designed a board using ATmega328PB and following the Minimal setup schematic in
README.md
.It runs at 8MHz using the internal clock (with 3.3V VCC). Serial connections are made using CH340N (connected RTS to DTR).
However, LEDs connected to SCK are omitted (D1, R2).
I used Arduino IDE 1.8.19 and added MiniCore 3.0.0 in Board Manager.
Then I connected the AVR ICE and wrote the firmware with the following settings with success.
In this state, I disconnected the AVR ICE and uploaded a test code like LED Blinker from the COM port to which the CH340N is connected and it worked.
I wanted to try the same configuration with PlatformIO, so I placed the exact same
ino
code inmain.cpp
with the followingplatformio.ini
:However, when I try to build and upload the file, nothing to response:
I thought there was a problem with the PlatformIO configuration since it was fine in the Arduino IDE, but am I missing something?
The text was updated successfully, but these errors were encountered: