GithubHelp home page GithubHelp logo

phanchanhhien / pio-arduinogiga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haschtl/pio-arduinogiga

0.0 0.0 0.0 12 KB

Platformio configuration for Arduino GIGA R1

C++ 18.67% Python 81.33%

pio-arduinogiga's Introduction

pio-arduinogiga

This repo contains a custom platformio board-configuration for Arduino GIGA R1. It is adapted from the board-definition for the Arduino IDE here.

Important: Modify platform-ststm32

The GIGA board requires a modification of the platform-ststm32 platform in the platform.py file.

Change the line

if board.startswith(("portenta", "opta", "nicla_vision"))

to

if board.startswith(("portenta", "opta", "nicla_vision", "giga"))

The platform.py file can be found in ~/.platformio/platforms/ststm32/platform.py on linux.

Uploading sketch

When flashing the Arduino GIGA using the Arduino IDE, the board is set to bootloader mode automatically. Using this board-definition in platformio will not do this. We need to set it into bootloader mode manually for now by double-pressing the RST-Button (Refer to the cheat-sheet)

Upload Troubleshooting

Sometimes the Arduino GIGA does not respond after flashing, it's not even possible to enter bootloader_mode by double-pressing the RST-Button. Workaround for this is to enter DFU-Mode by holding the BOOT0-button while powering the Arduino GIGA and then flash some sketch using the Arduino IDE, e.g.

#include <Arduino.h>
#include <Serial.h>
#define LED LED_BUILTIN

void setup() {
  pinMode(LED, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  digitalWrite(LED, digitalRead(LED) ^ 1); // toggle
  Serial.println("Test");
  delay(1000);
}

After this, it's possible to enter bootloader_mode again.

Alternative workaround

A more fail-safe workaround is to use the arduino-cli to upload the .bin file created by platformio: arduino-cli upload -b arduino:mbed_giga:giga -i .pio/build/giga/firmware.bin

References

pio-arduinogiga's People

Contributors

haschtl avatar

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.