| Age | Commit message (Collapse) | Author |
|
A DFU device must be in the idle state before it can be programmed, and
this requires either clearing the status or aborting, depending on its
current state. Code is added to do this. And the USB transfer size is now
automatically detected so devices with a size less than 2048 bytes work
correctly.
|
|
Some Python linters don't like unconditional except clauses because they
catch SystemExit and KeyboardInterrupt, which usually is not the intended
behaviour.
|
|
There appears to be an issue on Windows with CPython >= 3.6,
sys.stdout.flush() raises an exception:
OSError: [WinError 87] The parameter is incorrect
It works fine to just catch and ignore the error on the flush line. Tested
on Windows 10 x64 1803 (Build 17134.228), Python 3.6.4 amd64.
|
|
Following standard practice for defining custom exceptions.
|
|
The Python documentation recommends to pass the command as a string when
using Popen(..., shell=True). This is because "sh -c <string>" is used to
execute the command and additional arguments after the command string are
passed to the shell itself (not the executing command).
https://docs.python.org/3.5/library/subprocess.html#subprocess.Popen
|
|
The first dynamic qstr pool is double the size of the 'alloc' field of
the last const qstr pool. The built in const qstr pool
(mp_qstr_const_pool) has a hardcoded alloc size of 10, meaning that the
first dynamic pool is allocated space for 20 entries. The alloc size
must be less than or equal to the actual number of qstrs in the pool
(the 'len' field) to ensure that the first dynamically created qstr
triggers the creation of a new pool.
When modules are frozen a second const pool is created (generally
mp_qstr_frozen_const_pool) and linked to the built in pool. However,
this second const pool had its 'alloc' field set to the number of qstrs
in the pool. When freezing a large quantity of modules this can result
in thousands of qstrs being in the pool. This means that the first
dynamically created qstr results in a massive allocation. This commit
sets the alloc size of the frozen qstr pool to 10 or less (if the number
of qstrs in the pool is less than 10). The result of this is that the
allocation behaviour when a dynamic qstr is created is identical with an
without frozen code.
Note that there is the potential for a slight memory inefficiency if the
frozen modules have less than 10 qstrs, as the first few dynamic
allocations will have quite a large overhead, but the geometric growth
soon deals with this.
|
|
This patch will work for both Python 2 and 3.
|
|
pyusb v1.0.2 warns about `getargspec` as being deprecated.
|
|
Thanks to @dhylands for this patch to pad the image to 8-byte boundaries.
|
|
|
|
|
|
Segments are separated by / and begin with the memory address. This
follows how the ST DFU tool works.
|
|
The ST DFU bootloader supports a transfer size up to 2048 bytes, so send
that much data on each download (to device) packet. This almost halves
total download time.
|
|
|
|
Uses new pypi.org URL, and now creates a socket with the address parameters
returned by getaddrinfo().
|
|
Way to reproduce a UnicodeEncodeError without this patch:
LC_ALL=C tinytest-codegen.py ...
|
|
Instead of passing thru more and more options from tinytest-codegen to
run-tests --list-tests, pipe output of run-tests --list-tests into
tinytest-codegen.
|
|
This call is required before using the device (some operating systems don't
need it but others do). Fixes issue #3476.
|
|
Gets passed to run-tests --list-tests to get actual list of tests to use.
If --target= is not given, legacy set hardcoded in tinytest-codegen itself
is used.
Also, get rid of tinytest test groups - they aren't really used for
anything, and only complicate processing. Besides, one of the next
step is to limit number of tests per a generated file to control
the binary size, which also will require "flat" list of tests.
|
|
|
|
So it was manageable and extensible.
|
|
The way tinytest was used in qemu-arm test target is that it didn't test
much. MicroPython tests are based on matching the test output against
reference output, but qemu-arm's implementation didn't do that, it
effectively tested just that there was no exception during test
execution. "upytesthelper" wrapper was introduce to fix it, and so
test generator is now switched to generate test code for it.
Also, fix PEP8 and other codestyle issues.
|
|
Tinytest library was misplaced under tools/. By convention, any target
libraries belong to lib/, while tools/ contains host-side tools.
|
|
|
|
|
|
|
|
|
|
As it may contain newlines, etc.
|
|
The binary and unary ops have changed bytecode encoding.
|
|
TLS SNI support, fixes after making str.rstrip() behavior compliant.
|
|
Also renames "stmhal" to "stm32" in documentation and everywhere else.
|
|
This makes the -d commandline argument usable again.
Pass empty string as parent name as listing starts from the root.
|
|
|
|
There were several different spellings of MicroPython present in comments,
when there should be only one.
|
|
Afterwards, they can be access using pkg_resource module from
micropython-lib.
|
|
|
|
|
|
This is required to easily giving links to a particular difference case.
Also, add RST anchors to allow cases to cross-reference each other.
|
|
|
|
Regression was introduced by ec534609f665cb791b8fc1eae1a44e514c297659
|
|
|
|
|
|
Memory optimizations and error handling improvements.
|
|
|
|
By making sure we don't add relative paths to sys.path.
|
|
This patch allows the following code to run without allocating on the heap:
super().foo(...)
Before this patch such a call would allocate a super object on the heap and
then load the foo method and call it right away. The super object is only
needed to perform the lookup of the method and not needed after that. This
patch makes an optimisation to allocate the super object on the C stack and
discard it right after use.
Changes in code size due to this patch are:
bare-arm: +128
minimal: +232
unix x64: +416
unix nanbox: +364
stmhal: +184
esp8266: +340
cc3200: +128
|
|
When trying to execute a command via raw REPL and expected "OK" reply
not received, show what was received instead.
|
|
When working with a "virtual" port, like PTY. The issue described in
http://stackoverflow.com/questions/34831131/pyserial-does-not-play-well-with-virtual-port
|
|
Without this, Zephyr's port "make test" doesn't work.
|
|
This allows to execute a command and communicate with its stdin/stdout
via pipes ("exec") or with command-created pseudo-terminal ("execpty"),
to emulate serial access. Immediate usecase is controlling a QEMU process
which emulates board's serial via normal console, but it could be used
e.g. with helper binaries to access real board over other hadware
protocols, etc.
An example of device specification for these cases is:
--device exec:../zephyr/qemu.sh
--device execpty:../zephyr/qemu2.sh
Where qemu.sh contains long-long qemu startup line, or calls another
command. There's a special support in this patch for running the command
in a new terminal session, to support shell wrappers like that (without
new terminal session, only wrapper script would be terminated, but its
child processes would continue to run).
|