-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/t/main.py #81
Comments
What kind of problem this solves? |
The idea is that I could rewrite the main.py on the sd card without having to burn again the whole firmware nor risking to mess up with the internal storage |
Do you say you have problems rewriting |
No, my idea is that I burn the firmware, so the device is ready and working, I can then pack it into a nice case but anytime I want to change something I will just need to rewrite the /t/main.py on the sd card without having to take the board out and burn a new firmware. |
or having to connect via serial which is also not as easy as to connect via wifi for instance on the esp32... |
You may put sys.path.append("/t")
import main_from_sd_card before packing into a nice case. Then, change to whatever you want in |
By the way you don't have to re-burn firmware to update main.py, you can use ampy, and upload files through UART. |
of course Pulkin I could do it so but I would then need to connect the board to the HST pins, burn the firmware, then connect the uart, write the /main.py and disconnect which is fine if I am doing on a board but what if I am flashing hundreds? I mean I could also easily write my own version of modules/_boot.py I was just wondering if a similar feature could be helpful to someone else and as micropython already is anyway looking for a /boot.py and a /main.py why not adding for this specific board support for a /t/main.py? :) |
Oh, I've got your point. |
Then you may update If you provide an example of at least one other mainstream |
Yesterday, I put machine.restart() line at boot.py ! From documentation: If needed, you can prevent the use of the SD card by creating an empty file called /flash/SKIPSD. If this file exists when the pyboard boots up then the SD card will be skipped and the pyboard will always boot from the internal filesystem (in this case the SD card won’t be mounted but you can still mount and use it later in your program using os.mount). `` |
Question is now, should we run /boot.py and /main.py anyway first if they are present?
|
take a look here: |
Would it make sense to add a /t/main.py check and eventual execution by default?
I mean I think that is the spirit of boot.py and main.py so having in this case an sd card would be a pity not to implement it :)
The text was updated successfully, but these errors were encountered: