Giter Club home page Giter Club logo

Comments (7)

ivankravets avatar ivankravets commented on May 31, 2024

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.

elektor-labs avatar elektor-labs commented on May 31, 2024

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.

Skysurfer-14 avatar Skysurfer-14 commented on May 31, 2024

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.

ivankravets avatar ivankravets commented on May 31, 2024

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.

ivankravets avatar ivankravets commented on May 31, 2024

@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.

Skysurfer-14 avatar Skysurfer-14 commented on May 31, 2024

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); and Serial1.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.

ivankravets avatar ivankravets commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.