1. 04 Sep, 2024 1 commit
  2. 03 Sep, 2024 2 commits
    • Angus Gratton's avatar
      esp32: Add MICROPY_HW_USB_CDC macro for native USB-CDC serial. · 5e692d04
      Angus Gratton authored
      This fixes issue of ESP32-S3 switching its config over to USB serial/JTAG
      instead of native USB.
      
      The the existing logic was hard to follow, adding this config macro makes
      it easier to see which USB is in use and to have board definitions that
      enable/disable different USB levels.
      
      This commit also drops (nominal) support for manually setting
      CONFIG_ESP_CONSOLE_USB_CDC in sdkconfig. No included board configs use this
      and it didn't seem to work (if secondary console was set to the default USB
      Serial/JTAG then there is no serial output on any port, and if secondary
      console was set to None then linking fails.) Can be re-added if there's a
      use case for it.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      5e692d04
    • Angus Gratton's avatar
      esp32: Fix ESP32-C3 USB serial/jtag peripheral pre-IDF 5.1. · 6ad6297e
      Angus Gratton authored
      Regression in 0a11832c in IDF 5.0.x where macro
      CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED is not defined.
      
      With this patch, ESP32-S3 still USB Serial/JTAG incorrectly (now on all
      ESP-IDF versions).
      
      Closes #15701
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      6ad6297e
  3. 02 Sep, 2024 6 commits
  4. 29 Aug, 2024 26 commits
  5. 28 Aug, 2024 5 commits
    • Damien George's avatar
      examples/network: Support full URLs in HTTP(S) client examples. · fd03a058
      Damien George authored
      Not just the domain name.  This gives better HTTP 1.0 examples if someone
      wants to copy them.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      fd03a058
    • Damien George's avatar
      examples/network: Use SSLContext instead of old ssl.wrap_socket. · d7570531
      Damien George authored
      `ssl.wrap_socket()` is deprecated in CPython, so use `SSLContext` instead,
      so the example is a good example to copy.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      d7570531
    • Damien George's avatar
      examples/network: Support IPv4 and IPv6 in HTTP client examples. · c8385ef7
      Damien George authored
      The main changes here are to pass the address family and socket type to
      `getaddrinfo()`, and then use the result of the address lookup when
      creating the socket, so it has the correct address family.
      
      This allows both IPv4 and IPv6 to work, because the socket is created with
      the correct AF_INETx type for the address.
      
      Also add some more comments to the examples to explain what's going on.
      
      Fixes issue #15580.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      c8385ef7
    • Damien George's avatar
      qemu-arm: Rework to provide a REPL and run tests via a pty serial port. · d9a0fdda
      Damien George authored
      Currently, the qemu-arm (and qemu-riscv) port has two build modes:
      - a simple test that executes a Python string; and
      - a full test that uses tinytest to embed all tests within the firmware,
        then executes that and captures the output.
      
      This is very different to all the other ports.  A difficulty with using
      tinytest is that with the large number of tests the firmware overflows its
      virtual flash size.  It's also hard to run tests via .mpy files and with
      the native emitter.  Being different to the other ports also means an extra
      burden on maintenance.
      
      This commit reworks the qemu-arm port so that it has a single build target
      that creates a standard firmware which has a REPL.  When run under
      qemu-system-arm, the REPL acts like any other bare-metal port, complete
      with soft reset (use machine.reset() to turn it off and exit
      qemu-system-arm).
      
      This approach gives many benefits:
      - allows playing with a REPL without hardware;
      - allows running the test suite as it would on a bare-metal board, by
        making qemu-system-arm redirect the UART serial of the virtual device to
        a /dev/pts/xx file, and then running run-tests.py against that serial
        device;
      - skipping tests is now done via the logic in `run-tests.py` and no longer
        needs multiple places to define which tests to skip
        (`tools/tinytest-codegen.py`, `ports/qemu-arm/tests_profile.txt` and also
        `tests/run-tests.py`);
      - allows testing/using mpremote with the qemu-arm port.
      
      Eventually the qemu-riscv port would have a similar change.
      
      Prior to this commit the test results were:
      
          743 tests ok.  (121 skipped)
      
      With this commit the test results are:
      
          753 tests performed (22673 individual testcases)
          753 tests passed
          138 tests skipped
      
      More tests are skipped because more are included in the run. But overall
      more tests pass.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      d9a0fdda
    • Damien George's avatar
      8a3842eb