summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-05-15lib/nrfx: Upgrade to nrfx v2.0.0.Damien George
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.
2020-04-29lib/btstack: Update to c8b9823 for USB HCI reset timeout fix.Jim Mussared
2020-04-27py/stream: Remove mp_stream_errno and use system errno instead.Damien George
This change is made for two reasons: 1. A 3rd-party library (eg berkeley-db-1.xx, axtls) may use the system provided errno for certain errors, and yet MicroPython stream objects that it calls will be using the internal mp_stream_errno. So if the library returns an error it is not known whether the corresponding errno code is stored in the system errno or mp_stream_errno. Using the system errno in all cases (eg in the mp_stream_posix_XXX wrappers) fixes this ambiguity. 2. For systems that have threading the system-provided errno should always be used because the errno value is thread-local. For systems that do not have an errno, the new lib/embed/__errno.c file is provided.
2020-04-27lib/mynewt-nimble: Update submodule to NimBLE release 1.3.0.Jim Mussared
2020-04-23all: Format code to add space after C++-style comment start.stijn
Note: the uncrustify configuration is explicitly set to 'add' instead of 'force' in order not to alter the comments which use extra spaces after // as a means of indenting text for clarity.
2020-04-23all: Remove commented-out include statements.stijn
2020-04-18all: Fix implicit floating point to integer conversions.stijn
These are found when building with -Wfloat-conversion.
2020-04-18all: Fix implicit conversion from double to float.stijn
These are found when building with -Wfloat-conversion.
2020-04-09lib/littlefs: Update littlefs2 to v2.2.0.Damien George
At commit a049f1318eecbe502549f9d74a41951985fb956f
2020-04-07lib/btstack: Update to latest master btstack commit.Damien George
2020-04-05all: Use MP_ERROR_TEXT for all error messages.Jim Mussared
2020-03-11mimxrt: Add new, minimal port to NXP i.MX RT series CPUs.Jim Mussared
This is an extremely minimal port to the NXP i.MX RT, in the style of the SAMD port It's largely based on the TinyUSB mimxrt implementation, using the NXP SDK. It currently supports the Teensy 4.0 board with a REPL over the USB-VCP interface. This commit also adds the NXP SDK submodule (also from TinyUSB) to lib/nxp_driver. Note: if you already have the tinyusb submodule initialized recursively you will need to run the following as the tinyusb sub-submodules have been rearranged (upstream): git submodule deinit lib/tinyusb rm -rf .git/modules/lib/tinyusb git submodule update --init lib/tinyusb
2020-03-11lib/tinyusb: Update to a6b916ba for i.MX support.Jim Mussared
2020-03-10lib: Add BlueKitchen BTstack submodule.Damien George
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.
2020-02-07py/scheduler: Move clearing of kbd traceback to mp_keyboard_interrupt.Damien George
This is a more logical place to clear the KeyboardInterrupt traceback, right before it is set as a pending exception. The clearing is also optimised from a function call to a simple store of NULL.
2020-02-07py/scheduler: Move mp_keyboard_interrupt from lib/utils to py core.Damien George
This function is tightly coupled to the state and behaviour of the scheduler, and is a core part of the runtime: to schedule a pending exception. So move it there.
2020-02-07lib/utils/pyexec: Handle pending exceptions after disabling kbd intrs.Damien George
Pending exceptions would otherwise be handled later on where there may not be an NLR handler in place. A similar fix is also made to the unix port's REPL handler. Fixes issues #4921 and #5488.
2020-02-04lib/utils: Change default value of pyexec_mode_kind to 0 to put in bss.odewdney
By simply reordering the enums for pyexec_mode_kind_t it eliminates a data variable which costs ROM to initialise it. And the minimal build now has nothing in the data section. It seems the compiler is smart enough so that the generated code for if-logic which tests these enum values is unchanged.
2020-01-12lib/mp-readline: Add word-based move/delete EMACS key sequences.Yonatan Goldschmidt
This commit adds backward-word, backward-kill-word, forward-word, forward-kill-word sequences for the REPL, with bindings to Alt+F, Alt+B, Alt+D and Alt+Backspace respectively. It is disabled by default and can be enabled via MICROPY_REPL_EMACS_WORDS_MOVE. Further enabling MICROPY_REPL_EMACS_EXTRA_WORDS_MOVE adds extra bindings for these new sequences: Ctrl+Right, Ctrl+Left and Ctrl+W. The features are enabled on unix micropython-coverage and micropython-dev.
2020-01-12lib/mp-readline: Add an assert() to catch buffer overflows.Yonatan Goldschmidt
During readline development, this function may receive bad `pos` values. It's easier to understand the assert() failing error than to have a "stack smashing detected" message.
2019-12-28lib/utils/pyexec: Introduce MICROPY_REPL_INFO, wrap debug prints in it.Yonatan Goldschmidt
For the 3 ports that already make use of this feature (stm32, nrf and teensy) this doesn't make any difference, it just allows to disable it from now on. For other ports that use pyexec, this decreases code size because the debug printing code is dead (it can't be enabled) but the compiler can't deduce that, so code is still emitted.
2019-12-27py: Introduce MP_ROM_NONE macro for ROM to refer to None object.Damien George
This helps to prevent mistakes, and allows easily changing the ROM value of None if needed.
2019-12-19Revert "lib/tinytest: Clean up test reporting in the presence of std..."David Lechner
This reverts commit f4ed2dfa942339dc1f174e8a83ff0d41073f1972. This lets tinytest work as it was originally designed. An alternate solution for the reverted commit will be implemented in a future commit.
2019-10-30lib/libc/string0: Add simple implementations of strspn and strcspn.Damien George
They are needed for littlefs.
2019-10-29lib/littlefs: Add README describing origin and how to gen lfs1/lfs2.Damien George
2019-10-29lib/littlefs: Add littlefs v2.1.3 source.Damien George
2019-10-29lib/littlefs: Add littlefs v1.7.2 source.Damien George
2019-10-10stm32: Use hardware double sqrt on F7/H7 MCUs.Jim Mussared
Identical to cd527bb324ade952d11a134859d38bf5272c165e but for doubles. This gives a -2.754% improvement on bm_float.py, and -35% improvement on calling sqrt in a loop.
2019-10-01lib/mynewt-nimble: Add Apache mynewt nimble as a submodule.Damien George
Tag nimble_1_1_0_tag.
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-07-04lib/lwip: Update lwIP to v2.1.2, tag STABLE-2_1_2_RELEASE.Damien George
2019-07-03lib/stm32lib: Update library for updated H7xx, new L0xx, new WBxx.Damien George
And this library now includes the startup_stm32*.s files for each MCU.
2019-07-01lib: Add tinyusb as a submodule.Damien George
2019-07-01lib: Add asf4 as a submodule.Damien George
2019-07-01lib/utils/sys_stdio_mphal: Add support to poll sys.stdin and sys.stdout.Damien George
A port must provide the following function for this to work: uintptr_t mp_hal_stdio_poll(uintptr_t poll_flags);
2019-06-05lib: Add new submodule for mbedtls, currently at v2.17.0.Damien George
From upstream source: https://github.com/ARMmbed/mbedtls.git
2019-06-03lib/netutils: Add DHCP server component.Damien George
2019-06-03lib/cmsis: Upgrade to CMSIS 5.5.1.Damien George
From https://github.com/ARM-software/CMSIS_5.git, tag 5.5.1
2019-05-21lib/nrfx: Upgrade nrfx to master.Glenn Ruben Bakke
Updating the nrfx git submodule containing HAL drivers for nrf-port from v1.3.1 to current master. The version pointed to is one commit ahead of v1.7.1 release. The extra commit contains a bugfix for nrfx_uart_tx_in_progress() making it report correctly. The general upgrade of nrfx is considered to be safe, as almost all changes in between 1.3.1 and 1.7.1 are related to peripherals and target devices not used by the nrf-port as of today.
2019-05-20lib/stm32lib: Update library to fix UART9/10 baudrate on F4 MCUs.Damien George
2019-05-01lib/utils/interrupt_char: Invalidate interrupt char at start up.Damien George
Otherwise mp_interrupt_char will have a value of zero on start up (because it's in the BSS) and a KeyboardInterrupt may be raised during start up. For example this can occur if there is a UART attached to the REPL which sends spurious null bytes when the device turns on.
2019-05-01lib/utils: Make pyexec_file_if_exists run frozen scripts if they exist.Andrew Leech
So that boot.py and/or main.py can be frozen (either as STR or MPY) in the same way that other scripts are frozen. Frozen scripts have preference to scripts in the VFS.
2019-04-26lib/utils/pyexec: Add pyexec_file_if_exists() helper function.Damien George
It will only execute the script if it can be stat'd and is a file.
2019-04-01lib/stm32lib: Update library to fix F7 MMC capacity calculation.Damien George
2019-03-07lib/oofatfs: Update oofatfs library to fix issue with logic not.Damien George
From https://github.com/micropython/oofatfs, branch work-R0.13c, commit 3b4ee5a646af2769b3dddfe17d5d866233c1e45b.
2019-03-05lib/oofatfs: Update ffconf.h config for new oofatfs version.Damien George
2019-03-05lib/oofatfs: Update oofatfs library to R0.13c working branch.Damien George
From https://github.com/micropython/oofatfs, branch work-R0.13c, commit cb05c9486d3b48ffd6bd7542d8dbbab4b1caf790. Large code pages (932, 936, 949, 950) have been removed from ffunicode.c because they were not included in previous versions here.
2019-02-26lib/netutils: Add function to print tracing info for Ethernet frames.Damien George