8000 mimxrt/README: Add build and flashing instructions. · pybricks/micropython@f44246c · GitHub
[go: up one dir, main page]

Skip to content

Commit f44246c

Browse files
ThinkTransitdpgeorge
authored andcommitted
mimxrt/README: Add build and flashing instructions.
1 parent 5e990cc commit f44246c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

ports/mimxrt/README.md

Lines changed: 44 additions & 0 deletions
< 8000 /tr>
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,47 @@ Known issues:
2929
TODO:
3030
- More peripherals (Counter, I2S, CAN, etc)
3131
- More Python options
32+
33+
## Build Instructions
34+
35+
Before building the firmware for a given board the MicroPython cross-compiler
36+
must be built; it will be used to pre-compile some of the built-in scripts to
37+
bytecode. The cross-compiler is built and run on the host machine, using:
38+
39+
$ make -C mpy-cross
40+
41+
This command should be executed from the root directory of this repository.
42+
All other commands below should be executed from the ports/mimxrt/ directory.
43+
44+
An ARM compiler is required for the build, along with the associated binary
45+
utilities. The default compiler is `arm-none-eabi-gcc`, which is available for
46+
Arch Linux via the package `arm-none-eabi-gcc`, for Ubuntu via instructions
47+
[here](https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa), or
48+
see [here](https://launchpad.net/gcc-arm-embedded) for the main GCC ARM
49+
Embedded page. The compiler can be changed using the `CROSS_COMPILE` variable
50+
when invoking `make`.
51+
52+
In addition newlib is required which is available for Arch Linux via the
53+
package `arm-none-eabi-newlib`, for Ubuntu/Debian install package `libnewlib-arm-none-eabi`
54+
55+
Next, the board to build must be selected. Any of the board names of the
56+
subdirectories in the `boards/` directory is a valid board. The board name
57+
must be passed as the argument to `BOARD=` when invoking `make`.
58+
59+
All boards require certain submodules to be obtained before they can be built.
60+
The correct set of submodules can be initialised using (with `SEEED_ARCH_MIX`
61+
as an example of the selected board):
62+
63+
$ make BOARD=SEEED_ARCH_MIX submodules
64+
65+
Then to build the board's firmware run:
66+
67+
$ make BOARD=SEEED_ARCH_MIX
68+
69+
The above command should produce binary images in the `build-SEEED_ARCH_MIX/`
70+
subdirectory (or the equivalent directory for the board specified).
71+
72+
## Flashing
73+
74+
Deploy the firmware following the instructions here
75+
https://docs.micropython.org/en/latest/mimxrt/tutorial/intro.html#deploying-the-firmware

0 commit comments

Comments
 (0)
0