Giter Club home page Giter Club logo

Comments (4)

RiRa12621 avatar RiRa12621 commented on June 10, 2024

Quickly verified that there's no issue with the arduino itself by using the arduino IDE with a blink example:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

works as expected

from tinygo.

RiRa12621 avatar RiRa12621 commented on June 10, 2024

Tinygo error seems to come from here https://github.com/tinygo-org/tinygo/blob/dev/main.go#L972

flashUF2UsingMSD called with options here https://github.com/tinygo-org/tinygo/blob/dev/main.go#L484

issue seems to be the config.Target.FlashVolume that's part of the config built here https://github.com/tinygo-org/tinygo/blob/dev/main.go#L374

So we're calling the Flash function if the option is flash https://github.com/tinygo-org/tinygo/blob/dev/main.go#L1635

the config is built https://github.com/tinygo-org/tinygo/blob/release/builder/config.go#L14 because what in there is related to this https://github.com/tinygo-org/tinygo/blob/dev/main.go#L1514

target: https://github.com/tinygo-org/tinygo/blob/release/builder/config.go#L38

Okay, so we have the flash volume in there

FlashVolume []string `json:"msd-volume-name,omitempty"`

Okay so we load from https://github.com/tinygo-org/tinygo/blob/release/targets/nano-rp2040.json

and then the inherits https://github.com/tinygo-org/tinygo/blob/release/targets/rp2040.json

okay, but where does the flashvolume come from? This is kinda where I'm getting lost

from tinygo.

deadprogram avatar deadprogram commented on June 10, 2024

Via Slack:
you probably need to manually kick-in the bootloader the first time flashing that particular board

Hold down the BOOTSEL button while plugging the board into USB.
you only need to do that once. afterwards, tinygo will detect it is being flashed and kick into bootloader mode
usually if the rp2040 board has already been flashed with something like arduino, it will also work without manual bootloader

from tinygo.

RiRa12621 avatar RiRa12621 commented on June 10, 2024

local machine issue: fixed by reboot

from tinygo.

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.