aboutsummaryrefslogtreecommitdiff
path: root/mpy-cross/main.c
AgeCommit message (Collapse)Author
2021-02-04all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD.Damien George
The "word" referred to by BYTES_PER_WORD is actually the size of mp_obj_t which is not always the same as the size of a pointer on the target architecture. So rename this config value to better reflect what it measures, and also prefix it with MP_. For uses of BYTES_PER_WORD in setting the stack limit this has been changed to sizeof(void *), because the stack usually grows with machine-word sized values (eg an nlr_buf_t has many machine words in it). Signed-off-by: Damien George <damien@micropython.org>
2020-04-16mpy-cross/main: Print uncaught nlr jump to stderr.David Lechner
This is to be consistent with the same change in the unix port, 4ab8bee82f7d095c10c624de93da12a7aa1af8fd.
2020-04-16mpy-cross/main: Fix stderr_print_strn parameter type.David Lechner
Change mp_uint_t to size_t to match the mp_print_strn_t function prototype. This fixes a compiler warning when mp_uint_t and size_t are not the same size.
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2019-12-03mpy-cross: Support armv7em, armv7emsp, armv7emdp architectures.Damien George
2019-10-05mpy-cross: Enable Xtensa-Windowed native emitter.Damien George
Selectable via the command line: -march=xtensawin.
2019-09-26mpy-cross: Set number of registers in nlr_buf_t based on native arch.Damien George
Fixes #5059. Done in collaboration with Jim Mussared.
2019-08-28py: Add global default_emit_opt variable to make emit kind persistent.Damien George
mp_compile no longer takes an emit_opt argument, rather this setting is now provided by the global default_emit_opt variable. Now, when -X emit=native is passed as a command-line option, the emitter will be set for all compiled modules (included imports), not just the top-level script. In the future there could be a way to also set this variable from a script. Fixes issue #4267.
2019-08-28mpy-cross/main: Only accept full emit cmdline options if native enabled.Damien George
2019-05-07mpy-cross: Add --version command line option to print version info.Damien George
Prints something like: MicroPython v1.10-304-g8031b7a25 on 2019-05-02; mpy-cross emitting mpy v4
2019-05-01mpy-cross: Automatically select ARMV6 arch when running on such a host.Damien George
2019-03-26mpy-cross: Support compiling with MICROPY_PY___FILE__ enabled.Damien George
2019-03-14mpy-cross: Add "-march=<arch>" option to select native emitter.Damien George
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-07-24all: Don't include system errno.h when it's not needed.Damien George
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-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-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-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.