aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-27lib/mynewt-nimble: Update submodule to NimBLE release 1.3.0.Jim Mussared
2020-04-23README: Fix small typo, dfeault -> default.Krsna Mahapatra
2020-04-23all: Format code to add space after C++-style comment start.stijn
Note: the uncrustify configuration is explicitly set to 'add' instead of 'force' in order not to alter the comments which use extra spaces after // as a means of indenting text for clarity.
2020-04-23all: Remove commented-out include statements.stijn
2020-04-23esp32: Consolidate check_esp_err functions and add IDF error string.Thorsten von Eicken
This commit consolidates a number of check_esp_err functions that check whether an ESP-IDF return code is OK and raises an exception if not. The exception raised is an OSError with the error code as the first argument (negative if it's ESP-IDF specific) and the ESP-IDF error string as the second argument. This commit also fixes esp32.Partition.set_boot to use check_esp_err, and uses that function for a unit test.
2020-04-23esp32/modesp32: Add idf_heap_info(capabilities) to esp32 module.Thorsten von Eicken
This commit adds an idf_heap_info(capabilities) method to the esp32 module which returns info about the ESP-IDF heaps. It's useful to get a bit of a picture of what's going on when code fails because ESP-IDF can't allocate memory anymore. Includes documentation and a test.
2020-04-22README: Update Travis CI links to point to travis-ci.com.Damien George
MicroPython now build at the .com rather than the .org.
2020-04-22tools/check_code_size.sh: Remove unused script.Damien George
It's now replaced by tools/metrics.py.
2020-04-22travis: Use tools/metrics.py to compute size diff of minimal ports.Damien George
This is to make the Travis CI size check more robust, by not relying on the saved firmware from a previous build (which may use a different compiler, environment, etc) but rather compile both master and the PR and diff them. This size check now checks both bare-arm and minimal x86-32 builds (before it just checked minimal Cortex-M build).
2020-04-22tools/metrics.py: Use OrderedDict when reading build log.Damien George
So that the output (eg of the diff command) always has the lines in the same order.
2020-04-22tools/metrics.py: Don't build mpy-cross if not needed by any ports.Damien George
To save build time.
2020-04-22tools/metrics.py: Add option to diff to error if delta above threshold.Damien George
Useful for things like CI where the size check is automated.
2020-04-20py/makecompresseddata.py: Make compression deterministic.Damien George
Error string compression is not deterministic in certain cases: it depends on the Python version (whether dicts are ordered by default or not) and probably also the order files are passed to this script, leading to a difference in which words are included in the top 128 most common. The changes in this commit use OrderedDict to keep parsed lines in a known order, and, when computing how many bytes are saved by a given word, it uses the word itself to break ties (which would otherwise be "random").
2020-04-19docs/library: Document that char_data/notify_data are also references.Thomas Friebel
2020-04-18stm32/mboot: Expose custom DFU USB VID/PID values at makefile level.Andrew Leech
In mboot, the ability to override the USB vendor/product id's was added back in 5688c9ba09ea8f9ffeeb25bd577a08b57828ffa7. However, when the main firmware is turned into a DFU file the default VID/PID are used there. pydfu.py doesn't care about this but dfu-util does and prevents its use when the VID/PID don't match. This commit exposes BOOTLOADER_DFU_USB_VID/PID as make variables, for use on either command line or mpconfigboard.mk, to set VID/PID in both mboot and DFU files.
2020-04-18all: Enable extra conversion warnings where applicable.stijn
Add -Wdouble-promotion and -Wfloat-conversion for most ports to ban out implicit floating point conversions, and add extra Travis builds using MICROPY_FLOAT_IMPL_FLOAT to uncover warnings which weren't found previously. For the unix port -Wsign-comparison is added as well but only there since only clang supports this but gcc doesn't.
2020-04-18py/objint: Do not use fpclassify.stijn
For combinations of certain versions of glibc and gcc the definition of fpclassify always takes float as argument instead of adapting itself to float/double/long double as required by the C99 standard. At the time of writing this happens for instance for glibc 2.27 with gcc 7.5.0 when compiled with -Os and glibc 3.0.7 with gcc 9.3.0. When calling fpclassify with double as argument, as in objint.c, this results in an implicit narrowing conversion which is not really correct plus results in a warning when compiled with -Wfloat-conversion. So fix this by spelling out the logic manually.
2020-04-18all: Fix implicit floating point to integer conversions.stijn
These are found when building with -Wfloat-conversion.
2020-04-18all: Fix implicit conversion from double to float.stijn
These are found when building with -Wfloat-conversion.
2020-04-18py/objarray: Fix sign mismatch in comparison.stijn
Found when compiling with clang and -Wsign-compare.
2020-04-18tests/float: Fix cmath_fun_special for MICROPY_FLOAT_IMPL_FLOAT.stijn
When the unix and windows ports use MICROPY_FLOAT_IMPL_FLOAT instead of MICROPY_FLOAT_IMPL_DOUBLE, the test output has for example complex(-0.15052, 0.34109) instead of the expected complex(-0.15051, 0.34109). Use one decimal place less for the output printing to fix this.
2020-04-18all: Fix implicit floating point promotion.stijn
Initially some of these were found building the unix coverage variant on MacOS because that build uses clang and has -Wdouble-promotion enabled, and clang performs more vigorous promotion checks than gcc. Additionally the codebase has been compiled with clang and msvc (the latter with warning level 3), and with MICROPY_FLOAT_IMPL_FLOAT to find the rest of the conversions. Fixes are implemented either as explicit casts, or by using the correct type, or by using one of the utility functions to handle floating point casting; these have been moved from nativeglue.c to the public API.
2020-04-18Revert "all: Fix implicit casts of float/double, and signed comparison."stijn
This reverts commit a2110bd3fca59df8b16a2b5fe4645a4af30b06ed. There's nothing inherently wrong with it, but upcoming commits will apply similar fixes in a slightly different way.
2020-04-18travis: Finish jobs early after test failure.stijn
For jobs which run tests multiple times terminate after the first run fails otherwise the next test run overwrites the previous results, making --print-failures useless.
2020-04-18travis: Decrease build duration by starting OSX build early.stijn
Looking at the recent build history the time it takes just to complete the OSX build is already 12 minutes so make it start early, which brings down the total build time from about 20 minutes to 14 minutes.
2020-04-16stm32/mboot/README: Clarify that mboot can access FAT formatted FS only.Martin Fischer
2020-04-16stm32/storage: Fix start address of second, internal block device.Martin Fischer
2020-04-16mpy-cross/main: Print uncaught nlr jump to stderr.David Lechner
This is to be consistent with the same change in the unix port, 4ab8bee82f7d095c10c624de93da12a7aa1af8fd.
2020-04-16mpy-cross/main: Fix stderr_print_strn parameter type.David Lechner
Change mp_uint_t to size_t to match the mp_print_strn_t function prototype. This fixes a compiler warning when mp_uint_t and size_t are not the same size.
2020-04-14esp32: Update to ESP IDF v3.3.2.Damien George
2020-04-14py: Always give noop defines when MICROPY_ROM_TEXT_COMPRESSION disabled.Damien George
This commit provides a typedef for mp_rom_error_text_t, and a macro define for MP_COMPRESSED_ROM_TEXT, when MICROPY_ROM_TEXT_COMPRESSION is disabled. This simplifies the configuration (it no longer has a special case for MICROPY_ENABLE_DYNRUNTIME) and makes it work for other cases that don't use compression (eg examples/embedding). This commit also ensures MICROPY_ROM_TEXT_COMPRESSION is defined during qstr processing.
2020-04-14extmod/uasyncio: Change cannot to can't in error message, and test exp.Damien George
Follow up to 8e048d2548867aac743866ca5a4c244b7b5aac09 which missed these.
2020-04-13py/scope: Add assert to check that low numbered qstrs do fit in uint8_t.Romain Goyet
2020-04-13py/makecompresseddata.py: Don't prefix str with mark if not compressed.Damien George
2020-04-13all: Clean up error strings to use lowercase and change cannot to can't.Damien George
Now that error string compression is supported it's more important to have consistent error string formatting (eg all lowercase English words, consistent contractions). This commit cleans up some of the strings to make them more consistent.
2020-04-13extmod/uasyncio: Add Loop.new_event_loop method.Damien George
This commit adds Loop.new_event_loop() which is used to reset the singleton event loop. This functionality is put here instead of in Loop.close() to make it possible to write code that is compatible with CPython.
2020-04-13unix/Makefile: Fix regression using install on non-GNU systems.David Lechner
This was fixed previously in 31fc81d3b8bb227109777eed02d0021e564fb523 but regressed in 4af79e76943312bf71be395a71fa80ab39e7c2c2. Fixes #5885.
2020-04-13py/scheduler: Add assert that scheduler is locked when unlocking.Jim Mussared
And add a test that shows how this can happen when multiple threads are accessing the scheduler, which fails if atomic sections are not used.
2020-04-13py/scheduler: Fix race in checking scheduler pending state.Jim Mussared
Because the atomic section starts after checking whether the scheduler state is pending, it's possible it can become a different state by the time the atomic section starts. This is especially likely on ports where MICROPY_BEGIN_ATOMIC_SECTION is implemented with a mutex (i.e. it might block), but the race exists regardless, i.e. if a context switch occurs between those two lines.
2020-04-13unix: Implement MICROPY_BEGIN/END_ATOMIC_SECTION protection macros.Jim Mussared
This macro is used to implement global serialisation, typically by disabling IRQs. On the unix port, if threading is enabled, use the existing thread mutex (that protects the thread list structure) for this purpose. Other places in the code (eg the scheduler) assume this macro will provide serialisation.
2020-04-13unix: Fix behaviour of COPT/NDEBUG for unix variants.Jim Mussared
Based on eg 1e6fd9f2b4072873f5d6846b19b2ef0ccc5e4e52, it's understood that the intention for unix builds is that regular builds disable assert, but the coverage build should set -O0 and enable asserts. It looks like this didn't work (even before variants were introduced, eg at v1.11) -- coverage always built with -Os and -DNDEBUG. This commit makes it possible for variants to have finer-grained control over COPT flags, and enables assert() and -O0 on coverage builds. Other variants already match the defaults so they have been updated.
2020-04-13tests/run-tests: Make diff tool user configurable.stijn
2020-04-13travis: Split esp32 ESP-IDF v3 and v4 builds to separate jobs.Thorsten von Eicken
To make it easier to see what is happening when there is a failure. This commit also fixes the ESP-IDF v4 build to use the correct GCC 8.2.0.
2020-04-09docs/library: Note that uasyncio.wait_for() can raise exception.Peter Hinch
2020-04-09esp32/espneopixel: Use integer arithmetic to compute timing values.Damien George
2020-04-09py/objexcept: Remove optional TimeoutError exception.Damien George
TimeoutError was added back in 077812b2abe3f5e5325194f9694dad7eb38186dd for the cc3200 port. In f522849a4d5a978ac3d322d71a755f75d07e8ce6 the cc3200 port enabled use of it in the socket module aliased to socket.timeout. So it was never added to the builtins. Then it was replaced by OSError(ETIMEDOUT) in 047af9b10bfc6b0ec412f8450c6bec10ab95254b. The esp32 port enables this exception, since the very beginning of that port, but it could never be accessed because it's not in builtins. It's being removed: 1) to not encourage its use; 2) because there are a lot of other OSError subclasses which are not defined at all, and having TimeoutError is a bit inconsistent. Note that ports can add anything to the builtins via MICROPY_PORT_BUILTINS. And they can also define their own exceptions using the MP_DEFINE_EXCEPTION() macro.
2020-04-09py/parse: Remove unnecessary check in const folding for ** operator.Damien George
In this part of the code there is no way to get the ** operator, so no need to check for it. This commit also adds tests for this, and other related, invalid const operations.
2020-04-09tests/extmod: Update littlefs test output to match new library version.Damien George
The amount of free space on the VfsLfs2 filesystem after creating a large file is reduced by 2 blocks in this test.
2020-04-09lib/littlefs: Update littlefs2 to v2.2.0.Damien George
At commit a049f1318eecbe502549f9d74a41951985fb956f
2020-04-07travis: Make OSX build work again by not installing pkgconfig.stijn
Recent builds are failing with the following error: Error: pkg-config 0.29.2 is already installed Assuming this will be the case form now on, we don't have to install pkgconfig anymore.