| Age | Commit message (Collapse) | Author |
|
For ports that have a system malloc which is not garbage collected (eg
unix, esp32), the stream object for the DB must be retained separately to
prevent it from being reclaimed by the MicroPython GC (because the
berkeley-db library uses malloc to allocate the DB structure which stores
the only reference to the stream).
Although in some cases the user code will explicitly retain a reference to
the underlying stream because it needs to call close() on it, this is not
always the case, eg in cases where the DB is intended to live forever.
Fixes issue #5940.
|
|
Only enable it if MICROPY_GCREGS_SETJMP is not already defined, and no
supported architecture is defined.
|
|
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.
|
|
|
|
So this setting could be used by other source files if needed.
|
|
Follow up to dd0bc26e65734b8a4fafa3769008e92e2ec6645d which changed the
parameter list of the IRQ_SCAN_RESULT event. Adapt
ble_temperature_central.py accordingly.
|
|
|
|
This is run with uncrustify 0.70.1, and black 19.10b0.
|
|
So the line length is less than 100 characters.
|
|
To improve interaction with black formatter.
|
|
|
|
This example will now work on all ports with networking and ssl support,
with both axtls and mbedtls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Extracts name and service UUID fields.
|
|
|
|
|
|
|
|
|
|
|
|
Consisting of:
- ble_advertising.py -- helper to generate advertising payload.
- ble_temperature.py -- simple temperature device.
- ble_uart_periperhal.py -- BLE UART wrapper.
- ble_uart_repl.py -- dupterm-compatible uart.
|
|
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.
|
|
1. Use uctypes.bytearray_at().
Implementation of the "ffi" module predates that of "uctypes", so
initially some convenience functions to access memory were added
to ffi. Later, they landed in uctypes (which follows CPython's
ctype module).
So, replace undocumented experimental functions from ffi to
documented ones from uctypes.
2. Use more suitable type codes for arguments (e.g. "P" (const void*)
instead of "p" (void*).
3. Some better var naming.
4. Clarify some messages printed by the example.
|
|
|
|
This issue was brought up by BramPeters in the forum:
https://forum.micropython.org/viewtopic.php?p=30066
|
|
|
|
Otherwise the build process puts the corresponding output object files in
two directories lower, not in build/ports/unix.
|
|
Some ".." need to be changed to $(MPTOP), and in some places "ports/" needs
to be inserted to get to the "ports/unix/" subdir.
|
|
|
|
Add these methods to this "GPIO output emulated with console prints"
config.
|
|
Also renames "stmhal" to "stm32" in documentation and everywhere else.
|
|
|
|
There were several different spellings of MicroPython present in comments,
when there should be only one.
|
|
|
|
|
|
|
|
Following finalized naming in uasyncio.
|
|
|
|
|
|
A shorter name takes less code size, less room in scripts and is faster to
type at the REPL.
Tests and HW-API examples are updated to reflect the change.
|
|
It can still be overwritten by a port in mpconfigport.h but for almost
all cases one can use the provided default.
|
|
This follows the pattern of how all other headers are now included, and
makes it explicit where the header file comes from. This patch also
removes -I options from Makefile's that specify the mp-readline/timeutils/
netutils directories, which are no longer needed.
|
|
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.
|
|
The lexer constructor may now raise an exception and it needs to be caught.
|