Commit Graph

7098 Commits

Author SHA1 Message Date
Paul Sokolovsky b0f23786da esp8266/Makefile: Put firmware-ota.bin in build/, for consistency. 2017-01-04 10:36:28 +03:00
Paul Sokolovsky 52c19875a4 esp8266/general: Add "Scarcity of runtime resources" section.
With warnings of need to close files, sockets, etc.
2017-01-04 10:33:48 +03:00
Damien George 54ea10a76a tests/pyb/uart: Update test to match recent change to UART timeout_char. 2017-01-04 17:53:41 +11:00
Max e1f495a4bd docs/esp8266/tutorial: Close socket after reading page content. 2017-01-04 11:15:02 +11:00
Dave Hylands 3c84197f17 drivers/onewire: Enable pull up on data pin.
The driver seems to be be enabling the pullup resistor in most places, but
not this one. Making this one little change allows onewire devices to be
used with no external pullup resistor.
2017-01-03 17:19:22 +11:00
TheSpooler 3d96201165 esp8266/modesp: Fix a typo, print -> printf. 2017-01-03 17:10:13 +11:00
Damien George 3f9c45efd1 py/asmarm: Fix assembler's PASS_EMIT constant name. 2017-01-03 15:40:50 +11:00
Paul Sokolovsky 714a59ab64 esp8266/modesp: Make check_fw() work with OTA firmware. 2017-01-03 00:02:00 +03:00
Paul Sokolovsky f5750e88c5 esp8266/Makefile: Produce OTA firmware as firmware-ota.bin. 2017-01-02 19:29:41 +03:00
Paul Sokolovsky 86d210951f esp8266/scripts/inisetup: Dump FS starting sector/size on error.
Should allow to diagnose/try to recover FS easier.
2017-01-02 18:52:35 +03:00
Paul Sokolovsky 5efd6508ec unix/moduselect: Fix nanbox build with recent changes. 2016-12-31 11:19:25 +03:00
Paul Sokolovsky 093a8f5fa2 unix/moduselect: If file object passed to .register(), return it in .poll().
This makes unix "uselect" compatible with baremetal "uselect". Previosuly,
unix version accepted file/socket objects, but internally converted that
to file descriptors, and that's what .poll() returned. To acheive new
behavior, file-like objects are stored internally in an array, in addition
to existing array of struct pollfd. This array is created only on first
case of file-like object being passed to .register(). If only raw fd's are
passed, there will be no additional memory used comparing to the original
implementation.
2016-12-31 00:07:18 +03:00
Damien George d377c83794 docs/library/machine.I2C: Fix I2C constructor docs to match impl. 2016-12-30 15:25:48 +11:00
Andrew Mulholland 71ff0b549d docs/esp8266/tutorial: Update intro to add Getting the firmware section.
Add a "Getting the firmware" section to better describe how to get hold of
the MicroPython firmware, especially if you have a 512kb module.
2016-12-30 14:27:02 +11:00
Paul Sokolovsky b315d76b6b cc3200/README: Reorganize and update to the current state of affairs.
Try to put sections in more logical order, and information about cc3200tool
to be the default flashing method.
2016-12-29 19:46:25 +03:00
Paul Sokolovsky 0748143a4c cc3200: Add targets to erase flash, deploy firmware using cc3200tool.
cc3200tool, https://github.com/ALLTERCO/cc3200tool is a (mostly, some
binary blobs present) open-source, Linux-friendly tool to flash a cc3200
devices. It's an alternative to fully proprietary, Windows-only Uniflash
from TI.

The provided make targets are for erasing flash, flashing the uPy
bootloader and firmware, and flashing vendor's WiFi firmware "servicepacks"
(the latter needs to be downloaded from vendor side, a link is present
inside Makefile).
2016-12-29 17:12:47 +03:00
Rami Ali 75aa7befec tests/unix: Improve runtime_utils.c test coverage. 2016-12-29 18:24:03 +11:00
Rami Ali b7024f0f64 tests/cmdline: Improve repl.c autocomplete test coverage. 2016-12-29 17:14:04 +11:00
Rami Ali f397e1fdf0 tests/thread: Improve modthread.c test coverage. 2016-12-29 13:27:50 +11:00
Rami Ali c15ebf7c8c tests/extmod: Improve ubinascii.c test coverage. 2016-12-29 13:22:19 +11:00
Paul Sokolovsky 45a8cc8f0b cc3200: make: Rename "deploy" target to "deploy-ota".
There should be target to deploy uPy over wired (UART) connection, and
wired and OTA targets should be named differently.
2016-12-29 01:27:50 +03:00
Paul Sokolovsky 514b82900c cc3200/README: (Re)add information about accessing REPL on serial. 2016-12-28 21:44:47 +03:00
Paul Sokolovsky 076b80467b cc3200: Enable UART REPL by default.
To allow access and testing without complex access methods like WiFi.
Enabled for both WiPy and TI LaunchXL.
2016-12-28 14:57:36 +03:00
Damien George afc5063539 py/unicode: Comment-out unused function unichar_isprint. 2016-12-28 17:50:10 +11:00
Rami Ali eae819c0ed tests/micropython: Add test for micropython.stack_use() function. 2016-12-28 17:46:52 +11:00
Damien George e81116d07d stmhal/uart: Increase inter-character timeout by 1ms.
Sys-tick resolution is 1ms and a value of 2 will give a delay between 1ms
and 2ms (whereas a value of 1 gives a delay between 0ms and 1ms, which is
too short).
2016-12-28 17:32:18 +11:00
Damien George 16a584d7cf stmhal/uart: Provide a custom function to transmit over UART.
The HAL_UART_Transmit function has changed in the latest HAL version such
that the Timeout is a timeout for the entire function, rather than a
timeout between characters as it was before.  The HAL function also does
not allow one to reliably tell how many characters were sent before the
timeout (if a timeout occurred).

This patch provides a custom function to do UART transmission, completely
replacing the HAL version, to fix the above-mentioned issues.
2016-12-28 17:18:59 +11:00
Rami Ali 65574f817a tests/basics: Add tests to improve coverage of binary.c. 2016-12-28 16:11:54 +11:00
Damien George ea6a958393 py/objint: Simplify mp_int_format_size and remove unreachable code.
One never needs to format integers with a base larger than 16 (but code
can be easily extended beyond this value if needed in the future).
2016-12-28 12:46:20 +11:00
Damien George 44bf8e1f2b py/mpprint: Add assertion for, and comment about, valid base values. 2016-12-28 12:45:33 +11:00
Damien George ca7af9a778 py/parsenum: Fix warning for signed/unsigned comparison. 2016-12-28 12:25:00 +11:00
Damien George 43384ad7e7 tests/basics: Add tests for parsing of ints with base 36. 2016-12-28 12:08:46 +11:00
Damien George 2d9440e2d1 py/mpz: Fix assertion in mpz_set_from_str which checks value of base. 2016-12-28 12:04:19 +11:00
Damien George c2dd494bd9 py/parsenum: Simplify and generalise decoding of digit values.
This function should be able to parse integers with any value for the
base, because it is called by int('xxx', base).
2016-12-28 12:02:49 +11:00
Paul Sokolovsky 25f44c19f1 cc3200: Re-add support for UART REPL (MICROPY_STDIO_UART setting).
UART REPL support was lost in os.dupterm() refactorings, etc. As
os.dupterm() is there, implement UART REPL support at the high level -
if MICROPY_STDIO_UART is set, make default boot.py contain os.dupterm()
call for a UART. This means that changing MICROPY_STDIO_UART value will
also require erasing flash on a module to force boot.py re-creation.
2016-12-27 01:05:37 +03:00
Paul Sokolovsky cf96be60dc py/misc.h: Typo fix in comment. 2016-12-27 01:05:30 +03:00
Paul Sokolovsky 05aebb9206 tests/heapalloc_inst_call: Test for no alloc for simple object calls. 2016-12-25 00:50:27 +03:00
Paul Sokolovsky 492c612f9d tests/utimeq_stable: Test for partial stability of utimeq queuing. 2016-12-24 00:25:15 +03:00
Paul Sokolovsky 7327966da7 extmod/modutimeq: Make time_less_than be actually "less than", not less/eq.
This fixes an obvious case of non-fair scheduling of 2 tasks with the same
deadline.
2016-12-24 00:06:29 +03:00
Paul Sokolovsky 18f12caafc extmod/modutimeq: Fix printf in dump(). 2016-12-23 21:11:19 +03:00
Paul Sokolovsky 1e9093f8cb examples/hwapi/hwconfig_console: Don't alloc memory in value(). 2016-12-23 17:24:24 +03:00
Paul Sokolovsky 1328833663 stmhal, esp8266: Enable utimeq module. 2016-12-23 14:49:13 +03:00
sergiuszm ea426dd9ef stmhal: Add support for STM32 Nucleo64 L476RG. 2016-12-22 17:45:50 +11:00
Damien George e202b6f586 stmhal/sdcard: Use mp_hal_pin_config function instead of HAL_GPIO_Init.
There is a minor functional change with this patch, that the GPIO are now
configured in fast mode, whereas they were in high speed mode before.  But
the SDIO should still work because SD CK frequency is at most 25MHz.
2016-12-22 14:55:26 +11:00
Damien George ed559de063 stmhal/led: Use mp_hal_pin_config function instead of HAL_GPIO_Init. 2016-12-22 14:55:26 +11:00
Damien George ffa30898cc stmhal/usrsw: Use mp_hal_pin_config function instead of HAL_GPIO_Init. 2016-12-22 14:55:26 +11:00
Damien George 425150040c stmhal/mphalport.h: Explicitly use HAL's GPIO constants for pull modes.
They are the same as the existing raw constants (namely 0, 1, 2) but we
want to explicitly show that one can use the HAL's constants if necessary
(eg the mpconfigboard.h files do use the HAL's constants to define the
pull state of certain configurable pins).
2016-12-22 14:55:26 +11:00
Damien George b14abab9cd stmhal/led: Properly initialise timer handle to zero before using it.
Without this the timer will have random values for its State and Lock
entries.  The object can then be in a locked state leading to some HAL
functions returning immediately with an error code (which is unchecked).

This patch fixes such a bug which did manifest itself as PWM not working
correctly for LEDs.
2016-12-22 14:55:26 +11:00
Paul Sokolovsky ffe807f349 extmod/moduheapq: Revert change for adhoc relative-time queue support.
Now that specialized utimeq module has been implenented, revert previous
adhoc changes to uheapq.

This reverts commit 0cbc07227c.
2016-12-22 06:37:49 +03:00
Damien George efa206d955 unix/Makefile: Make "coverage_test" target mirror Travis test actions. 2016-12-22 11:28:29 +11:00