summaryrefslogtreecommitdiff
path: root/mpy-cross
AgeCommit message (Collapse)Author
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-03-01Makefiles: add targets to build unix port, mpy-cross for fuzzingJeff Epler
This assumes you have properly install afl-fuzz with afl-clang-fast. Tested with AFLplusplus 2.60c-75-g2c6847b.
2020-01-25alphabetizeJeff Epler
2020-01-25rework gitignore fileJeff Epler
2020-01-25Add a makefile to cross-compile for raspbianJeff Epler
2020-01-25Define serial_write, it was undefined in the Windows mpy-cross buildJeff Epler
2020-01-25mpy-cross: Make it easier to build mpy-cross static targetsJeff Epler
2019-03-12Stub out safe mode for mpy-crossScott Shawcroft
2018-12-06Add stack.c stub for mpy-crossScott Shawcroft
2018-08-07Support internationalisation.Scott Shawcroft
2018-07-10handle errno defns for mingw and use correct executable nameDan Halbert
2018-07-10Add STATIC_BUILD make flag for mpy-cross to build a static executableDan Halbert
2017-10-04all: Remove inclusion of internal py header files.Damien George
Header files that are considered internal to the py core and should not normally be included directly are: py/nlr.h - internal nlr configuration and declarations py/bc0.h - contains bytecode macro definitions py/runtime0.h - contains basic runtime enums Instead, the top-level header files to include are one of: py/obj.h - includes runtime0.h and defines everything to use the mp_obj_t type py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h, and defines everything to use the general runtime support functions Additional, specific headers (eg py/objlist.h) can be included if needed.
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-24all: Don't include system errno.h when it's not needed.Damien George
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-04-22mpy-cross, unix, windows, stmhal: Enable return-if-else optimisation.Damien George
Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
2017-04-01all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George
It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
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.
2017-03-14mpy-cross/main: Move lexer constructor to within NLR handler block.Damien George
2016-11-16mpy-cross: Get compiling after recent persistent code refactors.Damien George
2016-09-05mpy-cross: Don't use the internal printf functions.Damien George
They require mp_hal_stdout_tx_strn_cooked, which requires extra work to add to mpy-cross.
2016-08-15ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George
This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
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-06-28py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George
2016-05-23mpy-cross: Add -s option to specify the embedded source filename.Damien George
.mpy files contain the name of the source file that they were compiled from. This patch adds a way to change this name to an arbitrary string, specified on the command line with the -s option. The default is to use the full name of the input filename. This new -s option is useful to strip off a leading directory name so that mpy-tool.py can freeze packages.
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-03-02mpy-cross: Give a more sensible error message when file doesn't exist.Damien George
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.