Page 1 of 1

unable to flash on microbitv2

Posted: Tue Dec 22, 2020 12:04 pm
by gekorob
Hi all,
I'm just starting experimenting on my microbit v2 and with the mu editor I have no problem on flashing python code on the board and I'm a newbie in this field).
Using instead the 'uflash' (that I'd prefer, 'cause I'm using my usual code editor to write python) instead I have problem.
After flashing on the microbit v2 the board show the code 529 (I guess that is a problem of wrong hex), instead on the microbit v1 it works correctly.

So the question is: how I can flash python code to microbit v2 using uflash?

I'm using 'uflash' in a very easy way:

uflash hi.py <---- this is NOT working (the command finish correctly but the board shows 529)

and

uflash -r micropython-microbit-v2.0.0-beta.3.hex <---- this is working correctly

From mu-editor, opening the REPL I can see that on the board I have:

MicroPython v1.13 on 2020-12-21; micro:bit v2.0.0-beta.3 with nRF52833

Any help is highly appreciated,
Thanks a lot
Roberto

Re: unable to flash on microbitv2

Posted: Tue Dec 22, 2020 12:25 pm
by aivarannamaa
This seems to be a known issue: https://github.com/ntoll/uflash/issues/67

Instead of combining MicroPython and your code into single hex, I'd recommend flashing your micro:bit once with https://github.com/microbit-foundation/ ... beta.3.hex, and upload your script as main.py

If you want to keep your current editor, then you could use any of the following command line tools for uploading scripts or other files into MicroPython's filesystem:

* rshell (https://github.com/dhylands/rshell)
* ampy (https://github.com/scientifichackers/ampy)
* mpfshell (https://github.com/wendlers/mpfshell)
* pyboard (https://docs.micropython.org/en/latest/ ... rd.py.html)

Re: unable to flash on microbitv2

Posted: Tue Dec 22, 2020 1:41 pm
by gekorob
Oh thanks a lot for your answer,
great I'll look at the links and will use your suggestions for sure.

Thanks again
Roberto