aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-17Merge pull request #505 from lurch/patch-5Damien George
Add 'test' target to unix/Makefile
2014-04-17Merge pull request #504 from lurch/patch-4Damien George
Allow the uPy used by run-tests to be overridden
2014-04-17Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-17py: Add cmath module, for complex math. Disabled by default.Damien George
Not all functions implemented. Not enabled on pyboard.
2014-04-17stmhal: Clean up fatality indications; remove long-obsolete malloc0.c.Damien George
2014-04-17py: Enable builtin 'property' by default.Damien George
2014-04-17py: Tidy up variables in VM, probably fixes subtle bugs.Damien George
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.
2014-04-17py: Don't assert but go to unsupported_op in mp_binary_op for small int.Damien George
2014-04-17tests: Split out those tests requiring float and import.Damien George
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.
2014-04-17modffi: Support float types.Paul Sokolovsky
2014-04-17Updated the envvar used by ./run-testsAndrew Scheller
As discussed in #504
2014-04-17Changed the envvar name to MICROPY_MICROPYTHONAndrew Scheller
As discussed in #504
2014-04-17stmhal: Change VID to 0xf055=FOSS, and PID to a random number.Damien George
Needs a better solution.
2014-04-17Merge pull request #501 from dhylands/fix-gen-failDamien George
Remove generated .h file if the generation process fails.
2014-04-17Merge pull request #500 from dhylands/fix-sdcard-removedDamien George
Fix to allow usbd_msc_storage.c to compile when MICROPY_HW_HAS_SDCARD is...
2014-04-17tests: Remove print('flush') from 2 tests, since stmhal now works.Damien George
Fixing the USB problem on stmhal now gets these 2 tests working.
2014-04-17stmhal: Add more math functions.Damien George
Taken straight from musl and newlib. License seems compatible with MIT.
2014-04-17stmhal: Fix 64-byte USB packet bug properly.Damien George
A 64-byte packet is now followed by a 0-byte packet if there is nothing more to send. This flushes the USB endpoint.
2014-04-16stmhal: Replace magic number 3 with CDC_IN_EP define.Damien George
2014-04-16Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-16stmhal: Improve flash storage cache management.Damien George
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.
2014-04-16Stupid typoAndrew Scheller
2014-04-16Add 'test' target to unix/MakefileAndrew Scheller
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.
2014-04-16Merge pull request #503 from lurch/patch-1Paul Sokolovsky
fix tests/bytecode/README to match contents of tests/bytecode/run-tests
2014-04-16Allow the uPy used by run-tests to be overriddenAndrew Scheller
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)
2014-04-16fix README to match contents of run-testsAndrew Scheller
2014-04-16Have make remove targets if a recipie fails.Dave Hylands
2014-04-16Fix to allow usbd_msc_storage.c to compile when MICROPY_HW_HAS_SDCARD isn't ↵Dave Hylands
defined.
2014-04-16stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.Damien George
2014-04-16stmhal: Fix USB CDC buffer overrun error.Damien George
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.
2014-04-16Merge pull request #497 from lurch/build-32bitDamien George
New config option MICROPY_FORCE_32BIT (defaulted to 0)
2014-04-16tools: Fix up pybcdc.inf generation: new lines and hex digits.Damien George
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.
2014-04-16Merge pull request #498 from lurch/create-headers-from-filesDamien George
Auto-generate the stmhal/pybcdc_inf header file from static files
2014-04-16Merge pull request #499 from lurch/skip-travis-testsDamien George
run-tests can now skip certain tests when run under Travis CI
2014-04-16stmhal: Fix C bindings of I2C.read/write.Damien George
2014-04-16run-tests can now skip certain tests when run under Travis CIAndrew Scheller
See the `skip_travis_tests` variable. Fixes #495 (also tidied up usage of os.path.basename() function)
2014-04-16Auto-generate the stmhal/pybcdc_inf header file from static filesAndrew Scheller
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
2014-04-16New config option MICROPY_FORCE_32BIT (defaulted to 0)Andrew Scheller
Makes it easier for 64-bit unix hosts to build 32-bit unix binaries (for testing)
2014-04-16stmhal: Add I2C functions for pure master read/write.Damien George
2014-04-15py: Add len(bytes).Damien George
2014-04-15py: Add builtin functions bin and oct, and some tests for them.Damien George
2014-04-15Merge pull request #496 from dhylands/fix-debug-usartDamien George
Fix call to enable pyb_usart_global_debug.
2014-04-15Fix call to enable pyb_usart_global_debug.Dave Hylands
2014-04-15Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-15stmhal: Fix USB MSC so that it unmounts correctly on Mac OS X.Damien George
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.
2014-04-15stmhal: Add ADC function to read data at a given frequency.Damien George
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).
2014-04-15stmhal: Add I2C.scan method, to scan all devices on the bus.Damien George
Simple way to find the address of an attached I2C device.
2014-04-15stmhal: Add simple README.txt to freshly-created filesystem.Damien George
2014-04-15Merge pull request #493 from aitjcize/patchDamien George
Move entry_table to separated header file.
2014-04-15Rename header file.AZ Huang