Skip to content
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

nrf/main: Execute boot.py and main.py frozen modules without file system #5374

Closed
wants to merge 1 commit into from

Conversation

@akrejcir
Copy link
Contributor

akrejcir commented Dec 3, 2019

When the file system is not enabled, the boot.py and main.py modules will still be executed, if they are frozen.

if (mp_import_stat(filename) != MP_IMPORT_STAT_FILE) {
return 1; // success (no file is the same as an empty file executing without fail)
#if MICROPY_VFS || MICROPY_MBFS
if (mp_import_stat(filename) == MP_IMPORT_STAT_FILE) {

This comment has been minimized.

Copy link
@dpgeorge

dpgeorge Dec 5, 2019

Member

mp_import_stat() should always be provided by a port, regardless of the MICROPY_VFS setting. In other words, this code is still valid if MICROPY_VFS is disabled, so shouldn't be excluded with this #if

This comment has been minimized.

Copy link
@akrejcir

akrejcir Dec 5, 2019

Author Contributor

Ok. Removed this change.

@@ -230,11 +230,9 @@ pin_init0();

led_state(1, 0);

#if MICROPY_VFS || MICROPY_MBFS

This comment has been minimized.

Copy link
@dpgeorge

dpgeorge Dec 5, 2019

Member

How about just changing this line to #if MICROPY_VFS || MICROPY_MBFS || MICROPY_MODULE_FROZEN?

This comment has been minimized.

Copy link
@akrejcir

akrejcir Dec 5, 2019

Author Contributor

Done.

@dpgeorge dpgeorge added the port-nrf label Dec 5, 2019
When the file system is not enabled, the boot.py and main.py modules
will still be executed, if they are frozen.
@dpgeorge

This comment has been minimized.

Copy link
Member

dpgeorge commented Dec 5, 2019

Thanks for updating. Rebased and merged in 210d053

@dpgeorge dpgeorge closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.