- 15 Dec, 2023 9 commits
-
-
Trent Piepho authored
In "cat" mode, output was written to a file named "out", then moved to the location of the real output file. There was no reason for this. While makeqstrdefs.py does make an effort to not update the timestamp on an existing output file that has not changed, the intermediate "out" file isn't part of the that process. Signed-off-by: Trent Piepho <tpiepho@gmail.com>
-
Elias Wimmer authored
When using long cables for sensors on onewire e.g. ds18b20, the current default timings are too optimistic, leading to bus failures and CRC errors. Stable results are achieved with the timings given by https://www.analog.com/en/technical-articles/1wire-communication-through-software.html
-
Patrick Van Oosterwijck authored
The timing of the onewire module was way too fast when reading. This commit adopts read timings as recommended in Maxim application note 126: 6 us (pulse) / 9 us (sample) / 55 us (bit slot). See also: https://www.analog.com/en/technical-articles/1wire-communication-through-software.htmlSigned-off-by: Damien George <damien@micropython.org>
-
dependabot[bot] authored
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
Trent Piepho authored
In "cat" mode a "$output_file.hash" file is checked to see if the hash of the new output is the same as the existing, and if so the output file isn't updated. However, it's possible that the output file has been deleted but the hash file has not. In this case the output file is not created. Change the logic so that a hash file is considered stale if there is no output file and still create the output. Signed-off-by: Trent Piepho <tpiepho@gmail.com>
-
Trent Piepho authored
These are produced by the "cat" command to makeqstrdefs.py, to allow it to not update unchanged files. cmake doesn't know about them and so they are not removed on a "clean". This triggered a bug in makeqstrdefs.py where it would not recreate a deleted output file (which is removed by clean) if a stale hash file with a valid hash still existed. Listing them as byproducts will cause them to be deleted on clean. Signed-off-by: Trent Piepho <tpiepho@gmail.com>
-
stijn authored
Signed-off-by: stijn <stijn@ignitron.net>
-
- 14 Dec, 2023 3 commits
-
-
Carlosgg authored
Add `load_cert_chain`, `load_verify_locations`, `get_ciphers` and `set_ciphers` SSLContext methods in ssl library, and update asyncio `open_connection` and `start_server` methods with ssl support. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
-
Carlosgg authored
This adds asyncio ssl support with SSLContext and the corresponding tests in `tests/net_inet` and `tests/multi_net`. Note that not doing the handshake on connect will delegate the handshake to the following `mbedtls_ssl_read/write` calls. However if the handshake fails when a client certificate is required and not presented by the peer, it needs to be notified of this handshake error (otherwise it will hang until timeout if any). Finally at MicroPython side raise the proper mbedtls error code and message. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
-
Damien George authored
Fixes two issues: - None should not be allowed in the list, otherwise the corresponding entry in ciphersuites[i] will have an undefined value. - The terminating 0 needs to be put in ciphersuites[len]. Signed-off-by: Damien George <damien@micropython.org>
-
- 12 Dec, 2023 5 commits
-
-
Damien George authored
Changes are: - use ssl.SSLContext.wrap_socket instead of ssl.wrap_socket - disable check_hostname and call load_default_certs() where appropriate, to get CPython to run the tests correctly - pass socket.AF_INET to getaddrinfo and socket.socket(), to force IPv4 - change tests to use github.com instead of google.com, because certificate validation was failing with google.com Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
And only enable this method when the relevant feature is available in mbedtls. Otherwise, if mbedtls doesn't support getting the peer certificate, this method always returns None and it's confusing why it does that. It's better to remove the method altogether, so the error trying to use it is more obvious. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
To match other ports that use mbedtls. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Running `./do-esp32.sh` now generates this esp32_mbedtls_errors.c file, with IDF v5.0.4. Signed-off-by: Damien George <damien@micropython.org>
-
Carlosgg authored
This commit adds: 1) Methods to SSLContext class that match CPython signature: - `SSLContext.load_cert_chain(certfile, keyfile)` - `SSLContext.load_verify_locations(cafile=, cadata=)` - `SSLContext.get_ciphers()` --> ["CIPHERSUITE"] - `SSLContext.set_ciphers(["CIPHERSUITE"])` 2) `sslsocket.cipher()` to get current ciphersuite and protocol version. 3) `ssl.MBEDTLS_VERSION` string constant. 4) Certificate verification errors info instead of `MBEDTLS_ERR_X509_CERT_VERIFY_FAILED`. 5) Tests in `net_inet` and `multi_net` to test these new methods. `SSLContext.load_cert_chain` method allows loading key and cert from disk passing a filepath in `certfile` or `keyfile` options. `SSLContext.load_verify_locations`'s `cafile` option enables the same functionality for ca files. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
-
- 11 Dec, 2023 10 commits
-
-
IhorNehrutsa authored
Also, IDF v5.1.2 is now supported, just not used by default. IDF v5.0.2 still builds but we cannot guarantee continued support for this version moving forward. Signed-off-by: IhorNehrutsa <IhorNehrutsa@gmail.com>
-
Damien George authored
To reduce firmware size, because IDF v5.0.4 has increased in size. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
To make sure the build fits. Signed-off-by: Damien George <damien@micropython.org>
-
Ihor Nehrutsa authored
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
-
Ihor Nehrutsa authored
Co-Authored-By: Trent Piepho <35062987+xyzzy42@users.noreply.github.com> Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
-
Ihor Nehrutsa authored
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
-
IhorNehrutsa authored
And simplify board configuration of DAC by using SOC_DAC_SUPPORTED. Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
-
IhorNehrutsa authored
Available in newer versions of the IDF. Signed-off-by: IhorNehrutsa <IhorNehrutsa@gmail.com>
-
IhorNehrutsa authored
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
-
Carlosgg authored
Disable unused EC curves and default certificate bundle which is not implemented in MicroPython. This reduces the firmware size significantly. This follows commit 68f166da. Signed-off-by: Carlos Gil Gonzalez <carlosgilglez@gmail.com>
-
- 08 Dec, 2023 9 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
So that ports don't need to specify each of these files, they can simply refer to the appropriate make/cmake variable. Signed-off-by: Damien George <damien@micropython.org>
-
Angus Gratton authored
Necessary to get coverage of the new event functions. Deletes the case that called usleep(delay) for mp_hal_delay_ms(), it seems like this wouldn't have ever happened anyhow (MICROPY_EVENT_POOL_HOOK is always defined for the unix port). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
This is necessary to avoid watchdog timeout in long i2c.scan(), as previously machine_i2c.c would call MICROPY_EVENT_POLL_HOOK if MICROPY_EVENT_POLL_HOOK_FAST was not available. Compared to previous implementation, this implementation removes the ets_event_poll() function and calls the SDK function ets_loop_iter() from MICROPY_INTERNAL_EVENT_HOOK instead. This allows using the port-agnostic functions in more places. There is a small behaviour change, which is that the event loop gets iterated in a few more places (i.e. anywhere that mp_event_handle_nowait() is called). However, this looks like maybe only modselect.c - and is probably good to process Wi-Fi events in that polling loop. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
This should be the equivalent of the previous event poll hook macro. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
Previously this was not set, so potential for race conditions in interrupt handlers this didn't issue SEV. (Which is currently all of them, as far as I can see.) Eventually we might be able to augment the interrupt handlers that wake the main thread to call SEV, and leave the others as-is to suspend the CPU slightly faster, but this will solve the issue for now. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
This commit changes all uses in the rp2 port, and drivers that are optionally supported by that port. The old MICROPY_EVENT_POLL_HOOK and MICROPY_EVENT_POLL_HOOK_FAST macros are no longer used for rp2 builds and are removed (C user code will need to be changed to suit). Also take the opportunity to change some timeouts that used 64-bit arithmetic to 32-bit, to hopefully claw back a little code size. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
See previous commit for details of these functions. As of this commit, these still call the old hook macros on all ports. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
These are intended to replace MICROPY_EVENT_POLL_HOOK and MICROPY_EVENT_POLL_HOOK_FAST, which are insufficient for tickless ports. This implementation is along the lines suggested here: https://github.com/micropython/micropython/issues/12925#issuecomment-1803038430 Currently any usage of these functions expands to use the existing hook macros, but this can be switched over port by port. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
- 07 Dec, 2023 1 commit
-
-
Angus Gratton authored
This header has no include guards and is apparently only supposed to be included from py/mphal.h. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
- 06 Dec, 2023 3 commits
-
-
iabdalkader authored
This patch simplifies the connection and sockets polling code, by switching to a soft-timer to schedule polling code, and by using one node for scheduling. This also fixes any issues that could result from using a heap allocated machine_timer, and includes better handling of the sockets poll list. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
-
iabdalkader authored
This is usually called on soft-reboot, a NIC can implement this to do any necessary cleaning up (such as invalidating root pointers). Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-