Commit Graph

8133 Commits

Author SHA1 Message Date
Damien George 0a3ac07ec7 extmod/vfs: Rewrite path lookup algo to support relative paths from root.
For example, if the current directory is the root dir then this patch
allows one to do uos.listdir('mnt'), where 'mnt' is a valid mount point.
Previous to this patch such a thing would not work, on needed to do
uos.listdir('/mnt') instead.
2017-03-13 21:37:21 +11:00
Damien George a7a2344c9d qemu-arm: Add basic uos module with generic VFS capabilities. 2017-03-13 21:24:28 +11:00
Damien George 643876fb77 extmod/vfs_fat: Allow to compile with MICROPY_VFS_FAT disabled.
Some ports may want to compile with generic MICROPY_VFS support but without
the VfsFat class.  This patch allows such a thing.
2017-03-13 21:23:31 +11:00
Glenn Ruben Bakke 51c739f64a nrf5/bluetooth: Turn off bluetooth printf logging. 2017-03-12 23:32:33 +01:00
Glenn Ruben Bakke c8127ef337 nrf5: Add back ublupy scanner and scan entry source files in Makefile. 2017-03-12 23:24:37 +01:00
Glenn Ruben Bakke 6ea3f3c69b nrf5/bluetooth: Enable implementation in scan start function in the bluetooth stack driver. 2017-03-12 23:23:37 +01:00
Glenn Ruben Bakke a01a3734f8 nrf5/boards: Adjust heap end after increased .data usage in nrf52832 s132 linker script. 2017-03-12 23:20:53 +01:00
Glenn Ruben Bakke 5580ac8200 nrf5/bluetooth: Adding more implementation in scan start function. However, commented out for time beeing, as there is some memory issues when activating central. 2017-03-12 22:46:40 +01:00
Glenn Ruben Bakke 9aa3df7955 nrf5: Removing ubluepy scanner and scan entry from Makefile source list until nrf52 central issues has been resolved. 2017-03-12 22:45:02 +01:00
Paul Sokolovsky f5aac7d33f zephyr/main: nlr_jump_fail: Fix noreturn warning. 2017-03-13 00:43:36 +03:00
Paul Sokolovsky 40e541063f zephyr: Move "minimal" configuration building to a separate wrapper script.
Minimal config can be now build with:

./make-minimal BOARD=...

This is required because of Makefile.exports magic, which in its turn depends
on PROJ_CONF to be set correctly at the beginning of Makefile parsing at all
times. Instead of adding more and more workarounds for that, it's better to
just move minimal support to a separate wrapper.

Also, remove Zephyr 1.5 era cruft from Makefile, and add support for Zephyr's
"run" target which supercedes older "qemu" target in upstream.
2017-03-12 23:54:12 +03:00
Paul Sokolovsky 736a8a8ac7 zephyr: Make sure that generated prj.conf is updated only on content changes.
This is a typical problem with make: we want to trigger rebuilds only
if file actually changed, not if its timestamp changed. In this case,
it's aggravated by the fact that prj.conf depends on the value of
BOARD variable, so we need to do some tricks anyway. We still don't
try to detect if just BOARD changed, just try to generate new
prj.conf.tmp every time (quick), but do actual replacement of prj.conf
only if its content changed.
2017-03-12 22:28:45 +03:00
Glenn Ruben Bakke caf242a5ae nrf5/bluetooth: Correcting indention. 2017-03-12 20:20:15 +01:00
Glenn Ruben Bakke 739bf3a740 nrf5/bluetooth: Adding some implementation to scan_start function. 2017-03-12 20:18:37 +01:00
Glenn Ruben Bakke 89095f861f nrf5/modules/ubluepy: Adding scan method to the Scanner object. Adding locals dict table. 2017-03-12 19:52:12 +01:00
Glenn Ruben Bakke 471d6a05da nrf5/bluetooth: Adding empty scan_start and scan_stop function to the bluetooth driver. 2017-03-12 19:50:38 +01:00
Glenn Ruben Bakke ee5ecac7cc nrf5/modules/ubluepy: Adding constructor function to scanner object. 2017-03-12 14:40:56 +01:00
Glenn Ruben Bakke 7ea966d844 nrf5/modules/ubluepy: Adding print function to Scanner object. 2017-03-12 14:28:11 +01:00
Glenn Ruben Bakke 851705fc3a nrf5/modules/ubluepy: Disable all functions central related functions in the Peripheral object for now, even if MICROPY_PY_UBLUEPY_CENTRAL is enabled. 2017-03-12 14:27:09 +01:00
Glenn Ruben Bakke 242b40e917 nrf5/modules/ubluepy: Activate Scanner and ScanEntry objects if MICROPY_PY_UBLUPY_CENTRAL is set. 2017-03-12 14:25:49 +01:00
Glenn Ruben Bakke 90e88b2c43 nrf5/bluetooth: Adding new configuration flag for s132 bluetooth stack, to enable/disable ubluepy central. Disabled by default. 2017-03-12 14:24:12 +01:00
Glenn Ruben Bakke 2f9fda1367 nrf5: Adding ubluepy_scanner.c and ubluepy_scan_entry.c to Makefile source list. 2017-03-12 14:21:27 +01:00
Glenn Ruben Bakke 11c40892ac nrf5/modules/ubluepy: Adding template object typedefs for scanner and scan entry, and extern definition for scanner and scan_entry object type in modubluepy.h 2017-03-12 14:20:41 +01:00
Glenn Ruben Bakke 91652882a9 nrf5/modules/ubluepy: Adding templates for central role Scanner and ScanEntry objects. 2017-03-12 12:34:11 +01:00
Paul Sokolovsky 3e321f1724 tests/misc/: Make few tests skippable. 2017-03-11 01:17:02 +01:00
Glenn Ruben Bakke 1aecf560da nrf5/uart: Moving UART from pyb to machine module. 2017-03-10 22:48:43 +01:00
Glenn Ruben Bakke 611b829138 nrf5/uart: Refactoring UART module and HAL driver
Facilitating for adding second HW uart. Moving pyb_uart into
machine_uart. Adding return error codes from hal_uart functions,
if the hardware detects an error.
2017-03-10 22:21:19 +01:00
Damien George 12d0731b91 extmod/vfs_fat: Remove obsolete and unused str/len members. 2017-03-10 19:09:42 +11:00
Damien George 70201f4038 cc3200/mptask: Allocate flash VFS struct on the heap to trace root ptrs. 2017-03-10 19:09:19 +11:00
Damien George 8236d18338 stmhal/main: Allocate flash's VFS struct on the heap to trace root ptrs. 2017-03-10 19:02:20 +11:00
Damien George f07a56fa3b tests/extmod: Rename websocket test to websocket_basic.
This is so that the filename of the test doesn't clash with the module name
itself (being "websocket"), and lead to potential problems executing the
test.
2017-03-10 15:05:08 +11:00
Damien George 4351d16e62 stmhal/mphalport: Get ticks_cpu() working on F7 MCUs. 2017-03-10 14:58:26 +11:00
Paul Sokolovsky c9705cff68 tests/basics/fun_error: Split out skippable test. 2017-03-10 02:22:56 +01:00
Paul Sokolovsky 854bb322bf tests/feature_check/int_big: Rework "big int" detection.
MICROPY_LONGINT_IMPL_LONGLONG doesn't have overflow detection, so just
parsing a large number won't give an error, we need to print it out
to check that the whole number was parsed.
2017-03-10 02:11:43 +01:00
Paul Sokolovsky 776883cb80 py/objint_longlong: Implement mp_obj_int_from_bytes_impl().
This makes int.from_bytes() work for MICROPY_LONGINT_IMPL_LONGLONG.
2017-03-10 00:22:53 +01:00
Paul Sokolovsky bc5bffbf65 tests/micropython/opt_level: Clarify the expected output for opt_level == 3. 2017-03-09 23:22:31 +01:00
Paul Sokolovsky 53018d5ad2 tests/micropython/heapalloc_traceback: Fix backtrace line # after refactor. 2017-03-09 12:51:45 +01:00
Paul Sokolovsky 1a71d30fb8 tests/micropython: Make uio-using tests skippable. 2017-03-09 10:26:31 +01:00
Paul Sokolovsky e8d4527996 zephyr/modzephyr: Fix typo in identifier. 2017-03-09 10:18:21 +01:00
Paul Sokolovsky ce63a95a85 tests/dict_fromkeys: Split out skippable part. 2017-03-09 08:31:35 +01:00
Alex March ce0b5e078b tests/extmod: Add websocket tests.
These short unit tests test the base uPy methods as well as parts of the
websocket protocol, as implemented by uPy.

@dpgeorge converted the original socket based tests by @hosaka to ones
that only require io.BytesIO.
2017-03-09 16:47:41 +11:00
Damien George 38f063ea72 tests/extmod: Add very basic feature test for ussl module.
This test just tests that the basic functions/methods can be called with
the appropriate arguments.  There is no real test of underlying
functionality.

Thanks to @hosaka for the initial implementation of this test.
2017-03-09 13:42:34 +11:00
Paul Sokolovsky a0cbc108ba tests/float: Make various tests skippable. 2017-03-09 00:11:05 +01:00
Paul Sokolovsky 983144404b tests/basic: Make various tests skippable. 2017-03-09 00:07:19 +01:00
Damien George 52b6764894 py/nlrx64: Fixes to support Mac OS.
Two independent fixes:
- need to prefix symbols referenced from asm with underscore;
- need to undo the C-function prelude.
2017-03-08 22:36:02 +11:00
Paul Sokolovsky a64a0276b3 zephyr/modzephyr: Add a module for Zephyr-specific things.
Mostly intended to ease experimentation, no particular plans for APIs
so far (far less their stability), is_preempt_thread() provided is
mostly an example.
2017-03-08 08:55:50 +01:00
Paul Sokolovsky ddb56a0a84 README: Explicitly mention "await" support, and formatting for keywords. 2017-03-08 00:29:08 +01:00
Glenn Ruben Bakke f8d1ea80ae nrf5/modules: Updating uart object to allow baudrate configuration. 2017-03-07 23:18:03 +01:00
Glenn Ruben Bakke 99f5ecdfad nrf5/bluetooth: Moving bluetooth_conf.h to port root folder to make it more exposed. 2017-03-07 23:15:59 +01:00
Glenn Ruben Bakke 3b2ca64738 nrf5/boards: Remove define of machine PWM module configuration in nrf51 targets, as the device does not have a HW PWM peripheral. 2017-03-07 18:05:38 +01:00