aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-28tools/codeformat.py: Use -q option on uncrustify to make output quiet.David Lechner
This suppresses the Parsing: <file> as language C lines. This makes parsing run a bit faster and on CI it makes for less scrolling through logs (and black already uses the -q option).
2020-05-28py/modsys: Use consistent naming pattern for module-level const objects.David Lechner
This renames a few identifiers to follow the usual naming convention of mp_<module>_<name>. This makes them easier to find, e.g. when grep'ing.
2020-05-28windows: Make appveyor.yml self-contained.stijn
Add configuration which otherwise has to be set via the UI so the file is more self-contained, and remove configuration which is not needed because it's the same as the default. The major change here is that for a while now Appveyor has been using Visual Studio 2015 by default while we still want to support 2013.
2020-05-28py/ringbuf: Fix compilation with msvc.stijn
Older versions do not have "inline" so fetch the definition from mpconfigport.h.
2020-05-28py/modmath: Work around msvc float bugs in atan2, fmod and modf.stijn
Older implementations deal with infinity/negative zero incorrectly. This commit adds generic fixes that can be enabled by any port that needs them, along with new tests cases.
2020-05-27py/py.mk: Use additional CFLAGS to compile string0.c.Damien George
Otherwise functions like memset might get optimised to call themselves (eg with gcc 10). And provide CFLAGS_BUILTIN so these options can be changed by a port if needed. Fixes issue #6053.
2020-05-27lib/utils: Lock the scheduler when executing hard callback functions.Damien George
Otherwise scheduled functions may execute during the hard callback and then fail if they try to allocate heap memory.
2020-05-27travis: Set build name so it appears in the web interfaces.Joel Stanley
The env NAME="foo" syntax doesn't appear to set the name in the Travis web interface. Instead use the syntax from the docs: https://docs.travis-ci.com/user/build-stages/#naming-your-jobs-within-build-stages
2020-05-27travis: Run apt commands once, to slightly speed up the CI.Joel Stanley
2020-05-27powerpc: Set better default compiler.Joel Stanley
Most developers use a compiler which is called powerpc64le-linux-gnu-gcc.
2020-05-27powerpc: Fix Makefile rule when linking.Joel Stanley
The linker script was included in the "$^" inputs, causing the build to fail: LINK build/firmware.elf powerpc64le-linux-gnu-ld: error: linker script file 'powerpc.lds' appears multiple times As a fix the linker script is left as a dependency of the elf, but only the object files are linked.
2020-05-27mimxrt/boards: Add MIMXRT1060_EVK board.Albort Xue
2020-05-27esp8266/esppwm: Fix PWM glitch when setting duty on different channel.Olivier Ortigues
The PWM driver uses a double buffer for the PWM timing array, one in current use and the other one to update when changing duty parameters. The issue was that once the duty parameters were changed the updated buffer was applied immediately without synchronising to the start of the PWM period. By moving the buffer toggling/swapping to the interrupt when the cycle is done there are no more glitches.
2020-05-16docs/develop: Fix module/source name in Makefile of native example.Damien George
2020-05-16unix/main: Enter REPL when inspect active, even with stdin redirected.Yu-Ming Chang
This is how CPython behaves.
2020-05-15nrf: Add openocd as a supported flasher.Jim Mussared
Tested with the Particle Debugger on a Xenon.
2020-05-15travis: Build more boards as part of nrf job.Jim Mussared
Specifically: - pca10040: It was already the default. - microbit: It uses nRF51, has a Cortex-M0, and has additional libraries. - pca10056: It has USB CDC.
2020-05-15nrf: Update to work with nrfx v2.0.0, to match TinyUSB.Jim Mussared
Commit 6cea369b89b2223cf07ff8768e50dc39bbb770fe updated the TinyUSB submodule to a version based on nrfx v2.0.0. This commit updates the nrf port to work with the latest TinyUSB and nrfx v2.0.0.
2020-05-15lib/nrfx: Upgrade to nrfx v2.0.0.Damien George
2020-05-15nrf/mphalport: Remove need for "syntax unified" in mp_hal_delay_us.Damien George
Because it can confuse older versions of gcc. Instead use the correct instruction for Thumb vs Thumb-2 (sub vs subs) so the assembler emits the 2-byte instruction. Related to commit 1aa9ff914194824a78a8b010572ad7083c1bb4ec.
2020-05-15nrf/Makefile: Don't use -fno-builtin for Cortex-M0 builds.Damien George
So that error string compression is optimised correctly (it needs strcmp to be optimised away by the compiler).
2020-05-15extmod/vfs_lfsx: Fix import_stat so it takes into account current dir.Damien George
CPython semantics require searching the current directory if the import is not absolute (when "" is in sys.path). Fixes issue #6037.
2020-05-15stm32/boards: Add board config for Nucleo-F412ZG development board.Thomas Roberts
2020-05-15stm32: Add support for F412 MCUs.Thomas Roberts
2020-05-14esp8266/boards: Allow configuring btree/FAT/LFS2 support when building.Rafael Römhild
Prior to e0905e85a7ad2961aa9192f6130565860e531ad3 it was possible to disable btree support on build. This patch allows to configure btree support on make again and also the two new introduced options for FAT and LFS2 filesystems.
2020-05-14py/nativeglue.h: Rename "setjmp" entry to "setjmp_" to avoid any clash.Damien George
Because some compilers may define setjmp to something. Fixes issue #6032.
2020-05-11extmod/nimble: Make error code mapping default to MP_EIO.Thomas Friebel
Before this change, any NimBLE error that does not appear in the ble_hs_err_to_errno_table maps to return code 0, meaning success. If we miss adding an error code to the table we end up returning success in case of failure. Instead, handle the zero case explicitly and default to MP_EIO. This allows removing the now-redundant MP_EIO entries from the mapping.
2020-05-11README: Change --help option to -h to match micropython executable.Hannah Suarez/hcs0
The behaviour was changed in 83439e38fc025bda79eec0096b8cc60379757206
2020-05-11extmod/modbluetooth: Add support for changing the GAP device name.Damien George
This commit allows the user to set/get the GAP device name used by service 0x1800, characteristic 0x2a00. The usage is: BLE.config(gap_name="myname") print(BLE.config("gap_name")) As part of this change the compile-time setting MICROPY_PY_BLUETOOTH_DEFAULT_NAME is renamed to MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME to emphasise its link to GAP and this new "gap_name" config value. And the default value of this for the NimBLE bindings is changed from "PYBD" to "MPY NIMBLE" to be more generic.
2020-05-11stm32/README: Reorg DFU flashing instructions with addition for PYBD.Thorsten von Eicken
2020-05-09esp32/modsocket: Fix getaddrinfo to raise on error.Thorsten von Eicken
This commit fixes the behaviour of socket.getaddrinfo on the ESP32 so it raises an OSError when the name resolution fails instead of returning a [] or a resolution for 0.0.0.0. Tests are added (generic and ESP32-specific) to verify behaviour consistent with CPython, modulo the different types of exceptions per MicroPython documentation.
2020-05-09tests/run-tests: Skip REPL feature checks when running via pyboard.py.Damien George
2020-05-09py/parse: Make mp_parse_node_extract_list return size_t instead of int.Damien George
Because this function can only return non-negative values, and having the correct return type gives more information to the caller.
2020-05-09tests/run-multitests.py: Add TRACE banner and move TEST output to end.Damien George
To make it easier to understand the output when both -s and -t are used.
2020-05-08esp8266/uart: Move a few functions from iRAM to iROM.Damien George
They call functions in iROM so do not need to be in iRAM.
2020-05-08esp8266/esp_mphal: Move most functions in esp_mphal.c from iRAM to iROM.Damien George
The ones that are moved out of iRAM should not need to be there, because either they call functions in iROM (eg mp_hal_stdout_tx_str), or they are only ever called from a function in iROM and not from an interrupt (eg ets_esf_free_bufs). This frees up about 800 bytes of iRAM.
2020-05-08esp8266/boards: Move py/pairheap.c code from iRAM to iROM.Damien George
It doesn't need to be in iRAM.
2020-05-08esp8266: Clean up Pin intr handler by moving all code to machine_pin.c.Damien George
The macro MP_FASTCODE is used to explicitly place required functions in iRAM, instead of needing a separate .c file.
2020-05-08py/scheduler: Convert mp_sched_full and mp_sched_num_pending to macros.Damien George
So they are guaranteed to be inlined within functions like mp_sched_schedule which may be located in a special memory region.
2020-05-08extmod/vfs_lfsx: Fix rename to respect cur dir for new path.robert
If the new name start with '/', cur_dir is not prepened any more, so that the current working directory is respected. And extend the test cases for rename to cover this functionality.
2020-05-08extmod/vfs_lfsx: Normalize path name in chdir.robert
This change scans for '.', '..' and multiple '/' and normalizes the new path name. If the resulting path does not exist, an error is raised. Non-existing interim path elements are ignored if they are removed during normalization.
2020-05-08extmod/vfs_lfsx: Fix path handling in uos.stat() to consider cur dir.robert
This fixes the bug, that stat(filename) would not consider the current working directory. So if e.g. the cwd is "lib", then stat("main.py") would return the info for "/main.py" instead of "/lib/main.py".
2020-05-08tests/multi_bluetooth: Fix typo printing wrong IRQ type.Damien George
2020-05-05stm32/boards/PYBD_SF2: Put BTstack library in external QSPI XIP flash.Damien George
In the same way the nimble stack is put there.
2020-05-05zephyr: Use zephyr build system to merge configurations.Maureen Helm
The zephyr build system supports merging application-level board configurations, so there is no need to reproduce this functionality in MicroPython. If CONF_FILE is not explicitly set, then the zephyr build system looks for prj.conf in the application directory. Therefore we rename the MicroPython prj_base.conf to prj.conf. Furthermore, if the zephyr build system finds boards/$(BOARD).conf in the application directory, it merges that configuration with prj.conf. Therefore we rename all the MicroPython board .conf files and move them into a boards/ directory. The minimal configuration, prj_minimal.conf, is left in the application directory because it is used as an explicitly set CONF_FILE in make-minimal.
2020-05-05tests/thread/thread_stacksize1.py: Increase stack size for CPython.yangfl
On arm64 with CPython: >>> _thread.stack_size(32*1024) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: size not valid: 32768 bytes So increase the CPython value in the test to 512k so it runs on more systems (on modern Linux the default stack size is usually 8MB).
2020-05-03py/parse: Support constant folding of power operator for integers.Damien George
Constant expression like "2 ** 3" will now be folded, and the special form "X = const(2 ** 3)" will now compile because the argument to the const is now a constant. Fixes issue #5865.
2020-05-03esp32/partitions: Update comments in files regarding offset.Thorsten von Eicken
2020-05-03esp32: Improve support for OTA updates.Thorsten von Eicken
This commit adds several small items to improve the support for OTA updates on an esp32: - a partition table for 4MB flash modules that has two OTA partitions ready to go to do updates - a GENERIC_OTA board that uses that partition table and that enables automatic roll-back in the bootloader - a new esp32.Partition.mark_app_valid_cancel_rollback() class-method to signal that the boot is successful and should not be rolled back at the next reset - an automated test for doing an OTA update - documentation updates
2020-05-02docs/library: Fix docs for machine.WDT to specify millisecond timeout.Thorsten von Eicken