aboutsummaryrefslogtreecommitdiff
path: root/mpy-cross/Makefile
AgeCommit message (Collapse)Author
2020-10-22mpy-cross: Enable more warnings.Emil Renner Berthing
2020-04-29all: Factor gchelper code to one place and use it for unix & ARM ports.Jim Mussared
No functionality change is intended with this commit, it just consolidates the separate implementations of GC helper code to the lib/utils/ directory as a general set of helper functions useful for any port. This reduces duplication of code, and makes it easier for future ports or embedders to get the GC implementation correct. Ports should now link against gchelper_native.c and either gchelper_m0.s or gchelper_m3.s (currently only Cortex-M is supported but other architectures can follow), or use the fallback gchelper_generic.c which will work on x86/x64/ARM. The gc_helper_get_sp function from gchelper_m3.s is not really GC related and was only used by cc3200, so it has been moved to that port and renamed to cortex_m3_get_sp.
2019-06-03mpy-cross: Do not automatically build mpy-cross, rather do it manually.Damien George
Building mpy-cross automatically leads to some issues with the build process and slows it down. Instead, require it to be built manually.
2019-03-08py: Update and rework build system for including external C modules.Andrew Leech
How to use this feature is documented in docs/develop/cmodules.rst.
2018-08-14mpy-cross/Makefile: Also undefine MICROPY_FORCE_32BIT and CROSS_COMPILE.Paul Sokolovsky
mpy-cross is a host, not target binary. It should not be build with the target compiler, compiler options and other settings. For example, If someone currently tries to build from pristine checkout the unix port with the following command: make CROSS_COMPILE=arm-linux-gnueabihf- then mpy-cross will be built with arm-linux-gnueabihf-gcc and of course won't run on the host, leading to overall build failure. This situation was worked around for some options in 1d8c3f4cff1, so add MICROPY_FORCE_32BIT and CROSS_COMPILE to that set too.
2018-07-10mpy-cross: Make build independent of extmod directory.Damien George
mpy-cross doesn't depend on any code in the extmod directory so completely exclude it from the build (extmod may still be scanned for qstrs but that is controlled by py/py.mk). This speeds up the build a little, and improves abstraction of this component. Also, make -I$(BUILD) take precedence over -I$(TOP) in case there are stray files in the root directory that would be picked up.
2017-09-06all: Update Makefiles and others to build with new ports/ dir layout.Damien George
Also renames "stmhal" to "stm32" in documentation and everywhere else.
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-19all: Remove trailing spaces, per coding conventions.Damien George
2017-05-26mpy-cross/Makefile: Guard "override undefine" by test for make feature.Damien George
make v3.81 doesn't have "undefine" so we can't use it with that version.
2017-05-11mpy-cross/Makefile: Override undefine any inherited variables.Damien George
This is a temporary hack to allow othe Makefiles to build mpy-cross recursively.
2017-05-03mpy-cross: Fix compiler detection for including windows/fmode.cstijn
fmode.c should only be included for builds targetting 'pure' windows, i.e. msvc or mingw builds but not when using msys or cygwin's gcc (see #2298). Just checking if the OS is windows and UNAME doesn't have msys stil leaves the gate open for builds with cygwin's gcc since UNAME there is e.g. CYGWIN_NT-6.1-WOW. Fix this by checking for 'mingw' explicitly in the compiler version; both gcc and clang have the -dumpmachine flag so the check should be ok for all platforms.
2017-03-23all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
2016-07-30mpy-cross: Fix mingw and msys2 compilationstijn
When compiling with msys2's gcc there's no need to apply the binary fmode so adjust the Makefile to reflect that. When compiling with mingw we need to include malloc.h since there is no alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.
2016-07-22mpy-cross: Use binary file translation mode for creating mpy files on windowsstijn
This is a fix for https://github.com/micropython/micropython/issues/2209: by default a file created using open() uses text translation mode so writing \n to it will result in the file having \r\n. This is obviously problematic for binary .mpy files, so provide functions for setting the open mode and use binary mode in mpy-cross' main().
2016-07-11mpy-cross: Fix Makefile to handle gc-sections linker flags on OS X.Anton Sokolchenko
2016-03-09mpy-cross: Remove setting of MICROPY_FORCE_32BIT=1 from Makefile.Damien George
Building in 32-bit mode was only to reduce binary size on 64-bit machines and is otherwise not needed. Having it forced to 32-bit meant an unnecessary dependency on 32-bit libraries that is now removed.
2016-02-25mpy-cross: Add new component, a cross compiler for MicroPython bytecode.Damien George
This component allows to generate .mpy files (pre compiled bytecode) which can be executed within any MicroPython runtime/VM.