Browse Source

all: Update all manifest.py files to use new features.

Changes in this commit:
- Manifest include's now use the directory path where possible (no longer
  necessary to include the manifest.py file explicitly).
- Add manifest.py for all drivers and components that are referenced by
  port/board manifests.
- Replace all uses of freeze() with package()/module(), except for port and
  board modules.
- Use opt=3 everywhere, for consistency and to reduce code size.
- Use require() instead of include() for all micropython-lib references.
- Remove support for optional board-level manifest.py in mimxrt port, to
  make it behave the same as other ports (the board must set
  FROZEN_MANIFEST to a custom manifest.py, which can optionally include the
  default, port-level manifest).
- Also reinstates modules that were accidentally removed from the esp8266
  512k build in fbe9417b90.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
pull/9216/head
Jim Mussared 2 years ago
committed by Damien George
parent
commit
203dae41fb
  1. 1
      drivers/codec/manifest.py
  2. 1
      drivers/dht/manifest.py
  3. 11
      drivers/display/manifest.py
  4. 1
      drivers/hts221/manifest.py
  5. 1
      drivers/lps22h/manifest.py
  6. 1
      drivers/lsm6dsox/manifest.py
  7. 1
      drivers/lsm9ds1/manifest.py
  8. 6
      drivers/neopixel/manifest.py
  9. 1
      drivers/nrf24l01/manifest.py
  10. 6
      drivers/onewire/manifest.py
  11. 1
      drivers/sdcard/manifest.py
  12. 20
      extmod/uasyncio/manifest.py
  13. 3
      extmod/webrepl/manifest.py
  14. 2
      ports/esp32/boards/LILYGO_TTGO_LORA32/manifest.py
  15. 2
      ports/esp32/boards/LOLIN_S2_PICO/manifest.py
  16. 2
      ports/esp32/boards/UM_FEATHERS2/manifest.py
  17. 25
      ports/esp32/boards/manifest.py
  18. 14
      ports/esp8266/boards/GENERIC/manifest.py
  19. 13
      ports/esp8266/boards/GENERIC_512K/manifest.py
  20. 13
      ports/esp8266/boards/manifest.py
  21. 10
      ports/mimxrt/boards/manifest.py
  22. 6
      ports/nrf/boards/arduino_nano_33_ble_sense/manifest.py
  23. 4
      ports/nrf/modules/manifest.py
  24. 2
      ports/renesas-ra/boards/RA4M1_CLICKER/manifest.py
  25. 2
      ports/renesas-ra/boards/RA4M1_EK/manifest.py
  26. 8
      ports/renesas-ra/boards/manifest.py
  27. 20
      ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/manifest.py
  28. 8
      ports/rp2/boards/PICO_W/manifest.py
  29. 8
      ports/rp2/boards/manifest.py
  30. 10
      ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py
  31. 2
      ports/stm32/boards/GARATRONIC_PYBSTICK26_F411/manifest.py
  32. 2
      ports/stm32/boards/LEGO_HUB_NO6/manifest.py
  33. 7
      ports/stm32/boards/LEGO_HUB_NO7/manifest.py
  34. 2
      ports/stm32/boards/PYBD_SF2/manifest.py
  35. 9
      ports/stm32/boards/manifest.py
  36. 2
      ports/unix/variants/dev/manifest.py
  37. 4
      ports/unix/variants/manifest.py
  38. 2
      ports/windows/variants/dev/manifest.py

1
drivers/codec/manifest.py

@ -0,0 +1 @@
module("wm8960.py", opt=3)

1
drivers/dht/manifest.py

@ -0,0 +1 @@
module("dht.py", opt=3)

11
drivers/display/manifest.py

@ -0,0 +1,11 @@
# TODO: Split these into separate directories with their own manifests.
options.defaults(lcd160cr=False, ssd1306=False, test=True)
if options.lcd160cr:
module("lcd160cr.py", opt=3)
if options.test:
module("lcd160cr_test.py", opt=3)
if options.ssd1306:
module("ssd1306.py", opt=3)

1
drivers/hts221/manifest.py

@ -0,0 +1 @@
module("hts221.py", opt=3)

1
drivers/lps22h/manifest.py

@ -0,0 +1 @@
module("lps22h.py", opt=3)

1
drivers/lsm6dsox/manifest.py

@ -0,0 +1 @@
module("lsm6dsox.py", opt=3)

1
drivers/lsm9ds1/manifest.py

@ -0,0 +1 @@
module("lsm9ds1.py", opt=3)

6
drivers/neopixel/manifest.py

@ -1,5 +1 @@
freeze(
".",
"neopixel.py",
opt=3,
)
module("neopixel.py", opt=3)

1
drivers/nrf24l01/manifest.py

@ -0,0 +1 @@
module("nrf24l01.py", opt=3)

6
drivers/onewire/manifest.py

@ -0,0 +1,6 @@
options.defaults(ds18x20=False)
module("onewire.py", opt=3)
if options.ds18x20:
module("ds18x20.py", opt=3)

1
drivers/sdcard/manifest.py

@ -0,0 +1 @@
module("sdcard.py", opt=3)

20
extmod/uasyncio/manifest.py

@ -1,13 +1,15 @@
# This list of frozen files doesn't include task.py because that's provided by the C module.
freeze(
"..",
# This list of package files doesn't include task.py because that's provided
# by the C module.
package(
"uasyncio",
(
"uasyncio/__init__.py",
"uasyncio/core.py",
"uasyncio/event.py",
"uasyncio/funcs.py",
"uasyncio/lock.py",
"uasyncio/stream.py",
"__init__.py",
"core.py",
"event.py",
"funcs.py",
"lock.py",
"stream.py",
),
base_path="..",
opt=3,
)

3
extmod/webrepl/manifest.py

@ -1 +1,2 @@
freeze(".", ("webrepl.py", "webrepl_setup.py"))
module("webrepl.py", opt=3)
module("webrepl_setup.py", opt=3)

2
ports/esp32/boards/LILYGO_TTGO_LORA32/manifest.py

@ -1,4 +1,4 @@
include("$(PORT_DIR)/boards/manifest.py")
freeze("modules")
freeze("$(MPY_DIR)/drivers/display", "ssd1306.py")
include("$(MPY_DIR)/drivers/display", ssd1306=True)

2
ports/esp32/boards/LOLIN_S2_PICO/manifest.py

@ -1,4 +1,4 @@
include("$(PORT_DIR)/boards/manifest.py")
freeze("./modules")
freeze("$(MPY_DIR)/drivers/display", "ssd1306.py")
include("$(MPY_DIR)/drivers/display", ssd1306=True)

2
ports/esp32/boards/UM_FEATHERS2/manifest.py

@ -1,3 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")
freeze("$(PORT_DIR)/boards/UM_TINYPICO/modules", "dotstar.py")
module("dotstar.py", base_path="$(PORT_DIR)/boards/UM_TINYPICO/modules", opt=3)
freeze("modules")

25
ports/esp32/boards/manifest.py

@ -1,14 +1,15 @@
freeze("$(PORT_DIR)/modules")
freeze("$(MPY_DIR)/tools", ("upip.py", "upip_utarfile.py"))
freeze("$(MPY_DIR)/extmod", "ntptime.py")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
include("$(MPY_DIR)/drivers/neopixel/manifest.py")
module("upip.py", base_path="$(MPY_DIR)/tools", opt=3)
module("upip_utarfile.py", base_path="$(MPY_DIR)/tools", opt=3)
module("ntptime.py", base_path="$(MPY_DIR)/extmod", opt=3)
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/drivers/neopixel")
include("$(MPY_DIR)/extmod/uasyncio")
include("$(MPY_DIR)/extmod/webrepl")
# Freeze some micropython-lib modules.
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
freeze("$(MPY_LIB_DIR)/micropython/upysh", "upysh.py")
freeze("$(MPY_LIB_DIR)/micropython/umqtt.simple", "umqtt/simple.py")
freeze("$(MPY_LIB_DIR)/micropython/umqtt.robust", "umqtt/robust.py")
# Require some micropython-lib modules.
require("urequests")
require("upysh")
require("umqtt.simple")
require("umqtt.robust")

14
ports/esp8266/boards/GENERIC/manifest.py

@ -2,18 +2,18 @@
include("$(PORT_DIR)/boards/manifest.py")
# uasyncio
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
include("$(MPY_DIR)/extmod/uasyncio")
# drivers
freeze("$(MPY_DIR)/drivers/display", "ssd1306.py")
include("$(MPY_DIR)/drivers/display", ssd1306=True)
# micropython-lib: file utilities
freeze("$(MPY_LIB_DIR)/micropython/upysh", "upysh.py")
require("upysh")
# micropython-lib: requests
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
freeze("$(MPY_LIB_DIR)/micropython/urllib.urequest", "urllib/urequest.py")
require("urequests")
require("urllib.urequest")
# micropython-lib: umqtt
freeze("$(MPY_LIB_DIR)/micropython/umqtt.simple", "umqtt/simple.py")
freeze("$(MPY_LIB_DIR)/micropython/umqtt.robust", "umqtt/robust.py")
require("umqtt.simple")
require("umqtt.robust")

13
ports/esp8266/boards/GENERIC_512K/manifest.py

@ -1,5 +1,8 @@
freeze("$(BOARD_DIR)", "_boot.py", opt=3)
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
include("$(MPY_DIR)/drivers/neopixel/manifest.py")
module("_boot.py", opt=3)
module("apa102.py", base_path="$(PORT_DIR)/modules", opt=3)
module("port_diag.py", base_path="$(PORT_DIR)/modules", opt=3)
module("ntptime.py", base_path="$(MPY_DIR)/extmod", opt=3)
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/extmod/webrepl")
include("$(MPY_DIR)/drivers/neopixel")

13
ports/esp8266/boards/manifest.py

@ -1,7 +1,8 @@
freeze("$(PORT_DIR)/modules")
freeze("$(MPY_DIR)/extmod", "ntptime.py")
freeze("$(MPY_DIR)/tools", ("upip.py", "upip_utarfile.py"))
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
include("$(MPY_DIR)/drivers/neopixel/manifest.py")
module("upip.py", base_path="$(MPY_DIR)/tools", opt=3)
module("upip_utarfile.py", base_path="$(MPY_DIR)/tools", opt=3)
module("ntptime.py", base_path="$(MPY_DIR)/extmod", opt=3)
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/extmod/webrepl")
include("$(MPY_DIR)/drivers/neopixel")

10
ports/mimxrt/boards/manifest.py

@ -1,8 +1,4 @@
freeze("$(PORT_DIR)/modules")
freeze("$(MPY_DIR)/drivers/onewire")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
try:
include("$(BOARD_DIR)/manifest.py")
except FileNotFoundError:
pass
include("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/extmod/uasyncio")

6
ports/nrf/boards/arduino_nano_33_ble_sense/manifest.py

@ -1,4 +1,4 @@
include("$(PORT_DIR)/modules/manifest.py")
freeze("$(MPY_DIR)/drivers/hts221", "hts221.py")
freeze("$(MPY_DIR)/drivers/lps22h", "lps22h.py")
freeze("$(MPY_DIR)/drivers/lsm9ds1", "lsm9ds1.py")
include("$(MPY_DIR)/drivers/hts221")
include("$(MPY_DIR)/drivers/lps22h")
include("$(MPY_DIR)/drivers/lsm9ds1")

4
ports/nrf/modules/manifest.py

@ -1,2 +1,2 @@
freeze("$(PORT_DIR)/modules/scripts", "_mkfs.py")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
module("_mkfs.py", base_path="$(PORT_DIR)/modules/scripts", opt=3)
include("$(MPY_DIR)/extmod/uasyncio")

2
ports/renesas-ra/boards/RA4M1_CLICKER/manifest.py

@ -1,2 +1,2 @@
# We do not want to include default frozen modules,
freeze("$(MPY_DIR)/drivers/sdcard", "sdcard.py")
include("$(MPY_DIR)/drivers/sdcard")

2
ports/renesas-ra/boards/RA4M1_EK/manifest.py

@ -1,2 +1,2 @@
# We do not want to include default frozen modules,
freeze("$(MPY_DIR)/drivers/sdcard", "sdcard.py")
include("$(MPY_DIR)/drivers/sdcard")

8
ports/renesas-ra/boards/manifest.py

@ -1,4 +1,4 @@
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/onewire", "onewire.py")
freeze("$(MPY_DIR)/drivers/sdcard", "sdcard.py")
include("$(MPY_DIR)/extmod/uasyncio")
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/drivers/onewire", ds18x20=False)
include("$(MPY_DIR)/drivers/sdcard")

20
ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/manifest.py

@ -1,11 +1,11 @@
include("$(PORT_DIR)/boards/manifest.py")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
freeze("$(MPY_DIR)/drivers/lsm6dsox/", "lsm6dsox.py")
include(
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
client=True,
central=True,
l2cap=True,
security=True,
)
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
# Networking
include("$(MPY_DIR)/extmod/webrepl")
require("urequests")
# Drivers
include("$(MPY_DIR)/drivers/lsm6dsox")
# Bluetooth
require("aioble", client=True, central=True, l2cap=True, security=True)

8
ports/rp2/boards/PICO_W/manifest.py

@ -1,7 +1,7 @@
include("../manifest.py")
freeze("$(MPY_DIR)/tools", "upip.py")
freeze("$(MPY_DIR)/tools", "upip_utarfile.py")
freeze("$(MPY_DIR)/extmod", "ntptime.py")
module("upip.py", base_path="$(MPY_DIR)/tools", opt=3)
module("upip_utarfile.py", base_path="$(MPY_DIR)/tools", opt=3)
module("ntptime.py", base_path="$(MPY_DIR)/extmod", opt=3)
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
require("urequests")

8
ports/rp2/boards/manifest.py

@ -1,5 +1,5 @@
freeze("$(PORT_DIR)/modules")
freeze("$(MPY_DIR)/drivers/onewire")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
include("$(MPY_DIR)/drivers/neopixel/manifest.py")
include("$(MPY_DIR)/drivers/onewire")
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/extmod/uasyncio")
include("$(MPY_DIR)/drivers/neopixel")

10
ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py

@ -1,9 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
include(
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
client=True,
central=True,
l2cap=True,
security=True,
)
include("$(MPY_DIR)/extmod/webrepl")
require("aioble", client=True, central=True, l2cap=True, security=True)

2
ports/stm32/boards/GARATRONIC_PYBSTICK26_F411/manifest.py

@ -1,2 +1,2 @@
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
# Note: Freezes to display.ssd1306, so must use deprecated "freeze" function.
freeze("$(MPY_DIR)/drivers/", ("display/ssd1306.py"))

2
ports/stm32/boards/LEGO_HUB_NO6/manifest.py

@ -1,3 +1,5 @@
# Shared manifest for LEGO_HUB_NO6 & LEGO_HUB_NO7.
include("$(PORT_DIR)/boards/manifest.py")
# Modules for application firmware update.

7
ports/stm32/boards/LEGO_HUB_NO7/manifest.py

@ -1,5 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
# Modules for application firmware update.
freeze("$(PORT_DIR)/mboot", "fwupdate.py", opt=3)
freeze("$(PORT_DIR)/boards/LEGO_HUB_NO6", ("spiflash.py", "appupdate.py"), opt=3)
# Use shared manifest.
include("$(PORT_DIR)/boards/LEGO_HUB_NO6")

2
ports/stm32/boards/PYBD_SF2/manifest.py

@ -1,2 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
include("$(MPY_DIR)/extmod/webrepl")

9
ports/stm32/boards/manifest.py

@ -1,4 +1,5 @@
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/display", ("lcd160cr.py", "lcd160cr_test.py"))
freeze("$(MPY_DIR)/drivers/onewire", "onewire.py")
include("$(MPY_DIR)/extmod/uasyncio")
include("$(MPY_DIR)/drivers/dht")
include("$(MPY_DIR)/drivers/display", lcd160cr=True, test=True)
include("$(MPY_DIR)/drivers/onewire", ds18x20=False)

2
ports/unix/variants/dev/manifest.py

@ -1,3 +1,3 @@
include("$(PORT_DIR)/variants/manifest.py")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
include("$(MPY_DIR)/extmod/uasyncio")

4
ports/unix/variants/manifest.py

@ -1,2 +1,2 @@
freeze_as_mpy("$(MPY_DIR)/tools", "upip.py")
freeze_as_mpy("$(MPY_DIR)/tools", "upip_utarfile.py", opt=3)
module("upip.py", base_path="$(MPY_DIR)/tools", opt=3)
module("upip_utarfile.py", base_path="$(MPY_DIR)/tools", opt=3)

2
ports/windows/variants/dev/manifest.py

@ -1,2 +1,2 @@
include("$(PORT_DIR)/variants/manifest.py")
include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
include("$(MPY_DIR)/extmod/uasyncio")

Loading…
Cancel
Save