Open kylinpoet opened 6 years ago
Make sure you've selected a "Flash ...", not a regular "Python" run configuration.
Make sure you've selected a "Flash ...", not a regular "Python" run configuration.
Sorry for my poor understanding、、、 I use the pycharm for windows: There's something different。。。 Could you show more tips? 囧囧囧
Everything looks correct so far. Please edit one of your t1.py or r1.py run configurations and try to specify the path to your project directory instead of a specific *.py file. Please attach a screenshot if you see any errors you don't expect.
What I had done are these: What's the next now?? Sorry again for disturbing you...
@kylinpoet I got it now. Uploading multiple file to Micro:bit devices is not supported yet. It works only for ESP8266 and Pyboard. Sorry about that. A pull request that adds support for it is welcome. It will require changing the upload method from uflash
so some other packages that actually allows transferring multiple files.
@vlasovskikh You mentioned here that the upload method would need to be changed from uflash
to some other packages that allow transferring multiple files, do you happen to know of any that would achieve this?
I'm embarking on a big project using a micro:bit which I really don't want to develop all in a single file! I'm unsure how to flash multiple files though.
Cheers!
@adam-binks Sorry, I'm not aware of any. I haven't done any research, so it may be possible that a tool for uploading multiple files to Micro:bit devices exists. AFAIK uflash
allows to upload only a single Python file built into the binary of the MicroPython interpreter itself.
https://github.com/ntoll/microfs/ can be used to add multiple files to the micro:bit MicroPython filesystem.
https://github.com/ntoll/microfs/ can be used to add multiple files to the micro:bit MicroPython filesystem.
In a sample project I was able to successfully use ufs
to upload a multi-file Pyhon project to the microbit.
One detail I found is that becase a file is executed straight away, any dependencies must be uploaded first.
Example from the Makefile of my test project:
flashit:
ufs put src/config.py
sleep 5
ufs put src/main.py
main.py
contains import config
, therefore config.py
has to be on the microbit already when main.py
uploaded.
I had done follow the instruction:
BUT it shows: