summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-22esp32/README.md: Update build instructions for newer toolchain.Jim Mussared
Also fix Espressif links to the specific version they apply to.
2020-03-22esp8266/README.md: Add docker build instructions.Jim Mussared
2020-03-20esp8266/modmachine: Implement machine.soft_reset().Damien George
Fixes issue #5764.
2020-03-18tests/run-multitests.py: Print test summary and do exit(1) on failure.Damien George
2020-03-18unix: Remove custom file implementation to use extmod's VFS POSIX one.Damien George
The implementation in extmod/vfs_posix_file.c is now equivalent to that in ports/unix/file.c, so remove the latter and use the former instead.
2020-03-18extmod/vfs_posix_file: Lock GIL when writing and allow stdio flush.Damien George
Also support MP_STREAM_GET_FILENO ioctl. The stdio flush change was done previously for the unix port in 3e0b46b9af8b7a6934b7ac68671ef8f55be2b848. These changes make this POSIX file implementation equivalent to the unix file implementation.
2020-03-18all: Convert exceptions to use mp_raise_XXX helpers in remaining places.Damien George
2020-03-18extmod/modlwip: Properly handle non-blocking and timeout on UDP recv.Damien George
Fixes UDP non-blocking recv so it returns EAGAIN instead of ETIMEDOUT. Timeout waiting for incoming data is also improved by replacing 100ms delay with poll_sockets(), as is done in other parts of this module. Fixes issue #5759.
2020-03-18extmod/modlwip: Fix polling of UDP socket so it doesn't return HUP.Damien George
STATE_NEW will return HUP when polled so put active UDP sockets into a new state which is different to STATE_NEW. Fixes issue #5758.
2020-03-12stm32/main: Fix bug mounting 3rd SD partition.Damien George
Fixes issue #5753.
2020-03-12examples/bluetooth: Replace "connectable" parameter with "adv_type".Thomas Friebel
Follow up to dd0bc26e65734b8a4fafa3769008e92e2ec6645d which changed the parameter list of the IRQ_SCAN_RESULT event. Adapt ble_temperature_central.py accordingly.
2020-03-11zephyr: Execute main.py file if it exists.Maureen Helm
Adds support in the zephyr port to execute main.py if the file system is enabled and the file exists. Existing support for executing a main.py frozen module is preserved, since pyexec_file_if_exists() works just like pyexec_frozen_module() if there's no vfs.
2020-03-11zephyr: Enable usb mass storage class on mimxrt1050_evk.Maureen Helm
Enables the zephyr usb device stack and mass storage class on the mimxrt1050_evk board. The mass storage class is backed by the sdhc disk access driver, so it's now possible to browse and modify the contents of the SD card from a USB host (your PC). This is in preparation to support writing a main.py script to the SD card, and then executing it after the next reset.
2020-03-11zephyr: Mount a file system during init.Maureen Helm
Adds support in the zephyr port to mount a file system if a block device (sdhc disk access or flash area) is available. The mount point is either "/sd" or "/flash" depending on the type of block device. Tested with an sdhc disk access block device and fatfs on the mimxrt1050_evk board. Tested with a flash area block device and littlefs on the reel_board.
2020-03-11travis: For unix tests use Makefile target instead of explicit commands.Damien George
2020-03-11tests/run-tests: Consider all tests as native when emit=native is used.Damien George
So that they are skipped when running on a target that doesn't support the native emitter, eg a nanbox build.
2020-03-11unix/Makefile: Detect and pass thru mpy-cross flags when running tests.Damien George
2020-03-11py/modmicropython: Add heap_locked function to test state of heap.Andrew Leech
This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
2020-03-11mimxrt: Add MIMXRT1010 board.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-11samd: Fix to build with latest tinyusb.Jim Mussared
2020-03-11lib/tinyusb: Update to a6b916ba for i.MX support.Jim Mussared
2020-03-11py/objstringio: Expose tell() on StringIO and BytesIO objects.Andrew Leech
To match file objects. Fixes issue #5581.
2020-03-11tools/codeformat.py: Eliminate need for sizeof fixup.David Lechner
This eliminates the need for the sizeof regex fixup by rearranging things a bit. All other bitfields already use the parentheses around expressions with sizeof, so one case is fixed by following this convention. VM_MAX_STATE_ON_STACK is the only remaining problem and it can be worked around by changing the order of the operands.
2020-03-11py/objstr: Remove duplicate % in error string.Tom Collins
The double-% was added in 11de8399fe5f9ef54589b14470faf8d4fcc5ccaa (Jun 2014) when such errors were formatted with printf. But then 55830dd9bf4fee87c0a6d3f38c51614fea0eb483 (Dec 2018) changed mp_obj_new_exception_msg() to not format the message, as discussed in #3004. So such error strings are no longer formatted and a % is just that.
2020-03-11extmod/vfs: Factor out vfs mount-and-chdir helper from stm32.Damien George
2020-03-11tools/metrics.py: Use check_call instead of run to error out on error.Damien George
2020-03-11extmod/nimble: When getting BLE MAC try public address if random fails.Damien George
This is needed for BLE.config('mac') to work on esp32.
2020-03-11extmod/modbluetooth: Change scan result's "connectable" to "adv_type".Damien George
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
2020-03-11esp32: Deinitialize Bluetooth on soft reset.Thomas Friebel
This fixes a crash, caused by NimBLE continuing to call the Python BLE interrupt handler after soft reboot.
2020-03-11extmod/modbluetooth: Unify error handling in remaining places.Thomas Friebel
Most error handling is done via `bluetooth_handle_errno()` already. Replace the remaining few manual checks with calls to that function.
2020-03-11extmod/nimble: Clarify active state and check for active in all methods.Jim Mussared
This commit ensures that the BLE stack is active before allowing operations that may otherwise crash if it's not active. It also clarifies the state better (adding the "stopping" state) and renames mp_bluetooth_is_enabled to the more self-explanatory mp_bluetooth_is_active.
2020-03-10esp8266/machine_pin: Disable ets_loop_iter during hard IRQ handler.Damien George
Otherwise ets_loop_iter may be reentered. Related to issue #5714.
2020-03-10tests/multi_bluetooth: Add initial tests for bluetooth BLE.Damien George
2020-03-10travis: Run multi_net tests as part of coverage job.Damien George
2020-03-10tests/multi_net: Add initial set of multi-instance tests for network.Damien George
2020-03-10tests/run-multitests.py: Add new test runner for multiple Py instances.Damien George
This commit adds a test runner and initial test scripts which run multiple Python/MicroPython instances (eg executables, target boards) in parallel. This is useful for testing, eg, network and Bluetooth functionality. Each test file has a set of functions called instanceX(), where X ranges from 0 up to the maximum number of instances that are needed, N-1. Then run-multitests.py will execute this script on N separate instances (eg micropython executables, or attached boards via pyboard.py) at the same time, synchronising their start in the right order, possibly passing IP address (or other address like bluetooth MAC) from the "server" instance to the "client" instances so they can connect to each other. It then runs them to completion, collects the output, and then tests against what CPython gives (or what's in a provided .py.exp file). The tests will be run using the standard unix executable for all instances by default, eg: $ ./run-multitests.py multi_net/*.py Or they can be run with a board and unix executable via: $ ./run-multitests.py --instance pyb:/dev/ttyACM0 --instance exec:micropython multi_net/*.py
2020-03-10travis: Build stm32 PYBD_SF6 with BTstack as bluetooth stack.Damien George
2020-03-10stm32: Refactor Bluetooth HCI RX to be independent of transport layer.Damien George
Now all HCI specific code (eg UART vs WB55 internal messaging) is confined to modbluetooth_hci.c.
2020-03-10extmod/btstack: Implement notifications/indications for GATT clients.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10extmod/btstack: Implement scan and gatt client, connect and disconnect.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10extmod/btstack: Implement gatts_db for btstack.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10extmod/btstack: Implement service registration.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10extmod/btstack: Implement advertising.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10stm32/boards/PYBD: Allow building with BTstack (via make command line).Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10stm32: Add bindings for BTstack implementation.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10extmod/btstack: Add empty modbluetooth implementation.Damien George
Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10lib: Add BlueKitchen BTstack submodule.Damien George
2020-03-10extmod/modbluetooth: Extract out gatts_db functionality from nimble.Damien George
For use by other stacks, if they need it. Work done in collaboration with Jim Mussared aka @jimmo.
2020-03-10stm32: Refactor bluetooth stack/hci/driver bindings.Damien George
This makes a cleaner separation between the: driver, HCI UART and BT stack. Also updated the naming to be more consistent (mp_bluetooth_hci_*). Work done in collaboration with Jim Mussared aka @jimmo.