circuitpython/minimal
Damien George 4ebdb1f2b2 py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.
In order to have more fine-grained control over how builtin functions are
constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific,
with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW.  These names now
match the MP_DEFINE_CONST_FUN_OBJ macros.
2016-10-21 16:26:01 +11:00
..
Makefile py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled. 2016-09-05 12:18:53 +10:00
README.md minimal: Add enough code to run minimal build on STM32F4xx hardware. 2016-01-07 17:43:07 +00:00
frozentest.mpy minimal: Add example of frozen persistent bytecode (.mpy file). 2016-04-13 16:07:47 +01:00
frozentest.py minimal: Add example of frozen persistent bytecode (.mpy file). 2016-04-13 16:07:47 +01:00
main.c minimal: Add enough code to run minimal build on STM32F4xx hardware. 2016-01-07 17:43:07 +00:00
mpconfigport.h py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros. 2016-10-21 16:26:01 +11:00
mphalport.h all: Add py/mphal.h and use it in all ports. 2015-10-31 19:14:30 +03:00
qstrdefsport.h minimal: New port, intended to represent minimal working code. 2015-01-13 03:17:47 +02:00
stm32f405.ld minimal: Add enough code to run minimal build on STM32F4xx hardware. 2016-01-07 17:43:07 +00:00
uart_core.c minimal: Add enough code to run minimal build on STM32F4xx hardware. 2016-01-07 17:43:07 +00:00

README.md

The minimal port

This port is intended to be a minimal MicroPython port that actually runs. It can run under Linux (or similar) and on any STM32F4xx MCU (eg the pyboard).

Building and running Linux version

By default the port will be built for the host machine:

$ make

To run a small test script do:

$ make run

Building for an STM32 MCU

The Makefile has the ability to build for a Cortex-M CPU, and by default includes some start-up code for an STM32F4xx MCU and also enables a UART for communication. To build:

$ make CROSS=1

If you previously built the Linux version, you will need to first run make clean to get rid of incompatible object files.

Building will produce the build/firmware.dfu file which can be programmed to an MCU using:

$ make CROSS=1 deploy

This version of the build will work out-of-the-box on a pyboard (and anything similar), and will give you a MicroPython REPL on UART1 at 9600 baud. Pin PA13 will also be driven high, and this turns on the red LED on the pyboard.