summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* unix modffi: Convert to static module structures.Paul Sokolovsky2014-04-18
|
* py: Simplify objfun/objgenerator connection, no need to call bc_get.Damien George2014-04-17
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-17
|\
| * unix modsocket: Convert to static module structures.Paul Sokolovsky2014-04-17
| |
| * unix: Make mem_info() dump GC info too.Paul Sokolovsky2014-04-17
| | | | | | | | mem_info() is already pretty hacky, let it be more hacky.
| * unix modtime: Convert to static module structures.Paul Sokolovsky2014-04-17
| |
| * unix modtime: Adhere to MICROPY_ENABLE_FLOAT better.Paul Sokolovsky2014-04-17
| |
| * objgenerator: Generator must execute in its defining lexical context.Paul Sokolovsky2014-04-17
| | | | | | | | | | I.e. with its own globals. So, just as for functions, we need to switch globals when resuming a generator.
| * objfun: Add local header.Paul Sokolovsky2014-04-17
| | | | | | | | | | | | | | | | | | This follows pattern already used for objtuple, etc.: objfun.h's content is not public - each and every piece of code should not have access to it. It's not private either - with out architecture and implementation language (C) it doesn't make sense to keep implementation of each object strictly private and maintain cumbersome accessors. It's "local" - intended to be used by a small set of "friend" (in C++ terms) objects.
* | py: Fix pfenv_print_strn to return correct number of chars printed.Damien George2014-04-17
|/ | | | With this fix, all tests in tests/basics pass on pyboard.
* py: Make built-in 'range' a class.Damien George2014-04-17
| | | | Addresses issue #487.
* build: Simplify build directory layout by putting all headers in genhdr.Damien George2014-04-17
| | | | | Any generated headers go in $(BUILD)/genhdr/, and are #included as 'genhdr/xxx.h'.
* Merge branch 'relocatable-build-dir' of github.com:lurch/micropython into ↵Damien George2014-04-17
|\ | | | | | | lurch-relocatable-build-dir
| * build directory can now be renamedAndrew Scheller2014-04-16
| | | | | | | | | | | | | | | | | | The autogenerated header files have been moved about, and an extra include dir has been added, which means you can give a custom BUILD=newbuilddir option to make, and everything "just works" Also tidied up the way the different Makefiles build their include- directory flags
* | Merge pull request #507 from pfalcon/nlr-setjmpDamien George2014-04-17
|\ \ | | | | | | nlr: Add implementation using setjmp/longjmp.
| * | nlr: Add implementation using setjmp/longjmp.Paul Sokolovsky2014-04-17
| |/ | | | | | | | | Having an optimized asm implementation is good, but if we want portability, that's it.
* | Merge pull request #505 from lurch/patch-5Damien George2014-04-17
|\ \ | | | | | | Add 'test' target to unix/Makefile
| * | Updated the envvar used by ./run-testsAndrew Scheller2014-04-17
| | | | | | | | | As discussed in #504
| * | Add 'test' target to unix/MakefileAndrew Scheller2014-04-16
| |/ | | | | | | | | | | | | | | | | 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.
* | Merge pull request #504 from lurch/patch-4Damien George2014-04-17
|\ \ | | | | | | Allow the uPy used by run-tests to be overridden
| * | Changed the envvar name to MICROPY_MICROPYTHONAndrew Scheller2014-04-17
| | | | | | | | | As discussed in #504
| * | Stupid typoAndrew Scheller2014-04-16
| | |
| * | Allow the uPy used by run-tests to be overriddenAndrew Scheller2014-04-16
| | | | | | | | | | | | | | | 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)
* | | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-17
|\ \ \
| * | | modffi: Support float types.Paul Sokolovsky2014-04-17
| | | |
| * | | Merge pull request #501 from dhylands/fix-gen-failDamien George2014-04-17
| |\ \ \ | | | | | | | | | | Remove generated .h file if the generation process fails.
| | * | | Have make remove targets if a recipie fails.Dave Hylands2014-04-16
| | | | |
| * | | | Merge pull request #500 from dhylands/fix-sdcard-removedDamien George2014-04-17
| |\ \ \ \ | | | | | | | | | | | | Fix to allow usbd_msc_storage.c to compile when MICROPY_HW_HAS_SDCARD is...
| | * | | | Fix to allow usbd_msc_storage.c to compile when MICROPY_HW_HAS_SDCARD isn't ↵Dave Hylands2014-04-16
| | | |/ / | | |/| | | | | | | | | | | | defined.
* | | | | py: Add cmath module, for complex math. Disabled by default.Damien George2014-04-17
| | | | | | | | | | | | | | | | | | | | Not all functions implemented. Not enabled on pyboard.
* | | | | stmhal: Clean up fatality indications; remove long-obsolete malloc0.c.Damien George2014-04-17
| | | | |
* | | | | py: Enable builtin 'property' by default.Damien George2014-04-17
| | | | |
* | | | | py: Tidy up variables in VM, probably fixes subtle bugs.Damien George2014-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | py: Don't assert but go to unsupported_op in mp_binary_op for small int.Damien George2014-04-17
| | | | |
* | | | | tests: Split out those tests requiring float and import.Damien George2014-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | stmhal: Change VID to 0xf055=FOSS, and PID to a random number.Damien George2014-04-17
|/ / / / | | | | | | | | | | | | Needs a better solution.
* | | | tests: Remove print('flush') from 2 tests, since stmhal now works.Damien George2014-04-17
| | | | | | | | | | | | | | | | Fixing the USB problem on stmhal now gets these 2 tests working.
* | | | stmhal: Add more math functions.Damien George2014-04-17
| | | | | | | | | | | | | | | | Taken straight from musl and newlib. License seems compatible with MIT.
* | | | stmhal: Fix 64-byte USB packet bug properly.Damien George2014-04-17
| | | | | | | | | | | | | | | | | | | | A 64-byte packet is now followed by a 0-byte packet if there is nothing more to send. This flushes the USB endpoint.
* | | | stmhal: Replace magic number 3 with CDC_IN_EP define.Damien George2014-04-16
| | | |
* | | | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-16
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge pull request #503 from lurch/patch-1Paul Sokolovsky2014-04-16
| |\ \ \ | | |/ / | |/| | fix tests/bytecode/README to match contents of tests/bytecode/run-tests
| | * | fix README to match contents of run-testsAndrew Scheller2014-04-16
| |/ /
* / / stmhal: Improve flash storage cache management.Damien George2014-04-16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.Damien George2014-04-16
| |
* | stmhal: Fix USB CDC buffer overrun error.Damien George2014-04-16
| | | | | | | | | | | | 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.
* | Merge pull request #497 from lurch/build-32bitDamien George2014-04-16
|\ \ | | | | | | New config option MICROPY_FORCE_32BIT (defaulted to 0)
| * | New config option MICROPY_FORCE_32BIT (defaulted to 0)Andrew Scheller2014-04-16
| |/ | | | | | | | | Makes it easier for 64-bit unix hosts to build 32-bit unix binaries (for testing)
* | tools: Fix up pybcdc.inf generation: new lines and hex digits.Damien George2014-04-16
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #498 from lurch/create-headers-from-filesDamien George2014-04-16
|\ \ | | | | | | Auto-generate the stmhal/pybcdc_inf header file from static files