For pico port ntptime not standard?
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
For pico port ntptime not standard?
For pico port ntptime not standard? This because pico until recently did not have wifi via PicoW. Is there now an expectation that ntptime should be included in the base MP for pico?
I can't seem to find micropython-ntptime or any variant of it via the Thonny package management?
I can't seem to find micropython-ntptime or any variant of it via the Thonny package management?
Re: For pico port ntptime not standard?
ntptime.py is located in micropython/extmod, which is an unusual place. It should move to micropython-lib, now that the latter moved into the standard set of submodules. ntptime.py is included at some ports to the set of frozen bytecode.
edit: looking through the build system, it is included for Pico_W, esp8266, esp32
edit: looking through the build system, it is included for Pico_W, esp8266, esp32
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: For pico port ntptime not standard?
Yeah, that makes sense, since pico has not native wifi.
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: For pico port ntptime not standard?
If a package is installed in the lib tree, does that not imply it is frozen or such?
Re: For pico port ntptime not standard?
No. It just is pulled with "make submodules" or "git submodule update --init".If a package is installed in the lib tree, does that not imply it is frozen or such?
To have it frozen, it must be mentioned in the manifest.py files applying to that specific board. Then it will be included while building the firmware.
Re: For pico port ntptime not standard?
Yes, exactly as Robert said.Jibun no kage wrote: ↑Sun Aug 21, 2022 6:47 pmIf a package is installed in the lib tree, does that not imply it is frozen or such?
We cannot possibly include every single library from lib in the firmware.
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: For pico port ntptime not standard?
Yup, not suggesting any change... if I implied such, that was not intended. I am just developing my understanding how change can or should be done if done. I am still looking, learning how the extmod under mpy-cross relates to the port specific manifest list works for each board definition.
For example discussion only here, if I wanted to remove 'onewire' support, that is under the extmod 'scope'. Whereas if I want to remove 'spi' support, that is under the ports/* scope for rp2, and I should be looking at the boards configuration files.
Where or what all depends on the actual device hardware, and if the given component is abstracted or specific to the given device. Initially I was expecting a master manifest file, but as I am looking at things it is more modular than that.
I do have one question, the documentation notes that any thing in the 'modules' directory for a given port is included in the final image, does this mean that said 'modules' content are frozen as well, I want to say yes, but I have not looked at the actual logic as yet. And based on what Robert said above, to ensure it is frozen, I need to explicitly configure for that.
Clearly adding stuff is much easier than removing.
For example discussion only here, if I wanted to remove 'onewire' support, that is under the extmod 'scope'. Whereas if I want to remove 'spi' support, that is under the ports/* scope for rp2, and I should be looking at the boards configuration files.
Where or what all depends on the actual device hardware, and if the given component is abstracted or specific to the given device. Initially I was expecting a master manifest file, but as I am looking at things it is more modular than that.
I do have one question, the documentation notes that any thing in the 'modules' directory for a given port is included in the final image, does this mean that said 'modules' content are frozen as well, I want to say yes, but I have not looked at the actual logic as yet. And based on what Robert said above, to ensure it is frozen, I need to explicitly configure for that.
Clearly adding stuff is much easier than removing.
Re: For pico port ntptime not standard?
Most of the C-Coded modules are controlled by the port's mpconfigport.h, the global py/mpconfig.h and eventually a board's mpconfigboard.h. py/mpyconfig.h has the defaults, which are use if not configured otherwise. py/mpconfig.h includes mpconfigport.hm, which in turn may include mpyconfigboard.h or more.
The Python frozen modules are defined in the various manifest.py files, where the entry point is defined by the FROZEN_MANIFEST variable of Makefile. That one can be overridden when calling make.
The Python frozen modules are defined in the various manifest.py files, where the entry point is defined by the FROZEN_MANIFEST variable of Makefile. That one can be overridden when calling make.
Re: For pico port ntptime not standard?
Yes, exactly. ports/rp2/mpconfigport.hJibun no kage wrote: ↑Mon Aug 22, 2022 4:46 pmWhereas if I want to remove 'spi' support, that is under the ports/* scope for rp2, and I should be looking at the boards configuration files.
Code: Select all
#define MICROPY_PY_MACHINE_SPI (1)
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: For pico port ntptime not standard?
So 1 for include, 0 for exclude, right? Excluding frozen stuff seems straight forward if there is a manifest file.
But to exclude drivers, example I found that NeoPixel has a manifest file, but onewire for example does not. So not sure how to exclude drivers I don't need. For my ESP01 MQTT/UART image, I don't need sensor drivers or display drivers. But I have not as yet figured out exactly how to remove select drivers right.
Or how to remove core modules, say for example, webrepl. Do just change the MICRO_SOURCE_EXTMOD set, exclude the C source file modwebrepl.c but do I not also need to remove the generation of the object file and/or even the configuration that attempts linking?
But to exclude drivers, example I found that NeoPixel has a manifest file, but onewire for example does not. So not sure how to exclude drivers I don't need. For my ESP01 MQTT/UART image, I don't need sensor drivers or display drivers. But I have not as yet figured out exactly how to remove select drivers right.
Or how to remove core modules, say for example, webrepl. Do just change the MICRO_SOURCE_EXTMOD set, exclude the C source file modwebrepl.c but do I not also need to remove the generation of the object file and/or even the configuration that attempts linking?