aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorDamien George2019-10-14 12:09:06 +1100
committerDamien George2019-10-15 17:14:41 +1100
commitd7a9388fe0ac3b6df9e5994da1343488b17469cd (patch)
treedbe549dfc45d707827cb753574d8f038fd5da20a /ports
parent3ee71ff314c33410964edff6e12ffc638d2df661 (diff)
ports: Add new make target "submodules" which inits required modules.
Diffstat (limited to 'ports')
-rw-r--r--ports/esp32/Makefile2
-rw-r--r--ports/esp32/README.md9
-rw-r--r--ports/esp8266/Makefile2
-rw-r--r--ports/nrf/Makefile2
-rw-r--r--ports/nrf/README.md2
-rw-r--r--ports/samd/Makefile2
-rw-r--r--ports/stm32/Makefile2
-rw-r--r--ports/stm32/README.md6
-rw-r--r--ports/unix/Makefile2
9 files changed, 19 insertions, 10 deletions
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile
index 5d63a2586..2a752553e 100644
--- a/ports/esp32/Makefile
+++ b/ports/esp32/Makefile
@@ -38,6 +38,8 @@ FROZEN_MPY_DIR = modules
# include py core make definitions
include $(TOP)/py/py.mk
+GIT_SUBMODULES = lib/berkeley-db-1.xx
+
PORT ?= /dev/ttyUSB0
BAUD ?= 460800
FLASH_MODE ?= dio
diff --git a/ports/esp32/README.md b/ports/esp32/README.md
index 2c7351ee5..518cafb71 100644
--- a/ports/esp32/README.md
+++ b/ports/esp32/README.md
@@ -122,17 +122,10 @@ this repository):
$ make -C mpy-cross
```
-The ESP32 port has a dependency on Berkeley DB, which is an external
-dependency (git submodule). You'll need to have git initialize that
-module using the commands:
-```bash
-$ git submodule init lib/berkeley-db-1.xx
-$ git submodule update
-```
-
Then to build MicroPython for the ESP32 run:
```bash
$ cd ports/esp32
+$ make submodules
$ make
```
This will produce binary firmware images in the `build/` subdirectory
diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile
index 8cac07afc..030f39fa9 100644
--- a/ports/esp8266/Makefile
+++ b/ports/esp8266/Makefile
@@ -32,6 +32,8 @@ FROZEN_MPY_DIR ?= modules
# include py core make definitions
include $(TOP)/py/py.mk
+GIT_SUBMODULES = lib/axtls lib/berkeley-db-1.xx
+
FWBIN = $(BUILD)/firmware-combined.bin
PORT ?= /dev/ttyACM0
BAUD ?= 115200
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index a8bd95cc6..62208525f 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -41,6 +41,8 @@ QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
# include py core make definitions
include ../../py/py.mk
+GIT_SUBMODULES = lib/nrfx lib/tinyusb
+
MICROPY_FATFS ?= 0
FATFS_DIR = lib/oofatfs
MPY_CROSS = ../../mpy-cross/mpy-cross
diff --git a/ports/nrf/README.md b/ports/nrf/README.md
index 1b9c2ec7f..3c177c705 100644
--- a/ports/nrf/README.md
+++ b/ports/nrf/README.md
@@ -50,11 +50,11 @@ Prerequisite steps for building the nrf port:
git clone <URL>.git micropython
cd micropython
- git submodule update --init
make -C mpy-cross
By default, the PCA10040 (nrf52832) is used as compile target. To build and flash issue the following command inside the ports/nrf/ folder:
+ make submodules
make
make flash
diff --git a/ports/samd/Makefile b/ports/samd/Makefile
index 77a53bd48..23646a484 100644
--- a/ports/samd/Makefile
+++ b/ports/samd/Makefile
@@ -19,6 +19,8 @@ QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h
# Include py core make definitions
include $(TOP)/py/py.mk
+GIT_SUBMODULES = lib/asf4 lib/tinyusb
+
INC += -I.
INC += -I$(TOP)
INC += -I$(BUILD)
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index 28b90199a..112271fe1 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -24,6 +24,8 @@ FROZEN_MPY_DIR ?= modules
# include py core make definitions
include $(TOP)/py/py.mk
+GIT_SUBMODULES = lib/lwip lib/mbedtls lib/mynewt-nimble lib/stm32lib
+
MCU_SERIES_UPPER = $(shell echo $(MCU_SERIES) | tr '[:lower:]' '[:upper:]')
CMSIS_MCU_LOWER = $(shell echo $(CMSIS_MCU) | tr '[:upper:]' '[:lower:]')
diff --git a/ports/stm32/README.md b/ports/stm32/README.md
index a0c3b7ff3..f5ac362a8 100644
--- a/ports/stm32/README.md
+++ b/ports/stm32/README.md
@@ -40,7 +40,11 @@ see [here](https://launchpad.net/gcc-arm-embedded) for the main GCC ARM
Embedded page. The compiler can be changed using the `CROSS_COMPILE` variable
when invoking `make`.
-To build for a given board, run:
+First the submodules must be obtained using:
+
+ $ make submodules
+
+Then to build for a given board, run:
$ make BOARD=PYBV11
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 41552bf5c..134502b4d 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -16,6 +16,8 @@ UNAME_S := $(shell uname -s)
# include py core make definitions
include $(TOP)/py/py.mk
+GIT_SUBMODULES = lib/axtls lib/berkeley-db-1.xx lib/libffi
+
INC += -I.
INC += -I$(TOP)
INC += -I$(BUILD)