aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-23stm32/sdram: Add SDRAM driver from OpenMV project.Andrew Leech
Taken from https://github.com/openmv/openmv/blob/7fbe54ad4e9dc1c527d9297a3f4c69c365dc9b2c/src/omv/sdram.c Code is is MIT licensed.
2018-07-23nrf/drivers/flash: Fix incorrect page alignment check.Ayke van Laethem
2018-07-23nrf: Update nrfjprog links to allow to download any version.roland
Instead of downloading "a" version, these links point to history from where you can download the verson you like.
2018-07-20docs/library/machine: Remove conditionals in machine class index.Damien George
The machine module should be standard across all ports so should have the same set of classes in the docs. A special warning is added to the top of the machine.SD class because it is not standardised and only available on the cc3200 port.
2018-07-20docs/reference/index: Remove conditional for inline asm docs.Damien George
The heading of this section makes it clear it is for Thumb-2 architectures only.
2018-07-20docs/library/index: Add hint about using help('modules') for discovery.Damien George
2018-07-20docs/library/index: Remove all conditionals from library index.Damien George
It's fair to just provide a link to all available modules, regardless of the port. Most of the existing ports (unix, stm32, esp8266, esp32) share most of the same set of modules anyway, so no need to maintain separate lists for them. And there's a big discussion at the start of this index about modules not being available on a given port. For port-specific modules, they can also be listed unconditionally because they have headings that explicitly state they are only available on certain ports.
2018-07-20tools/pydfu.py: Use getfullargspec instead of getargspec for newer pyusbroland
pyusb v1.0.2 warns about `getargspec` as being deprecated.
2018-07-20tools/dfu.py: Pad image data to 8 byte alignment to support L476.roland
Thanks to @dhylands for this patch to pad the image to 8-byte boundaries.
2018-07-20travis: Add nrf port to Travis CI build.Damien George
2018-07-20nrf/boards/microbit: Use MICROPY_PY_BUILTINS_FLOAT to detect FP support.Damien George
This works for both single and double precision float.
2018-07-20nrf: Properly use (void) instead of () for function definitions.Damien George
2018-07-20nrf/Makefile: Make sure dependencies for pins_gen.c are correct.Damien George
2018-07-20stm32/sdcard: Use mp_hal_pin_config_alt_static to configure SD card pinsDamien George
2018-07-20stm32: Add method for statically configuring pin alternate function.Andrew Leech
Works with pins declared normally in mpconfigboard.h, eg. (pin_XX), as well as (pyb_pin_XX). Provides new mp_hal_pin_config_alt_static(pin_obj, mode, pull, fn_type) function declared in pin_static_af.h to allow configuring pin alternate functions by name at compile time.
2018-07-20unix: Use MP_STREAM_GET_FILENO to allow uselect to poll general objects.Damien George
This mechanism will scale to to an arbitrary number of pollable objects, so long as they implement the MP_STREAM_GET_FILENO ioctl. Since ussl objects pass through ioctl requests transparently to the underlying socket object, it will allow ussl sockets to be polled. And a user object with uio.IOBase as a base could support polling.
2018-07-20py/stream: Introduce MP_STREAM_GET_FILENO ioctl request.Damien George
Can be used by POSIX-like systems that associate file numbers with a file.
2018-07-20extmod/modussl: Support polling in ussl objects by passing through ioctlDamien George
The underlying socket can handling polling, and any other transparent ioctl requests. Note that CPython handles the case of polling an ssl object by polling the file descriptor of the underlying socket file, and that behaviour is emulated here.
2018-07-20extmod/modlwip: Deregister all lwIP callbacks when closing a socket.Damien George
Otherwise they may be called on a socket that no longer exists. For example, if the GC calls the finaliser on the socket and then reuses its heap memory, the "callback" entry of the old socket may contain invalid data. If lwIP then calls the TCP callback the code may try to call the user callback object which is now invalid. The lwIP callbacks must be deregistered during the closing of the socket, before all the pcb pointers are set to NULL.
2018-07-20tests/run-tests: Improve crash reporting when running on remote targets.Ayke van Laethem
It is very useful to know the actual error when debugging why a test fails.
2018-07-20tests/run-tests: Add nrf target.Ayke van Laethem
2018-07-20tests: Improve feature detection for VFS.Ayke van Laethem
2018-07-19stm32/flashbdev: Fix bug with L4 block cache, dereferencing block size.Peter D. Gray
The code was dereferencing 0x800 and loading a value from there, trying to use a literal value (not address) defined in the linker script (_ram_fs_cache_block_size) which was 0x800.
2018-07-19travis: Use build stages and parallel jobs under Travis CI.Damien George
This change brings the following benefits: - all existing tests and test behaviour is be retained - can now use Travis parallel build mechanism - total time for tests is about 5 mins 30 secs, down from around 10 mins - two additional test suites are now run: standard (non coverage) unix build and nanbox unix build - much easier to see what is failing: if you click through to the Travis CI details each parallel build job is displayed with pass/fail - scales much better when adding new test targets
2018-07-19nrf: Include $(SRC_MOD) in the build.Ayke van Laethem
Also, remove the unused $(SRC_LIB).
2018-07-18nrf: Use mp_raise_ValueError instead of nlr_raise(...)Ayke van Laethem
Saves 60 bytes on the nRF52 with SD disabled. There will be a bigger saving with SD enabled and/or on the micro:bit board.
2018-07-18README: Update list of ports to include esp32 and nrf.Damien George
2018-07-18nrf/drivers: Add license text to ticker.h and softpwm.h.Glenn Ruben Bakke
As per the LICENSE and AUTHORS files from the original source of these header files.
2018-07-18nrf: Upgrade to nrfx 1.1.0Glenn Ruben Bakke
2018-07-18nrf: Compile nlr objects with -fno-lto flagGlenn Ruben Bakke
To prevent over-optimizations of nlr and nlrthumb when -flto is used the flag -fno-lto is set on these modules during compilation.
2018-07-18nrf: Add explicit make flag for oofatfsGlenn Ruben Bakke
Adding MICROPY_FATFS as makefile flag in order to explicitly include oofatfs files to be compiled into the build. The flag is set to 0 by default. Must be set in addition to MICROPY_VFS and MICROPY_VFS_FAT in mpconfigport.h.
2018-07-18nrf/bluetooth: Replace BLE REPL (WebBluetooth) URLGlenn Ruben Bakke
Updating URL of the WebBluetooth/PhysicalWeb from https://glennrub.github.io/webbluetooth/micropython/repl to https://aykevl.nl/apps/nus/.
2018-07-18nrf: Quick-fix on const objects with open array dimension in objtuples.Glenn Ruben Bakke
Temporarly solving the issue of "differ from the size of original declaration [-Werror=lto-type-mismatch] until linker is fixed in upcomming release of gcc. Bug is reported by others, and will be fixed in next version of arm-gcc. However, this patch makes it possible to use modmusic and modimage with current compilers. Alternativly, the code can be compiled with LTO=0, but uses valuable 9K more on this already squeezed target (microbit).
2018-07-18nrf/boards: Check for stack/heap size using an assert.Ayke van Laethem
The main effect of this is that the .bss is now accurate and doesn't include the stack and minimum heap size.
2018-07-18nrf/bluetooth: Add support for s132/s140 v6, remove s132 v2/3/5Glenn Ruben Bakke
Support added for s132/s140 v6 in linker scripts and boards. Support removed for s132 v2/3/5. Download script updated to fetch new stacks and removed the non-supported ones. ble_drv.c updated to only handle s110 v8, and s132/s140 v6. ubluepy updated to continue scanning after each individual scan report reported to the module to keep old behaviour of the Scanner class.
2018-07-18nrf: Generalize feather52 targetGlenn Ruben Bakke
This patch generalize the feather52 target to be a board without an in-built Bluetooth stack or bootloader giving all flash memory to micropython code. This way the feather52 target can run any supported Bluetooth LE stack the port supports for other nrf52832 targets. Hence, this make Makefiles/linker scripts and BLE driver support easier to maintain in the future.
2018-07-18nrf: Add support for reading output pin stateGlenn Ruben Bakke
Current adoption on top of nrfx only reads the GPIO->IN register. In order to read back an output state, nrf_gpio_pin_out_read has to be called. This patch concatinate the two read functions such that, if either IN or OUT register has a value 1 it will return this, else 0. Updating lib/nrfx submodule to latest version of master to get the new GPIO API to read pin direction. (nrfx: d37b16f2b894b0928395f6f56ca741287a31a244)
2018-07-18nrf: Move pyb module to boards moduleGlenn Ruben Bakke
Cleaning up use of "pyb" module. Moving the file to a new folder and updating the makefile accordingly. New module created called "board" to take over the functionality of the legacy "pyb" module. Updating outdated documentation referring to pyb.Pin, to now point to machine.Pin.
2018-07-18nrf/nrfx_config: Move back nrf52832 to use non-EasyDMA SPIGlenn Ruben Bakke
As EasyDMA variant of SPI(M) might clock out an additional byte in single byte transactions this patch moves the nrf52832 to use SPI and not SPIM to get more stable data transactions. Ref: nrf52832 rev2 errata v1.1, suggested workaround is: "Use the SPI module (deprecated but still available) or use the following workaround with SPIM ..." Current nrfx SPIM driver does not contain this workaround, and in the meanwhile moving back to SPI fixes the issue. Also, tabbing the nrfx_config.h a bit to make it more readable.
2018-07-18nrf/modules/machine/spi: Move enable-guard to prevent wrong includesGlenn Ruben Bakke
This patch moves the check of SPI configuration before including any SPI header files. As targets might disable SPI support, current code ends up in including SPIM if not SPI is configured. Hence, this is why the check whether the module is enabled should be done before including headers.
2018-07-18nrf/boards/feather52: Move phony targets to main MakefileGlenn Ruben Bakke
dfu-gen .PHONY target is run unconditionally as first build target when included, and might fail if the hex file is not yet generated. To prevent this, the dfu-gen and dfu-flash targets are moved to the main Makefile and only exposed if feather52 is the defined BOARD.
2018-07-18nrf: Enable micro:bit FS by defaultGlenn Ruben Bakke
Update configuration define from MICROPY_HW_HAS_BUILTIN_FLASH to MICROPY_MBFS. MICROPY_MBFS will enable the builtin flash as part of enabling the micro:bit FS.
2018-07-18nrf/modules/uos/microbitfs: Remove unused uos_mbfs_mount.Ayke van Laethem
It throws an error in GCC 6.3.
2018-07-18nrf/modules/uos/microbitfs: Fix errno defines.Ayke van Laethem
Probably broken after the recent Clang fixes to errno.h.
2018-07-18nrf/mphalport: Remove divided assembly syntax.Ayke van Laethem
2018-07-18nrf: Remove useless #include <errno.h>.Ayke van Laethem
2018-07-18nrf/modules/machine/adc: Don't compare -1 to an unsigned number.Ayke van Laethem
Clang warns about this.
2018-07-18nrf/Makefile: Refine dead-code elimination parameters.Ayke van Laethem
Clang warns about useless -Wl,--gc-sections passed in CFLAGS.
2018-07-18nrf/Makefile: Use C11 instead of Gnu99.Ayke van Laethem
Some constructs require C11 which GCC silently allows.
2018-07-18nrf/Makefile: Remove -fstack-usage.Ayke van Laethem
-fstack-usage is not supported by Clang and old GCC versions.