1. 15 Jul, 2022 2 commits
    • Earle F. Philhower, III's avatar
      Update version · 988940b2
      Earle F. Philhower, III authored
      988940b2
    • Earle F. Philhower, III's avatar
      Add Pico W WiFi support (#670) · abf2c586
      Earle F. Philhower, III authored
      * Add support for the WiFi chip on the Pico W board.
      * USB interrupt now no longer hard coded (conflicted with the WiFi IRQ).
      * Add in Pico W board to makeboards.py
      * Add in GPIO and variant support
      * Initialize WiFi in the Variant
      * Use manual LWIP, fix size accounting
      * Remove the SDK WiFi overrides
      * Pulling in work done in the ESP8266 core.
      * Make IPAddress support IPv6
      * Build LWIP with IPv4 and IPv6 support
      * Use proper MAC
      * Avoid cyw_warn crash.  Make macro to a comment while building
      * Add WiFiServer
      * Add WiFiUdp
      * Move LWIP-specific support files to LWIP_Ethernet
      * Add WiFi::ping (ICMP ping)
      * Move ICMP echo (ping) to LWIPIntfDev
      * Move hostByName to LwipIntfDev
      * Add AP mode with simple DHCP server
      * Add some examples and basic ESP8266 compat hacks
      * Update Adafruit TinyUSB to fix crash
      * Set DHCP hostname
      * Make Wifi.begin() return CONNECTED with link + IP
      * Return connected() on WiFi::begin
      * Fix spurious TCP retransmission
      * Protect LWIP from reentrancy
      
      The Pico SDK calls "sys_check_timeouts() from inside a periodic interrupt.
      This appears unsafe, as the interrupt could happen while already in the
      (non-reentrant) LWIP code.
      
      Block the interrupt from calling sys_check_timeouts by using a global flag
      manually set via an RAII recursive lock.
      
      Add interrupt protection macros around critical sections inside LWIP via
      the standard defines.
      
      These two changes should make LWIP significantly more stable and long
      running.
      
      * Support disconnecting and reconnecting WiFi
      * Add WiFiServer simple example
      * Update documentation
      
      Fixes #666
      Fixed #665
      abf2c586
  2. 14 Jul, 2022 2 commits
    • Earle F. Philhower, III's avatar
      Fix ::printf/etc. due to mutex size conflict (#677) · c025c4a1
      Earle F. Philhower, III authored
      When real multicore/lockign support was added to newlib, there was an opaque
      field in FILE that was used as a mutex, but was only 4 bytes in size.  The
      recursive mutexes on the RP2040 are 8 bytes.  This mismatch caused corruption
      of the FILE structure and crashes of the system when ::printf/::puts/etc. were
      run.
      
      Adjust the lock field size in FILE to 8 bytes and rebuild the toolchain to
      fix.
      c025c4a1
    • Earle F. Philhower, III's avatar
      Add delay to 2nd core start for Picoprobe (#676) · fb05d969
      Earle F. Philhower, III authored
      No idea why, but when a Picoprobe upload and reset is used, the 2nd core
      does not start w/o a __wfe() call on the first one before launch.
      
      Fixes #674
      Fixes #402
      fb05d969
  3. 08 Jul, 2022 1 commit
  4. 30 Jun, 2022 1 commit
  5. 29 Jun, 2022 1 commit
  6. 28 Jun, 2022 2 commits
  7. 26 Jun, 2022 2 commits
  8. 25 Jun, 2022 1 commit
  9. 24 Jun, 2022 4 commits
  10. 23 Jun, 2022 1 commit
  11. 21 Jun, 2022 1 commit
  12. 20 Jun, 2022 5 commits
    • Earle F. Philhower, III's avatar
      Update to latest pico-sdk, allow lock.c->lock.cpp (#646) · 7233c391
      Earle F. Philhower, III authored
      Minor change to keep the core all CPP.  Patch just made it into pico-sdk
      develop branch allowing recursive mutexes to be auto_init in C++.
      Update and rebuild libpico.a.
      7233c391
    • Earle F. Philhower, III's avatar
      Update version · 0ee07267
      Earle F. Philhower, III authored
      0ee07267
    • Earle F. Philhower, III's avatar
      Make mutexes init in DATA, not ((counstructor)) (#645) · 11300077
      Earle F. Philhower, III authored
      There was a race condition in making mutexes that were only init in
      an __attribute((constructor)) code block.  For example, a global
      object might do a `malloc` in its constructor which would depend on
      the malloc mutex...which may not yet have been initted.
      
      Make them initted in the .data section, instead, which is guaranteed
      good before any global constructors are called.
      11300077
    • Earle F. Philhower, III's avatar
      Add dependency file generation to build (#644) · a0060d9c
      Earle F. Philhower, III authored
      Fixes #643
      a0060d9c
    • Earle F. Philhower, III's avatar
      Major multicore fixes Newlib and FreeRTOS (#640) · 66eb0613
      Earle F. Philhower, III authored
      Instead of wrapping the memory functions in the link stage, rebuild
      Newlib and enable retargetable locks.  Override the weak definitions
      in the libc.a with our own, SDK based ones.
      
      The wrapping utilized before catches app-level memory allocations
      but misses allocations inside Newlib libc (like printf/etc.).
      
      Each core needs its own _impure_ptr or else crashes like the one seen
      in parallel printf_floats can happen.  Enable it in the toolchain
      build and implement a simple swapper here.
      
      FreeRTOS SMP doesn't support Newlib's dynamic reent which is needed
      to allow save MT support.  Minor patch to FreeRTOS and update the
      FreeRTOS variant.cpp and setup to support it.
      66eb0613
  13. 19 Jun, 2022 2 commits
  14. 17 Jun, 2022 4 commits
    • Earle F. Philhower, III's avatar
      Update to develop branch of pico-sdk (#636) · 857f9177
      Earle F. Philhower, III authored
      The realloc() wrapper was included in the develop branch of pico-sdk, so
      use it instead of a local, unreproducible version of the SDK.
      
      Should have no effect on code.
      857f9177
    • Maximilian Gerhardt's avatar
      Minor PIO Docs Fixup (#635) · 592418d9
      Maximilian Gerhardt authored
      * Fix link display in PlatformIO Docs, Remove JLink warning
      
      * Remove unfinished sentence
      592418d9
    • Maximilian Gerhardt's avatar
      Update PlatformIO board files, add PIO CI (#634) · 0a23dfeb
      Maximilian Gerhardt authored
      * Shift arduino attribute higher in JSON file
      
      * Try out PlatformIO CI
      
      * Trigger CI
      
      * Clone recursively, actually use own repo
      
      * Fix YAML
      
      * Build Verbose
      
      * Revert to checkout@v2 version, add TinyUSB to examples
      
      * Try fix TInyUSB example
      
      * Pull repo recursively
      
      * Use v3 after all, correct path to example
      
      * Only do CI on PR
      0a23dfeb
    • Maximilian Gerhardt's avatar
      Update PlatformIO builder script and docs (#633) · 4a94677e
      Maximilian Gerhardt authored
      * Update board generation, use renamed function
      
      * Update documentation with new platform integration state
      
      * Remove accidentally pushed file
      
      * Use correct update command
      
      * Use correct highlighting
      
      * Use correct language
      
      * Add section on debugging
      
      * Add docs on filesystem, minor corrections
      
      * Use -iprefix in compilation, but still expose all include paths to IDE
      
      * Add exception and RTTI support, document them
      
      * Fix typo
      4a94677e
  15. 16 Jun, 2022 1 commit
  16. 15 Jun, 2022 2 commits
  17. 14 Jun, 2022 4 commits
  18. 13 Jun, 2022 1 commit
    • Earle F. Philhower, III's avatar
      Shrink flash and RAM usage even more (#627) · 1d6f66f8
      Earle F. Philhower, III authored
      Remove MIDI support from the core's main TinyUSB.  MIDI is still supported
      using the Adafruit TinyUSB library, just like before (the core never
      did use it).
      
      Compile the Pico-SDK using `-Os`
      
      Remove unneeded warning in UF2 upload
      
      Blink.ino shows a savings of 3.5KB flash and 400 bytes of RAM.
      
      For comparison, with this PR blink.ino reports:
      ````
      Sketch uses 49908 bytes (3%) of program storage space. Maximum is 1568768 bytes.
      Global variables use 7024 bytes (2%) of dynamic memory, leaving 255120 bytes for local variables. Maximum is 262144 bytes.
      ````
      
      As comparison, using the MBED core blink.ino reports:
      ````
      Sketch uses 78882 bytes (0%) of program storage space. Maximum is 16777216 bytes.
      Global variables use 42780 bytes (15%) of dynamic memory, leaving 227556 bytes for local variables. Maximum is 270336 bytes.
      ````
      
      So, with this PR we use **37% less flash** and and **87% less RAM**
      for simple sketches.
      1d6f66f8
  19. 12 Jun, 2022 1 commit
  20. 11 Jun, 2022 1 commit
    • Earle F. Philhower, III's avatar
      Remove IRQ-level malloc from USB setup · c3521051
      Earle F. Philhower, III authored
      Fixes a hang found while debugging #614.  Do all memory allocations and
      USB descriptor setup in main code prior to `tusb_init()`.  Avoids potential
      deadlock in cases where the app is allocating while the USB port is being
      set up.
      c3521051
  21. 10 Jun, 2022 1 commit