Remember to use proper tabs to indent the Makefile. $(BUILD)/firmware.elf : $( OBJ ) $(ECHO ) "LINK " $(Q )$(CC ) $(LDFLAGS ) -o $^ $(LIBS ) $(Q )$(SIZE ) # Include remaining core make rules. OBJ = $(PY_CORE_O ) $(addprefix $(BUILD )/, $(SRC_C.c =.o )) # Define the top-level target, the main firmware. Shared/runtime/stdout_helpers.c \ # Define the required object files. include $(TOP)/py/py.mk include $(TOP)/extmod/extmod.mk # Set CFLAGS and libraries. /py/mkenv.mk # Include py core make definitions. # Include the core environment definitions this will set $(TOP). We also need a Makefile at this point for the port: static char heap int main ( int argc, char ** argv ) #include "py/compile.h" #include "py/gc.h" #include "py/mperrno.h" #include "py/stackctrl.h" #include "shared/runtime/gchelper.h" #include "shared/runtime/pyexec.h" // Allocate memory for the MicroPython GC heap. For this walkthrough, create a subdirectory for the new The best way to start porting MicroPython to a new board is by integrating a minimal Performing the board-specific configurations. Initialising basic drivers required for development and debugging (e.g. Implementing boot configuration and CPU initialization. Setting up the toolchain (configuring Makefiles, etc). a development kit or device.Īvailable as a simplified reference implementation of a MicroPython port. The project repository has a portsĭirectory containing a subdirectory for each supported port.Ī port will typically contain definitions for multiple “boards”, each of which is a specific piece of The MicroPython project contains several ports to different microcontroller families andĪrchitectures.
0 Comments
Leave a Reply. |