Damien George
b5b1f2c527
py/emitglue: Add mp_raw_code_load_mem to load raw-code from memory.
9 years ago
Damien George
f148727b78
py/emitglue: Only compile raw-code fatfs loader when on thumb2 platform.
Here we are assuming that a thumb2 port will have fatfs, which is only
roughly true. We need a better way of enabling specific raw-code file
readers.
9 years ago
Damien George
d4dba88236
py/compile: Add mp_compile_to_raw_code() to return raw code object.
This can then be passed to mp_raw_code_save_file to save a .mpy file.
9 years ago
Igor Gatis
f5c554dfe3
py: Added Cygwin support to py/nlrx86.S.
9 years ago
Damien George
593faf14c4
py/map: Store key/value in earliest possible slot in hash table.
This change makes the code behave how it was supposed to work when first
written. The avail_slot variable is set to the first free slot when
looking for a key (which would come from deleting an entry). So it's
more efficient (for subsequent lookups) to insert a new key into such a
slot, rather than the very last slot that was searched.
9 years ago
danicampora
db0a5aed39
cc3200: Bump version to 1.1.1.
9 years ago
danicampora
efc4da4be9
cc3200/README.md: Correct cc3200's update file name.
9 years ago
Chris Liechti
426f326d35
docs/wipy: Make wifi/wlan naming consistent with tutorial.rst.
9 years ago
Jason Hildebrand
9142179f81
docs/wipy: Add warning about losing wlan connection when changing mode.
Also provide workarounds, link to other revelant sections,
and fix some typos.
9 years ago
Gary Ashton-Jones
7080e9632c
cc3200/appsign.sh: Use md5 if running under Darwin.
9 years ago
Noah
00960133c2
docs: Update docs for WiPy wlan.connect().
- The link establishment timeout is infinite by default
- Fix typo in notes about the auth kwarg
9 years ago
Dave Hylands
f3308daa6f
docs/wipy: Fixed some typos in the WiPy's tutorials.
9 years ago
Damien George
994ff738c8
py/mpstate: Make mp_pending_exception volatile.
It can change asynchronously.
9 years ago
Damien George
a24eafacc9
py/modmath: Make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS.
Will be included only when MICROPY_PY_MATH_SPECIAL_FUNCTIONS is enabled.
Also covers cmath module (but only log10 is there at the moment).
9 years ago
Damien George
2c83894257
py: Implement default and star args for lambdas.
9 years ago
Damien George
cbd9ae5256
py/compile: Don't unnecessarily save state when compiling param list.
Parameter lists can't be nested so there is no need to save the global
state when compiling them.
9 years ago
danicampora
e4404fbef0
cc3200: Unmount all user file systems after a soft reset.
9 years ago
Paul Sokolovsky
65971f5160
unix: Add "uselect" module, with poll() function.
Underlyingly, uses standard POSIX poll() for portability.
9 years ago
Paul Sokolovsky
79c4ec1102
unix/input: Switch to POSIX I/O for history reading/writing.
9 years ago
Paul Sokolovsky
f8bc3f6964
tools: Update to upip 0.6.2. Fixes issue due to MacOSX undocumented behavior.
9 years ago
Paul Sokolovsky
3862ef9a9f
tools: Update upip to 0.6.1. Fixes normal installs without -p switch.
9 years ago
Paul Sokolovsky
ec314c951d
unix/modos: getenv(): Handle non-existing envvar correctly.
9 years ago
Paul Sokolovsky
16d42368a6
stmhal/modmachine: Initial attempt to add I2C & SPI classes.
In new hardware API, these classes implement master modes of interfaces,
and "mode" parameter is not accepted. Trying to implement new HW API
in terms of older pyb module leaves variuos corner cases:
In new HW API, I2C(1) means "I2C #1 in master mode" (? depends on
interpretation), while in old API, it means "I2C #1 , with no settings
changes".
For I2C class, it's easy to make mode optional, because that's last
positional param, but for SPI, there's "baudrate" after it (which
is inconsistent with I2C, which requires "baudrate" to be kwonly-arg).
9 years ago
Paul Sokolovsky
908f5159cf
unix/modos: Add Windows workaround for mkdir().
9 years ago
stijn
5be60d6929
windows: Define ssize_t and use renamed mphal header
This fixes the build after changes in [66fd3e4
] and [3a6b3d2
]
9 years ago
Paul Sokolovsky
863d4cd862
py/modmath: Don't create symbol entry for expm1() if not needed.
9 years ago
Paul Sokolovsky
0d6116d86b
py/modmath: Make expm1() be in MICROPY_PY_MATH_SPECIAL_FUNCTIONS.
9 years ago
Paul Sokolovsky
0aff87b808
tools: Update upip to 0.6.
Removes FFI dependency, instead uses builtin os module. Thus can work on
systems where dynamic library loading is not available.
9 years ago
Paul Sokolovsky
27dafa5ed5
unix/modos: Add mkdir().
Dependency of upip.
9 years ago
Paul Sokolovsky
d8557834c0
unix/modos: Add getenv().
Dependency of upip.
9 years ago
Paul Sokolovsky
a01f6c9ae7
unix/main: Remove stray mp_printf() from previous commit.
9 years ago
Paul Sokolovsky
66fd3e4a7b
unix: Use standard mphalport.h header.
This also unbreaks "make minimal".
9 years ago
Paul Sokolovsky
3a6b3d230c
main.c: Switch stderr printing from ANSI C to native POSIX.
9 years ago
Paul Sokolovsky
94f9330d3e
unix: Allow to override MICROPY_PY_MATH_SPECIAL_FUNCTIONS from command-line.
9 years ago
Paul Sokolovsky
6d1eabfeaa
unix/mpconfigport: Move log2() definition to modmath.c.
It's safer to define it where it's used, defining it for all source files
may lead to hard to diagnose conflicts in corner cases.
9 years ago
Damien George
432e8275a9
py: Allow to import compiled bytecode files.
9 years ago
Damien George
d8c834c95d
py: Add MICROPY_PERSISTENT_CODE_LOAD/SAVE to load/save bytecode.
MICROPY_PERSISTENT_CODE must be enabled, and then enabling
MICROPY_PERSISTENT_CODE_LOAD/SAVE (either or both) will allow loading
and/or saving of code (at the moment just bytecode) from/to a .mpy file.
9 years ago
Damien George
c8e9c0d89a
py: Add MICROPY_PERSISTENT_CODE so code can persist beyond the runtime.
Main changes when MICROPY_PERSISTENT_CODE is enabled are:
- qstrs are encoded as 2-byte fixed width in the bytecode
- all pointers are removed from bytecode and put in const_table (this
includes const objects and raw code pointers)
Ultimately this option will enable persistence for not just bytecode but
also native code.
9 years ago
Damien George
713ea1800d
py: Add constant table to bytecode.
Contains just argument names at the moment but makes it easy to add
arbitrary constants.
9 years ago
Damien George
3a3db4dcf0
py: Put all bytecode state (arg count, etc) in bytecode.
9 years ago
Damien George
9b7f583b0c
py: Reorganise bytecode layout so it's more structured, easier to edit.
10 years ago
Paul Sokolovsky
f882d53fcd
unix/main: Use builtin unichar_isdigit() in preference if libc's.
Less dependencies.
9 years ago
Paul Sokolovsky
772f0b4159
tests/jni: Add test for working with container of List interface.
9 years ago
Paul Sokolovsky
3c7e1b80ac
unix/modjni: Add missing get_jclass_name() function.
9 years ago
Dave Hylands
3551368424
docs: Fix a typo in the REPL documentation.
9 years ago
Paul Sokolovsky
73ff0687f2
lib/utils/printf: Move from stmhal/ .
This file contains various MicroPython-specific helper functions, so isn't
good fit for lib/libc/.
9 years ago
stijn
b1dbbd32eb
windows: Allow specifying the python executable to use for msvc builds
This defaults to 'python' but can be now overridden if needed
9 years ago
omtinez
1b9d161f94
Fix project file for Visual Studio 2015
9 years ago
Paul Sokolovsky
549c79d11e
docs/select: Document POLLIN/OUT/ERR/HUP.
9 years ago
Paul Sokolovsky
746b752b8e
stmhal/moduselect: Expose POLLIN/OUT/ERR/HUP constants.
This makes select.poll() interface fully compatible with CpYthon. Also, make
their numeric values of these options compatible with Linux (and by extension,
with iBCS2 standard, which jopefully means compatibility with other Unices too).
9 years ago