Comments (7)
Could you try this configuration file platformio.ini
?
[env:uno]
platform = atmelavr
framework = arduino
board = uno
board_mcu = atmega328pb
Does it work? If yes, we will add a new board using Arduino Uno manifest.
Also, do we need new variant?
from platform-atmelavr.
I get a linker error:
Linking .pioenvs\uno\firmware.elf collect2.exe: error: ld returned 5 exit status *** [.pioenvs\uno\firmware.elf] Error 1 [ERROR] Took 8.62 seconds
Please note that the 328pb requires its own header file, startup code and library:
- iom328pb.h
- crtatmega328pb.o
- libatmega328pb.a
These files are present in toolchain_atmelavr together with "specs-atmega328pb", which is good.
Because the 328pb has 2x UART, 2x SPI, 2x I2C and some more, the Elektor Uno R4 is not a simple Uno variant. An Arduino boards package for the Elektor Uno R4 is available at https://github.com/ElektorLabs/Arduino/releases/download/v1.0.0/package_elektor_uno_r4_1_8_x_index.json
This package adds libraries to support the extra peripherals. It uses tricks to get the files in the right places and switches avrdude into silent mode to avoid warnings.
Furthermore, allthough avrdude may not support the 328pb, it can easily be added to its config file.
The Atmel ATmega328PB board that is in the PIO boards list does not support its extra peripherals through Arduino and so its support files are probably worthless.
from platform-atmelavr.
I get the same error, when I use the board "Atmel ATmega328PB".
It would be very helpful to add the support of ATmega328PB and its variants (Elector UNO R4, Wattuino Pro Mini PB, etc.) !
from platform-atmelavr.
Toolchain is fixed. Please run pio update
and build project again. If it works, I'll add new board Elektor Uno R4
with its variant.
from platform-atmelavr.
@elektor-labs I added your PINs definition platformio/platformio-pkg-framework-arduinoavr@c6fd54b
Please note that I commented https://github.com/platformio/platformio-pkg-framework-arduinoavr/blob/master/variants/R4/pins_arduino.h#L30, it produces a lot of errors.
Also, new board manifest was added c2309b8
Please re-test. If it doesn't work, please reopen this issue.
from platform-atmelavr.
Thank you! I've made some first tests after pio update
and inserting the boards-file and pins_arduino.h in directory R4.
Serial.begin(9600);
andSerial1.begin(9600);
compiles#include <SPI.h>
and#include <SPI1.h>
results in compiling errors#include <Wire.h>
and#include <Wire1.h>
results in compiling errors
from platform-atmelavr.
I've just deployed new package. So, you can experiment on it via
[env:elektor_uno_r4]
platform = https://github.com/platformio/platform-atmelavr.git
framework = arduino
board = elektor_uno_r4
Let's wait for the comment by @elektor-labs
from platform-atmelavr.
Related Issues (20)
- Update all MCUdude Arduino cores to the latest version HOT 5
- Update MCUdude cores (yet again, sorry) HOT 1
- tool-micronucleus package (Digispark support) needs update to fix "flash erase error" -71, -32, etc. on Linux
- [Feature Request] HOT 1
- Updated PIO, build now fails with "KeyError: 'tool-avrdude," but I'm not even using avrdude HOT 2
- relocation truncated to fit: R_AVR_13_PCREL against `no symbol'
- Update MCUdude cores the the latest version HOT 1
- debugging with simavr: avr-gdb depends on libncurses.so.5 and libtinfo.so.5 HOT 1
- avr-gdb in toolchain atmelavr is obsolete and depends on libncurses5 HOT 1
- framework-arduino-avr package incredibly outdated HOT 7
- DOCS: Invalid Parameters. HOT 1
- Addding a custom board to your boards list (CRODUINO_ATMEGA328P_LoRA) HOT 1
- PlatformIO passes the wrong -mmcu flag for the assembler (ATmega328PB) HOT 4
- Upload to attiny85 using optiboot (serial)
- Support for Urboot and Mighty/Mini/Mega/MajorCore v3.0.0 HOT 2
- error: 'fabs' was not declared in this scope HOT 2
- Add support for ATX2 HOT 3
- toolchain-atmelavr source code and build scripts? HOT 12
- Custom board pull request. (STF Labs B107AA)
- please consider to add upload.mcu HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform-atmelavr.