Skip to content

Booting from the SD card #3700

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

Closed
kahveciderin opened this issue Nov 16, 2020 · 11 comments
Closed

Booting from the SD card #3700

kahveciderin opened this issue Nov 16, 2020 · 11 comments

Comments

@kahveciderin
Copy link

Title says it all, I don't want the boot.py/main.py on the internal flash, rather in the SD card. How may I accomplish this?

@tannewt
Copy link
Member

tannewt commented Nov 16, 2020

We don't support it because the SD card may not exist. You can use import to load code off the SD card from main.py. #3454 also provides a new way to reload the VM and run a different file.

@tannewt tannewt closed this as completed Nov 16, 2020
@kahveciderin
Copy link
Author

@tannewt soo can I put the precompiled python data to the internal flash on the samd51 and tell the samd to execute a file from the sd card?

@ladyada
Copy link
Member

ladyada commented Nov 19, 2020

there isnt 'precompiled python' in the sense that it is executed. python is interpretted only. you can use mpy-cross to mpy'ify a py file, that only makes it more compact (bytecode conversion). then import it as any other python code

@tannewt
Copy link
Member

tannewt commented Nov 19, 2020

@kahveciderin I'm not sure what you are trying to accomplish.

@kahveciderin
Copy link
Author

@ladyada yeah that was what i meant

@tannewt i am trying to execute a file from the sd card, without the external flash.

@tannewt
Copy link
Member

tannewt commented Nov 23, 2020

@kahveciderin Please explain the larger context. I want to understand why you are trying to execute without internal flash.

We don't have a way to execute from the external flash without something on the built in flash fs.

@kahveciderin
Copy link
Author

@tannewt let's say I have soldered the flash chip out. I want to execute from the sd card. Is this possible?

@deshipu
Copy link

deshipu commented Nov 26, 2020

You can compile a version that uses a part of the internal flash for the filesystem.

@tannewt
Copy link
Member

tannewt commented Dec 1, 2020

@kahveciderin It is not possible with the current code. As deshipu points out, you could have a code.py on an internal filesystem to configure and run off the sd card.

@kahveciderin
Copy link
Author

@tannewt do I need to edit the run_code_py function in the main.c file?

@tannewt
Copy link
Member

tannewt commented Feb 10, 2021

@kahveciderin It depends on how you are mounting the SD card. If you mount it to / then you shouldn't need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants