| Age | Commit message (Collapse) | Author |
|
Add 'test' target to unix/Makefile
|
|
Allow the uPy used by run-tests to be overridden
|
|
|
|
Not all functions implemented. Not enabled on pyboard.
|
|
|
|
|
|
Things get tricky when using the nlr code to catch exceptions. Need to
ensure that the variables (stack layout) in the exception handler are
the same as in the bit protected by the exception handler.
Prior to this patch there were a few bugs. 1) The constant
mp_const_MemoryError_obj was being preloaded to a specific location on
the stack at the start of the function. But this location on the stack
was being overwritten in the opcode loop (since it didn't think that
variable would ever be referenced again), and so when an exception
occurred, the variable holding the address of MemoryError was corrupt.
2) The FOR_ITER opcode detection in the exception handler used sp, which
may or may not contain the right value coming out of the main opcode
loop.
With this patch there is a clear separation of variables used in the
opcode loop and in the exception handler (should fix issue (2) above).
Furthermore, nlr_raise is no longer used in the opcode loop. Instead,
it jumps directly into the exception handler. This tells the C compiler
more about the possible code flow, and means that it should have the
same stack layout for the exception handler. This should fix issue (1)
above. Indeed, the generated (ARM) assembler has been checked explicitly,
and with 'goto exception_handler', the problem with &MemoryError is
fixed.
This may now fix problems with rge-sm, and probably many other subtle
bugs yet to show themselves. Incidentally, rge-sm now passes on
pyboard (with a reduced range of integration)!
Main lesson: nlr is tricky. Don't use nlr_push unless you know what you
are doing! Luckily, it's not used in many places. Using nlr_raise/jump
is fine.
|
|
|
|
Tests in basics (which should probably be renamed to core) should not
rely on float, or import any non-built-in files. This way these tests
can be run when those features are not available.
All test in basics now pass on the pyboard using stmhal port, except for
string-repr which has some issues with character hex printing.
|
|
|
|
As discussed in #504
|
|
As discussed in #504
|
|
Needs a better solution.
|
|
Remove generated .h file if the generation process fails.
|
|
Fix to allow usbd_msc_storage.c to compile when MICROPY_HW_HAS_SDCARD is...
|
|
Fixing the USB problem on stmhal now gets these 2 tests working.
|
|
Taken straight from musl and newlib. License seems compatible with MIT.
|
|
A 64-byte packet is now followed by a 0-byte packet if there is nothing
more to send. This flushes the USB endpoint.
|
|
|
|
|
|
Internal flash used for the filesystem is now written (from the cache)
only after a 5s delay, or when a file is closed, or when the drive is
unmounted from the host. This delay means that multiple writes can
accumulate in the cache, and leads to less writes to the flash, making
it last longer.
It's implemented by a high-priority interrupt that takes care of flash
erase and write, and flushing the cache.
This is still only an interim solution for the flash filesystem. It
eventually needs to be replaced with something that uses less RAM for
the cache, something that can use more of the flash, and something that
does proper wear levelling.
|
|
|
|
In conjunction with #504 this allows you to do things like:
```shell
make -C unix clean && make -C unix test CC=gcc-4.7
```
all from the top-level micropython directory :-)
Something similar could probably be done for windows/Makefile too, but I don't have a cygwin setup to test with.
|
|
fix tests/bytecode/README to match contents of tests/bytecode/run-tests
|
|
with MICROPY_MP_PY envvar, in an analogous way to MICROPY_CPYTHON3 envvar.
(the reason for this will be made clearer by a later PR)
|
|
|
|
|
|
defined.
|
|
|
|
Need to wait for the low-level USB driver to send the data over the USB
in-endpoint before the buffer can be used again. This patch adds a
check for this.
|
|
New config option MICROPY_FORCE_32BIT (defaulted to 0)
|
|
Using Python's file open in 'r' mode opens it for text reading, which
converts all new lines to \n. Could use 'rb' binary mode, but then
don't have access to the string Template replacement functions. Thus,
force the output to have '\\r\\n' ending.
Also fix regex to match hex digits.
|
|
Auto-generate the stmhal/pybcdc_inf header file from static files
|
|
run-tests can now skip certain tests when run under Travis CI
|
|
|
|
See the `skip_travis_tests` variable. Fixes #495
(also tidied up usage of os.path.basename() function)
|
|
The USB VID&PID are automatically extracted from usbd_desc_cdc_msc.c
and inserted into pybcdc_inf.template, ensuring that the same USB
IDs get used everywhere
|
|
Makes it easier for 64-bit unix hosts to build 32-bit unix
binaries (for testing)
|
|
|
|
|
|
|
|
Fix call to enable pyb_usart_global_debug.
|
|
|
|
|
|
Mac OS X sends a SCSI command to remove the medium when it unmounts a
drive. If this command is not honoured, then OS X will automatically
remount the drive, making it impossible to eject. This patch disables
the USB MSC when the right SCSI command is sent.
|
|
Reads ADC values into a bytearray (or similar) at a fixed rate. Needs a
better name and improved API. Also fix up DAC dma function (which also
needs a better name and API).
|
|
Simple way to find the address of an attached I2C device.
|
|
|
|
Move entry_table to separated header file.
|
|
|