Hello,
I have recently bought the ATmega328PB Xplained mini and am struggling to upload to it.
Here is a link to the board infomation: here
I have the environment as follows in my platformio.ini file:
[env:ATmega328PB]
platform = atmelavr
board = ATmega328PB
framework = arduino
upload_protocol = xplainedmini
upload_flags =
-p m328pb
I then run the command “pio run -t program -v” in the terminal and get the following output:
Processing ATmega328PB (platform: atmelavr; board: ATmega328PB; framework: arduino; upload_protocol: xplainedmini; upload_flags: -p m328pb)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega328PB.html
PLATFORM: Atmel AVR 2.0.0 > ATmega328PB
HARDWARE: ATMEGA328PB 16MHz, 2KB RAM, 31.50KB Flash
PACKAGES:
- framework-arduino-avr-minicore 2.0.3
- tool-avrdude 1.60300.190424 (6.3.0)
- toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio\build\ATmega328PB\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.4% (used 9 bytes from 2048 bytes)
Flash: [ ] 3.6% (used 1166 bytes from 32256 bytes)
.pio\build\ATmega328PB\firmware.elf :
section size addr
.data 0 8388864
.text 1166 0
.bss 9 8388864
.comment 48 0
.note.gnu.avr.deviceinfo 64 0
.debug_info 2282 0
.debug_abbrev 2158 0
.debug_line 421 0
.debug_str 792 0
Total 6940
<lambda>(["program"], [".pio\build\ATmega328PB\firmware.hex"])
AVAILABLE: xplainedmini
CURRENT: upload_protocol = xplainedmini
avrdude "-p m328pb" -v -p atmega328pb -C C:\Users\tg0_test\.platformio\packages\tool-avrdude\avrdude.conf -c xplainedmini -U flash:w:.pio\build\ATmega328PB\firmware.hex:i
avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\tg0_test\.platformio\packages\tool-avrdude\avrdude.conf"
Using Port : usb
Using Programmer : xplainedmini
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145
avrdude done. Thank you.
*** [program] Error 1
=================================================================================== [FAILED] Took 1.47 seconds ===================================================================================
Environment Status Duration
-------------- -------- ------------
uno IGNORED
lightblue-bean IGNORED
attiny13 IGNORED
digispark-pro IGNORED
digispark-tiny IGNORED
dwenguino IGNORED
ATmega16 IGNORED
ATmega48 IGNORED
AT90CAN64 IGNORED
ATmega324PB IGNORED
ATmega328PB FAILED 00:00:01.465
nibo2 IGNORED
panStampAVR IGNORED
attiny828 IGNORED
attiny441 IGNORED
============================================================================= 1 failed, 0 succeeded in 00:00:01.465 =============================================================================
I think that the PID and VID supplied in the error message are for the ATmega328P Xplained mini (no B). I’m not sure what settings should be applied to refocus on the ATmega328PB Xplained mini.
Any help with this would be much appreciated!
Will