@@ -19,3 +19,61 @@ The following more advanced features will follow later:
19
19
- Ethernet support.
20
20
- SDRAM support.
21
21
- Other machine modules.
22
+
23
+ Build instructions
24
+ ------------------
25
+
26
+ Before building the firmware for a given board the MicroPython cross-compiler
27
+ must be built; it will be used to pre-compile some of the built-in scripts to
28
+ bytecode. The cross-compiler is built and run on the host machine, using:
29
+ ``` bash
30
+ $ make -C mpy-cross
31
+ ```
32
+
33
+ This command should be executed from the root directory of this repository.
34
+ All other commands below should be executed from the ports/alif/ directory.
35
+
36
+ An ARM compiler is required for the build, along with the associated binary
37
+ utilities. The recommended toolchain version to use with this port is
38
+ Arm GNU toolchain version 13.3.Rel1. The compiler can be changed using the
39
+ ` CROSS_COMPILE ` variable when invoking ` make ` .
40
+
41
+ Next, the board to build must be selected. The default board is ` ALIF_ENSEMBLE `
42
+ but any of the names of the subdirectories in the ` boards/ ` directory is valid.
43
+ The board name must be passed as the argument to ` BOARD= ` when invoking ` make ` .
44
+
45
+ All boards require certain submodules to be obtained before they can be built.
46
+ The correct set of submodules can be initialised using (with ` ALIF_ENSEMBLE `
47
+ as an example of the selected board):
48
+ ``` bash
49
+ make BOARD=ALIF_ENSEMBLE submodules
50
+ ```
51
+
52
+ Then to build the board's firmware run:
53
+ ``` bash
54
+ make BOARD=ALIF_ENSEMBLE
55
+ ```
56
+
57
+ The above command should produce binary images in the ` build-ALIF_ENSEMBLE/ `
58
+ subdirectory (or the equivalent directory for the board specified).
59
+
60
+ ### Update the SE Firmware
61
+
62
+ The SE firmware must be updated ** before** flashing the main firmware to match
63
+ the version used by MicroPython. This step only needs to be performed once.
64
+ Connect the board to your PC via the ** SE UART USB** port (on the Ensemble kit,
65
+ this is labeled ** PRG USB** ), then run:
66
+
67
+ ``` bash
68
+ make update-system-package
69
+ ```
70
+
71
+ ** Note:** The board must be power-cycled after this step.
72
+
73
+ ### Deploy MicroPython
74
+
75
+ To flash the firmware, run:
76
+
77
+ ``` bash
78
+ make BOARD=ALIF_ENSEMBLE deploy
79
+ ```
0 commit comments