Commit graph

300 commits

Author SHA1 Message Date
Earle F. Philhower, III
ebbedb3e26
Add Olimex RP2040-Pico30 (#2112)
Same pinout as the plain Pico, just different flash and # of GPIOs

Fixes #2054
2024-04-19 11:49:01 -07:00
Earle F. Philhower, III
72148ffefc
Add Sparkfun RP2040 MicroMod (#2111)
Fix #2094
2024-04-19 11:08:08 -07:00
Ha Thach
f737be3320
Add native text to TinyUSB Host menu option (#2098) 2024-04-15 09:19:37 -07:00
Jean-Luc Béchennec
c62215663f
Add 128MHz frequency (#2069) 2024-03-22 08:22:22 -07:00
Earle F. Philhower, III
a41618fa87
Make Python3 re.split() use a r-string (#1985)
Fixes #1983
2024-02-06 09:49:45 -08:00
Earle F. Philhower, III
1bf41bcc60
Add native Apple ARM silicon support (#1959)
* Add native Apple ARM silicon M1/M2/M3 support

* Identify Mac ARM in download get.py script

Thanks to the ESP32 `get.py` sources!

* Rebuild M1 w/o using strip
2024-01-30 15:06:52 -08:00
Earle F. Philhower, III
a99a572bda
Add TZ.h database, borrowed from ESP8266 core (#1947) 2024-01-20 15:57:15 -08:00
Pontus Oldberg
916c31d934
Adds iLabs RP2040 Connectivity (LTE/WIFI/BLE) board. (#1936) 2024-01-12 07:32:27 -08:00
Arnoz
403c147fa3
Adding Dude's Cab board (#1933)
Adding Dude's Cab board (rp2040 based board for virtual pinball use)
2024-01-10 14:02:07 -08:00
noqman
915e093564
Change Maker UNO RP2040 to Maker Uno RP2040 and board name in README.md (#1924) 2024-01-05 07:12:24 -08:00
Joseph Duchesne
15eb459df9
Add variants_dir support to pio build, allowing local variants in project repos (#1911) 2023-12-26 09:59:45 -08:00
Ha Thach
3160fde679
Support native USB as host (#1910)
* add a new usbstack menu to use native usb as host

* update tinyusb library to 2.3.0

* skip Host native example in ci
2023-12-25 11:36:07 -08:00
Earle F. Philhower, III
2bf249ffe1
Avoid freezeing the core from LWIP under FreeRTOS (#1884)
Avoid issues with interrupts and priority inversions and other deadlocks
and use a SW based random generator for LWIP when under FreeRTOS.

This means removing any overrides for sleep_until and the two
get_rand_xx calls from the SDK, making things much saner.

Related to #1883, #1872, and other random FreeRTOS lockups.
2023-12-06 09:41:14 -08:00
noqman
cebdb6c917
Add new board variant: Cytron Maker UNO RP2040 (#1838) 2023-11-24 07:13:37 -08:00
Abdullah "Hayri" Kırmızıyüz
a475c444c5
Added Degz Suibo RP2040 board (#1828) 2023-11-20 09:20:36 -08:00
Andriy Golovnya
3ce902183e
Added RP2040-Eins board (#1804)
* Aggregated several earlier patches in one to add RP2040-Eins board into the project.
- Moved RP2040-ProMini in alphabetical order position.
- Added board description files for RP2040-Eins.
- Added board header file for RP2040-Eins.
- Adjusted unused pins order of RP2040-ProMini to be the same as in RP2040-Eins.
- Added RP2040-Eins to README.md.
- Renamed board files to use underscores to better fit the existing file naming style.

* Updated README.md
2023-11-05 15:32:08 +00:00
James Sleeman
c34e602937
Handled already mounted disk. (#1797) 2023-11-05 10:36:56 +00:00
Nico Maas
28e25293a9
Add RAKwireless RAK11300 (#1802) 2023-11-05 10:26:19 +00:00
Andrew DeLisa
5bea328967
Add Sea-Picro board (#1784)
* add sea-picro board

* add configurable board URL to makeboards.py

* update board URL for sea picro

* update note about QT port

* update pin mappings

* fix board vendor/name
2023-10-28 14:29:34 +02:00
Earle F. Philhower, III
10ddaee94d
Add debugging for Bluetooth (#1767)
BTStack requires a special logger registration to enable debugging.  Add
support through the IDE menus.
2023-10-12 08:21:44 -07:00
Earle F. Philhower, III
3950b94474
Avoid spurious GCC 7.x warning in platform.io builds (#1709) 2023-09-13 13:28:54 -07:00
Earle F. Philhower, III
2bd64b566c
GDB/Binutils release-gdb-13.2, GCC still 12.3 (#1706)
Fix #1681 due to breakage of GDB 12.3 in Platform.IO
Remove new Binutils linker warning
2023-09-13 13:09:37 -07:00
Earle F. Philhower, III
0b56452c35
Rebuild libpico/libbearssl using GCC 12.3 (#1686) 2023-09-01 08:17:31 -07:00
Andriy Golovnya
2b640669a7
Added RP2040-ProMini board to the project. (#1674) 2023-08-27 11:53:19 -07:00
Earle F. Philhower, III
9d0f0a8d7a
Add missing Tiny2040 JSON (#1675) 2023-08-27 10:03:12 -07:00
Earle F. Philhower, III
21d2fb4afa
Add Pimoroni Tiny2040 (#1672)
Fixes #1604.  Supports 2MB and 8MB revs
2023-08-25 10:39:56 -07:00
Earle F. Philhower, III
ade74986ee
GCC 12.3, GDB 12, OpenOCD 0.12, Picotool 1.1.2 (#1670)
Major toolchain update including:
* GCC 12.3
* GDB 12
* OpenOCD 0.12
* Picotool 1.1.2

* Fix MDNS infinite recursion

* Remove legacy Picoprobe

Fixes #1313
Fixes #1650
2023-08-25 09:56:52 -07:00
Kattni
678cd2c4b9
Add Adafruit Metro RP2040 (#1630) 2023-08-04 15:49:05 -07:00
Patrick Van Oosterwijck
70af32eead
Add new board Silicognition RP2040-Shim (#1623)
Board documentation can be found here:
https://silicognition.com/Products/rp2040-shim/

Signed-off-by: Patrick Van Oosterwijck <patrick@silicognition.com>
2023-08-02 16:48:55 -07:00
Maximilian Gerhardt
3cc5ac14ff
Fix PlatformIO intellisense (#1616)
The `_idedata` has been changed to `__idedata` in newer PlatformIO core versions per 158aabbdf2. This change has broken the logic to expand out the `-iprefix PATH @INCLUDEFILE` argument into its individual include paths, causing Intellisense breakages on some VSCode systems and other IDEs that didn't handle these arguments correctly or in which the path was corrupted.
2023-07-29 13:48:29 -07:00
Pontus Oldberg
ead0728a57
Adds new Challenger WiFi6/BLE5 board to the mix. (#1595) 2023-07-14 08:58:06 -07:00
Max
3778fbb833
Add ArtronShop RP2 Nano board (#1567) 2023-06-28 09:16:05 -07:00
Ha Thach
4b6f3d05e1
BREAKING: Change default debug_script to cmsis-dap (#1565)
The PicoProbe firmware has only supported  CMSIS-DAP for some time, make it the default debugging option to work around IDE 2.0 issues.
2023-06-27 09:31:58 -07:00
Tristan Rowley
91e69e2a1a
Add Pimoroni Plasma RP2040 support (#1556) 2023-06-22 12:58:57 -07:00
Maximilian Gerhardt
e95248a787
Support and Document pico-debug in PlatformIO (#1427) 2023-05-05 07:32:41 -07:00
Paint Your Dragon
2c0ce6f416
Add Feathers: CAN and Prop-Maker (#1421) 2023-05-02 15:41:05 -07:00
Maximilian Gerhardt
a916695155
Add PICO_FLASH_SIZE_BYTES to PIO (#1416) 2023-05-01 11:48:28 -07:00
Earle F. Philhower, III
611547ee97
Add PICO_FLASH_SIZE_BYTES define (#1414)
Matches the flash size defined in the menus.

Fixes #1399
2023-05-01 11:02:01 -07:00
Maximilian Gerhardt
437d03583a
Sync macros used in PlatformIO and platform.txt (#1386) 2023-04-21 09:57:50 -07:00
Wvirgil123
0322a6871c
Add board Seeed Indicator RP2040 (#1375) 2023-04-21 09:48:38 -07:00
Maximilian Gerhardt
4f643d27d9
Enable BlackMagicProbe for PlatformIO (#1378) 2023-04-15 12:35:45 -07:00
Pontus Oldberg
5bf570c27d
Add support for Challenger UWB board, fix some defines (#1351) 2023-04-03 08:58:26 -07:00
Paint Your Dragon
f8ba72aa15
Add Feather ThinkINK and USB Host (#1334) 2023-03-29 11:18:45 -07:00
Paint Your Dragon
371b2c87b1
Add Feather RP2040 RFM, fix pins in SCORPIO, DVI board defs (#1333) 2023-03-28 12:58:49 -07:00
Earle F. Philhower, III
ebe5bfbc07
Increase UDP PCBs to avoid DNS OOM error (#1304)
Fixes #1285 (or at least works well enough for now)
2023-03-14 07:28:24 -07:00
Earle F. Philhower, III
084d5b0b87
Add 4 and 8 MB VCC_GND boards via Flash Size menu (#1297)
Thanks to @e-tinkers for the initial PR!
2023-03-11 09:52:33 -08:00
nanoparticle
72f1e53106
Add board definition for Neko Systems BL2040 Mini (#1258) 2023-03-09 10:30:54 -08:00
Sanjay Govind
f67bc43584
Add Bluetooth support to Platform.io (#1259) 2023-03-05 08:23:22 -08:00
Paint Your Dragon
719ab019a4
Add Adafruit Feather RP2040 DVI (#1245)
Includes option for QSPI/4 flash access on specific Adafruit boards for use when overclocking.
2023-03-02 15:54:19 -08:00
Earle F. Philhower, III
f5a621935d
Add BLE HID libraries and examples (#1240) 2023-03-01 16:29:25 -08:00
Earle F. Philhower, III
96113fe848
Fix BLE enable definition (#1238)
BLE tested working with BTStack BLE hog-keyboard-demo.
2023-03-01 10:08:03 -08:00
Earle F. Philhower, III
d92c1025ba
Update to SDK 1.5, add alpha-level BT support, use Pico-SDK CYW43 infrastructure (#1167)
* Update to Pico-SDK v1.5
* Hook in pico_rand, use ioctl to set ipv6 allmulti
* Move into PicoSDK LWIP mutex, hack timer sizes
* Utilize much of the PicoSDK infrastructure for WiFi
* Add WiFi::begin(ssid, pass, bssid)
* WiFiMulti to use BSSID, make more robust

WiFiMulti will now be more aggressive and try all matching SSIDs, in order
of RSSI, using the BSSID to identify individual APs in a mesh.

Before, if the highest RSSI AP didn't connect, it would fail immediately.
Now, it will go down the list, ordered by RSSI, to attempt to get a link.

* Add Bluetooth support from Pico-SDK
Able to build and run the HID Keyboard Demo from the Arduino IDE, almost
as-is.

Will probably need to make BT configurable.  Enabling BT on a plain WiFi
sketch uses 50KB of flash and 16KB of RAM even if no BT is used.

* Separate picow libs, BT through menus, example

Build normal Pico.a and 4 different options for PicoW IP/BT configuration.
Use IP=>IP/Bluetooth menu to select between options.

* CMakefile rationalization

* Move BT TLV(pairing) out of last 2 flash sectors

The pairing keys for BT are stored at the end of flash by default, but
we use the last sector of flash for EPROM and the penultimate one for
the filesystem.  Overwriting those in BT could cause some real exciting
crashes down the line.

Move the store to an app-build specific address using a dummy const
array to allocate space in the application image itself.

* PicoBluetoothHID with BT Mouse, Joystick, Keyboard

Add simple Bluetooth Classic HID helper function and port the existing
USB HID devices to it.  Port their examples.

* Protect BT key storage from multicore

* Add short-n-sweet Bluetooth documents

* Add Bluetooth Serial port library

* Turn off BT when the BT libraries exit
2023-02-27 20:09:02 -08:00
Ha Thach
060aa52c89
Add picoprobe CMSIS-DAP support (#1198) 2023-02-18 12:09:02 -08:00
Earle F. Philhower, III
75bab41e39
Make uf2conf.py flush STDOUT for real-time updates (#1194)
Without flushing STDOUT, the upload script's output aften are buffered
and not displayed until it completes.  Add in flush commands to allow
the IDE to display status as it changes.
2023-02-15 12:13:55 -08:00
Andrew Kroll
5dafbf57e9
Optimize and improve upload experience (#1136)
Stop the IDE from reporting large "Serial port not fount"-type errors after
every upload by delaying a bit before the uploader exits to give the OS/Pico
time to renegotiate.

Fixes flashing problems on certain Linux distros by checking all possible mount
locations instead of only the first one to be found.

Make 1200bps reset tickle more robust

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2023-02-11 12:33:44 -08:00
Earle F. Philhower, III
a1af9698ac
Fix USB VID/PID setting, rationalize boards.txt (#1144)
The USB VID was always being set to the Raspberry Pi foundation code,
causing other brand boards to show up incorrectly.

Remove redundant values from the boards.txt and define a consistent
USB VID/PID and use it in the setup code.

See #1129 for more info
2023-01-28 11:10:39 -08:00
Earle F. Philhower, III
af01c3cc77
Add boot2_w25q128jv to generic Pico flash menu (#1142)
Add-on to #1126
2023-01-26 16:35:16 -08:00
Earle F. Philhower, III
4c8bdc2bfc
Print useful uf2conv error if executable not found (#1141)
Fixes #1140

````
Converting to uf2, output size: 134144, start address: 0x2000
ERROR: Unable to execute powershell or wmic commands, can't continue.
ERROR: Please make sure either PowerShell or WMIC is installed and in
       your %PATH%.
````
2023-01-26 11:02:07 -08:00
Conor Burns
c58f94a9ba
Add correct boot source to helios (#1126) 2023-01-25 14:45:51 -08:00
Earle F. Philhower, III
a8238cb0d4 Add the YD-RP2040 support files
Oops!
2023-01-19 07:57:26 -08:00
Earle F. Philhower, III
1328f78099
Add VCC-GND YD-RP2040 board (#1120)
Fixes #1109
2023-01-14 14:33:52 -08:00
Conor Burns
f7ee4a868a
Add 0xCB Helios (#1117) 2023-01-14 12:19:27 -08:00
Earle F. Philhower, III
ae386d4308
Redo boards menu, separate out upload method, add picotool upload (#1112)
Instead of listing each board three times (normal upload, picoprobe,
and pico-debug uploads), list each board once and use a menu to select
the actual upload method.

Also add in picotool as an upload method for those folks who have trouble
with automounting.

Fix #1111
2023-01-13 13:04:24 -08:00
Mücahid Kamber
e105c539ad
Degz Mizu changed to Viyalab Mizu RP2040 (#1062) 2022-12-23 10:43:20 -08:00
Jay Greco
16f5ae7abe
Add nullbits Bit-C PRO board (#1051) 2022-12-19 08:50:52 -08:00
Earle F. Philhower, III
fca7fb5e0f
Add USB drive mode to TinyUSB, SingleFileDisk (#1034)
SingleFileDisk allows for exporting a file from the onboard LittleFS
filesystem to a PC through an emulated FAT drive when connected.  The
PC can open and copy the file, as well as delete it, but the PC has no
access to the main onboard LittleFS and no actual on-flash FAT
structures are used.

This is handy for things like data loggers.  They can run connected to
USB power for some time, and then connected to a PC to dowmload the CSV
log recorded.

It's almost 2023, allow LFN (long file names) on the emulated USB disk.

Reduce the disk buffer size to 64 bytes.  The buffer is statically
allocated so it's always present, even in non-USB disk mode, meaning
all apps will pay the RAM price for it.  64 bytes is slower to read
but works and saves ~1/2KB of heap for all apps.
2022-12-09 13:59:23 -08:00
Sebastian Krzyszkowiak
4e16a700c6
pluggable_discovery: Allow the scanner thread to quit (#1029)
When receiving a `QUIT` message, the main thread was trying to tell   
the scanner thread to quit - however, what it was actually doing was
creating a local variable that shadowed the global flag used by the
scanner thread. Fix that by ensuring that the main thread uses the
global variable instead.

Fixes #1028
2022-12-04 11:50:06 -08:00
Earle F. Philhower, III
861da4c361
Add Waveshare JSONs for Platform.IO (#1015) 2022-11-28 12:26:23 -08:00
Earle F. Philhower, III
65dd19a158
Allow building w/o USB for normal and picoprobe builds (#1013)
Supersedes #972.  Thanks @kholk
2022-11-28 10:01:35 -08:00
Engineer_Will
39ac1d6bfb
Add some Waveshare board descriptions (#1004) 2022-11-28 09:35:23 -08:00
Paint Your Dragon
913dfad1ad
Add Adafruit Feather RP2040 SCORPIO (#987)
* add rough for scorpio

* Add SCORPIO items from ladyada

* Change PID in makeboards.py instead of boards.txt

* Fix PID in scorpio JSON

* README: Add Feather SCORPIO to supported boards

* Fix PIDs using values from MBAdafruitBoards

Still unsure about pid.[1-7] but let's see what happens

* boards.txt fixed by running makeboards.py

Co-authored-by: lady ada <limor@ladyada.net>
2022-11-22 16:56:48 -08:00
Maximilian Gerhardt
2782dd1716
Add Waveshare RP2040 Zero (#980) 2022-11-21 08:52:00 -08:00
Sylwester
852219caf5
Add DatanoiseTV PicoADK board (#964) 2022-11-08 16:18:03 -08:00
Earle F. Philhower, III
07fbed06c6
Fix Arduino Nano Connect USB VID:PID tuples (#970)
Fixes #968
2022-11-08 08:59:21 -08:00
风飘雨
008c4d62ef
Fix SerialPIO bit length, update flyboard2040 pins (#950) 2022-11-03 08:35:40 -07:00
per1234
0446b732fa
Add protocol-explicit upload.tool properties required for pluggable discovery compatibility (#933)
A new flexible and powerful "pluggable discovery" system was added to the Arduino boards platform framework. This system
makes it easy for Arduino boards platform authors to use any arbitrary communication channel between the board and
development tools.

Boards platform configurations that use the old property syntax are automatically translated to the new syntax by
Arduino CLI:

https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration

> For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported

This translation is only done in platforms that use the old syntax exclusively. If `pluggable_discovery` properties are
defined for the platform then the new pluggable discovery-style `upload.tool.<protocol_name>` properties must be defined
for each board as well.

This platform includes a "UF2 Devices" discovery tool for `uf2conv` protocol ports. This tool now uses the modern
Arduino pluggable discovery system. `pluggable_discovery` properties were added to `platform.txt` in order to configure
the Arduino development tools to use this pluggable discovery tool. The `upload.tool.<protocol_name>` properties in
`boards.txt` were not updated at that time.

Global properties of that name were added to platform.txt, but this approach is not provided for by the Arduino Platform
specification:

https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration

> A specific upload.tool.<protocol_name> property should be defined for every board in boards.txt:

Those missing properties caused uploads to fail for users of the recent versions of Arduino IDE and Arduino CLI with an
error of the form:

Error during Upload: Property 'upload.tool.<protocol_name>' is undefined

(where `<protocol_name>` is the protocol of the selected port, if any)

It is also important to provide compatibility with versions of Arduino development tools from before the introduction of
the modern pluggable discovery system. For this reason, the old style `<board ID>.upload.tool` properties are retained.
Old versions of the development tools will treat the `<board ID>.upload.tool.<protocol_name>` properties as an unused
arbitrary user defined property with no special significance and the new versions of the development tools will do the
same for the `upload.tool` properties.
2022-10-24 08:50:13 -07:00
Earle F. Philhower, III
c3da4ada61
Add basic Pimoroni PGA2040 board definition (#930)
Because the board needs a unique BOOT2.S, add a definition to make it
easier to use.
2022-10-22 10:19:30 -07:00
Maximilian Gerhardt
b82336c8d9
Add W25Q64JV QSPI /4 Boot2 file (#929)
Fixes #927
2022-10-20 04:25:37 -07:00
Earle F. Philhower, III
10090b60a9
Rewrite PicoW LWIP interface for stability (#916)
Random crashes, infinite loops, and other lockups were happening to the PicoW
while under high load from multiple clients.

This seems to have been due to two issues:

* The periodic sys_check_timeouts() call from an alarm/IRQ was happening while
  the core was in LWIP code. LWIP is not re-entrant or multi-core/thread safe
  so this is a bad thing. Some calls may not have been locked with a manual
  addition of the LWIPMutex object to hit this.
* The WiFi driver supplies packet data during an interrupt. PBUF work is
  legal in an interrupt, but actually calling netif->input() from an IRQ to
  queue up the Ethernet packet for processing is illegal if LWIP is already
  in progress.
   
Rearchitect the LWIP interface to fix these problems:
* Disable interrupts during malloc/etc. to avoid the possibility of the
  periodic LWIP timeout check interrupting and potentially calling user
  code which did a memory operation
* Wrap all used LWIP calls to note LWIP code will be executing, instead of
  manually eyeballing and adding in protection in user code.
* Remove all user code LWIPMutex blocking, the wrapping takes care of it.
* When an Ethernet packet is received by interrupt and we're in LWIP code,
  just throw the packet away for now. The upper layers can handle retransmit.
  (A possible optimization would be to set the packet aside and add a
  housekeeping portion to the LWIP wrappers to netif->input() them when safe).
* Ignore callbacks during TCP connection teardown when the ClientContext
  passed from LWIP == nullptr
2022-10-15 12:00:35 -07:00
brtchip-tuannguyen
62ed93f12a
Add board BridgeTek IDM2040-7A (#912) 2022-10-13 08:26:11 -07:00
Sabas
86765cebb2
Update VID&PID HunterCatNFC 2040 (#907) 2022-10-11 09:12:56 -07:00
Mücahid Kamber
205983e206
Adds Degz Mizu board (#904) 2022-10-07 15:52:18 -07:00
Earle F. Philhower, III
1e7098c1cb
Add OpenOCD/GDB support for IDE 2.0 (#900)
Add (undocumented) support for the debugger in the IDE 2.0.
2022-10-05 12:19:18 -07:00
Melopero
a9356ceca5
Add Melopero Cookie RP2040 (#899) 2022-10-05 07:10:07 -07:00
Earle F. Philhower, III
b249811e28
Support IDE2, detect UF2 volumes (#897)
Allow the IDE to detect UF2 volumes (i.e. when you hold BOOTDEL and
plug in the board).

Allows the IDE2 to properly upload using OTA and serial.

Fixes #890 and others
2022-10-04 16:52:36 -07:00
Earle F. Philhower, III
7a85c3917f
Allow setting the WiFi region for PicoW (#875)
Fixes #874
2022-09-23 12:22:22 -07:00
Pontus Oldberg
91b4bdb58f
Adds Challenger RP2040 NFC board (#846) 2022-09-09 07:41:33 -07:00
Earle F. Philhower, III
36d5cebde6
Remove binary info header, was crashing picotool (#831)
Because OTA has changed the flash map from standard, picotool ends up
crashing or hanging while trying to operate on the current built files.

Remove the binary_info calls and structures completely to avoid any
issue.

Fixes #803
2022-09-02 23:17:03 -07:00
Earle F. Philhower, III
b4b1c39049 Add ExteremeElectric JSON 2022-08-28 12:38:14 -07:00
Earle F. Philhower, III
b233cb6e7f
Identify boards when in compound USB device mode (#806)
Allows the IDE to detect boards when using the Keyboard, Joystick,
or Mouse libraries.

Thanks @DaleMitchell for the idea!
2022-08-28 12:34:06 -07:00
Earle F. Philhower, III
9ff31b91f4
Add ExtremeElectronics RC2040 (#799)
Fixes #797
2022-08-25 12:47:39 -07:00
Earle F. Philhower, III
0edba2ee2a
Add WebServer, WebServerSecure, HTTPUpdateServer, HTTPUpdateServerSecure (#791)
* Add HTTP-parser lib to support ESP32 WebServer
* Add WebServer from ESP32.  Only supports HTTP
* Separate HTTP server from the network server
Instead of managing the WiFiServer/WiFiServerSecure in the same object
as the HTTP handling, split them into separate objects.  This lets
HTTP and HTTPS servers work without templates or duplicating code.
The HTTP block just gets a `WiFiClient*` and works with that to only
do HTTP processing, while the upper object handles the appropriate
server and client types.
* Add HTTPS server
* Clean up some THandlerFunction refs
* Refactor into a template-ized WebServer/WebServerSecure
* Add DNSServer examples which need WebServer
* Fix CoreMutex infinite recursion crash
Core could crash while Serial debugging was going on and prints were
happening from LWIP/IRQ land and the main app.
* Add HTTPUpdateServer(Secure)
* Add MIME include, optimize WebServer::send(size,len)
When send()ing a large buffer, the WebServer::send() call would
actually convert that buffer into a String (i.e. duplicate it, and
potential issues with embedded \0s in binary data).
Make a simple override to send(size, len) to allow writing from the
source buffer instead.
* Fix WiFiClient::send(Stream), add FSBrowser example
2022-08-23 15:51:32 -07:00
Earle F. Philhower, III
0b390d7dc4
Add HTTPUpdate class to pull updates from HTTP(S) (#789)
* Add HTTPUpdate class to pull updates from HTTP(S)
* Increase GH runners for pulls
WiFi builds and examples are taking some serious time now
* HTTPUpdate tests build on Pico W
2022-08-21 18:24:59 -07:00
Earle F. Philhower, III
0d15723444
Add HTTPClient, ported from the ESP8266 (#784)
Remove the need to have a separate WiFiClient that's destroyed after
the HTTPClient.  Let the object handle its own client, and pass through
any SSL requests.

Also supports the original ::begin methods which need a
WiFiClient(Secure) to be passed in and managed by the app.
2022-08-21 12:49:06 -07:00
Earle F. Philhower, III
bb91d978b1
Add OTA.O to make p.io builds function (#755)
Partial #754
2022-08-12 06:09:29 -07:00
Earle F. Philhower, III
da86a8942b
Add OTA update support (#711)
Adds a 12K OTA stub 3rd stage bootloader, which reads new firmware
from the LittleFS filesystem and flashes on reboot.

By storing the OTA commands in a file in flash, it is possible to
recover from a power failure during OTA programming.  On power
resume, the OTA block will simply re-program from the beginning.

Support cryptographic signed OTA updates, if desired.  Includes
host-side signing logic via openssl.

Add PicoOTA library which encapsulates the file format for
the updater, including CRC32 checking.

Add LEAmDNS support to allow Arduino IDE discovery

Add ArduinoOTA class for IDE uploads

Add MD5Builder class

Add Updater class which supports writing and validating
cryptographically signed binaries from any source (http,
Ethernet, WiFi, Serial, etc.)

Add documentation and readmes.
2022-08-12 00:26:51 -07:00
Earle F. Philhower, III
af2671d8eb
IPv6 initial support from @oddstr13 (#748)
* Apply @oddstr13 multicast patch to cyw43 driver
* Initial work for enabling IPv6
* Allow accessing CYW43 stats when LWIP_SYS_CHECK_MS is not set
* Use cyw43_set_allmulti to allow receiving multicast
* Add tools/libpico/build to gitignore

Co-authored-by: Odd Stråbø <oddstr13@openshell.no>
2022-08-09 18:05:43 -07:00
Maximilian Gerhardt
11cb82b058
Fix typo in XIAO board name (#745) 2022-08-09 09:57:51 -07:00
Sabas
a358f892d3
Add board ElectronicCats Hunter Cat NFC (#741)
* add board ElectronicCats Hunter Cat NFC

* update huntercat nfc
2022-08-07 21:36:04 -07:00
Earle F. Philhower, III
bb029cc287
Increase LWIP MEM_SIZE to > TCP_SND_BUF (#731)
The send buffers are set to 8 * MSS = ~11.5K.  MEM_SIZE is now set to
be larger than that, 16K, in order to help avoid having tcp_write fail
with ENOMEM.  The attempt to use a smaller size is still included, which
will allow a tcp_write of up to 16 * 16K = 256K, i.e. all of memory.

Fixes #725
2022-07-29 22:35:37 -07:00
Earle F. Philhower, III
8fd56ada8b
Adjust tcp_write size when memory is tight (#729)
Increases the MEM_SIZE outstanding write buffer to 8K

Allows the ClientContext to attempt to send smaller buffer chunks in the
case where MEM_SIZE won't allow the full tcp_sndbuf() transfer.

Fixes #725
2022-07-29 13:40:03 -07:00
Earle F. Philhower, III
82abc76e0c
Add CMSIS defines to Platform.io (#721)
Ref: https://github.com/earlephilhower/arduino-pico/pull/717#issuecomment-1197921851
2022-07-28 12:29:16 -07:00
Pontus Oldberg
e6e87fd307
Added to possibility to have extra compiler directives for a board. (#713)
* Adds support for Challenger RP2040 WiFi boards

* Added Challenger board to makeboards build script

* Adds new challenger board with LTE modem.

* Updated after getting approved PID from Raspberry Pi

* Add support for reverse numbering of analog pins.

* Added minimal HW support for onboard WiFi modem.

* Added challenger-nb-rp2040-wifi and RPICO32 module.

* Updated PID for RPICO32

* Added a simple support class for challenger LTE boards

* Update ChallengerLTE.cpp

Fixed spelling error

* Adds option for setting USB max power in makeboards.py

* Added new board Challenger RP2040 LoRa

* Added new lora board to readme.

* Added missing SERIAL2 and LoRa module GIO pins.

* Added support for enabling UART CTS and RTS pins.

* Updated boards.txt after merge conflict of makeboards.py

* Fixed incorrect indention

* Fixed PR comments

* Add new Challenger RP2040 WiFi/BLE board (https://ilabs.se/challenger-rp2040-wifi-ble-datasheet)

* * Updated PID for WiFi/BLE board
* Added abstraction pins for both versions of wifi modules
* Added support for replacing support class serial port.
* Added support for retrieving support class serial port.

* Fixed spelling errors.

* Updated helper class for Challenger NB board.

* Added Challenger sdrtc and subghz boards.

* Updated readme.

* Re ran makeboards to generate new index.

* Added to possibility to have extra compiler directives for a board.

* Added extra compiler options to JSON generation.

* Allows having a list of extra macros to define

* Fixed incorrect USB PID for Challenger NB board.

* Added board initialization for all wifi boards.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2022-07-27 08:36:50 -07:00
Earle F. Philhower, III
042c6af887
Add USB VID/PID to Platform.IO HWIDs (#698) 2022-07-21 12:08:21 -07:00
Earle F. Philhower, III
0e18f0986a
Enable IPv4 or IPv4/IPv6 stacks, Ethernet class (#695)
IPv4-only mode saves 20KB+ of flash memory.

Add some backwards compatibility with the global Arduino Ethernet
class when running in IPv4 only mode.

Fixes #687

* Speed P.IO build by not cloning 2GB of sources
* Document P.IO new option
2022-07-21 11:57:21 -07:00
Maximilian Gerhardt
40f4fdf246
Fix PlatformIO linking for variant-specific overrides (#696) 2022-07-21 04:49:09 -07:00
Earle F. Philhower, III
b88ad3d143
Support original Pico with ROM B0 (#693)
The SDK disabled float/double support for some functions by default on the
original B0 ROMs.  Manually re-enable it.

Fixes #689
2022-07-20 12:07:34 -07:00
Maximilian Gerhardt
be9e25785c
Correct PlatformIO build for Pico W, add to CI (#686)
* Add LWIP defines from platform.txt

* Add WiFi example to PIO CI
2022-07-19 08:09:47 -07:00
Earle F. Philhower, III
c3a580ee89
Add WiFiClientSecure and WifiServerSecure (TLS) support, NTP (#683)
* Add TLS (https) support
* Add NTP server
* Clean up include path, add BearSSL headers
* Allow 2 NTP servers, add ESP8266 compat define
* Add MFLN SSL example, free/used/total heap getters
* Enable stack thunking
* Add tested SSL examples
* Add BSSL_validation demo
* Add Client Certificate example
* Add RP2040 helper docs
* Clean up doc errors, missing doc version info
* Add WiFiClientSecure documentation
* Add NTP docs

Fixes #679
2022-07-18 20:24:11 -07:00
Earle F. Philhower, III
61742c9357
Disable WiFi.begin on plain Pico, add JSON (#682) 2022-07-17 05:51:03 -07:00
Earle F. Philhower, III
abf2c586c7
Add Pico W WiFi support (#670)
* 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
2022-07-15 16:47:53 -07:00
Pontus Oldberg
5be405308e
Add support for new SD/RTC and SubGHz boards (#663) 2022-06-30 10:16:44 -07:00
Earle F. Philhower, III
af0c1c87f5
Automatically update the JSON file in makeboards (#664)
Keep the Arduino Board Manager list up-to-date from makeboards.py
2022-06-29 12:50:42 -07:00
Maximilian Gerhardt
13f68fbc64
Make TinyUSB linking work automatically with PIO (#658) 2022-06-26 13:24:55 -07:00
Maximilian Gerhardt
0a23dfeb42
Update PlatformIO board files, add PIO CI (#634)
* 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
2022-06-17 08:57:18 -07:00
Maximilian Gerhardt
4a94677ee5
Update PlatformIO builder script and docs (#633)
* 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
2022-06-16 18:59:46 -07:00
Ha Thach
26752f6f90
Aadd f_cpu 120, 240 mhz option (#628) 2022-06-15 09:12:43 -07:00
Earle F. Philhower, III
1d6f66f834
Shrink flash and RAM usage even more (#627)
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.
2022-06-13 11:54:38 -07:00
Maximilian Gerhardt
1c85a1ca52
Activate default -Os optimization for Platform.IO (#619) 2022-06-10 09:28:26 -07:00
Earle F. Philhower, III
fdf30febea
Hide get.py download percent when not interactive (#618)
When get.py is run in a script the percent-update printouts shown while
downloading the toolchain end up as 100s to 1000s of lines in log files.

When stdout is not a terminal, avoid printing these percentages and
shrink logfiles significantly. Errors/etc. are still reported as normal.
2022-06-09 18:00:45 -07:00
Maximilian Gerhardt
e3a1debc65
Fix IDE include paths / Intellisense (#615) 2022-06-09 15:30:22 -07:00
Earle F. Philhower, III
e3053f69f8
Add GCC stack protector support (#611) 2022-06-06 20:07:40 -07:00
Earle F. Philhower, III
04ec75e515
Try and upload ASAP instead of hard-waiting 10sec (#610)
Fixes #609 and a niggling slowness in uploads.  Try to find the drive
in a loop for 10 seconds, instead of only checking once after 10 seconds.
Avoid 100% CPU usage while waiting for Pico drive
2022-06-06 18:21:34 -07:00
Earle F. Philhower, III
420d669a4b
Add C++ exception option to menus (#607)
Depends on new toolchain from
https://github.com/earlephilhower/pico-quick-toolchain/pull/11

Fixes #251
2022-06-06 10:28:54 -07:00
FeuerSturm
c863dad73e
New WIZnet boards (#605)
- added WIZnet WizFi360-EVB-Pico
- added WIZnet W5500-EVB-Pico
- corrected WIZnet W5100S-EVB-Pico PID
2022-06-03 11:56:13 -07:00
Pontus Oldberg
a9b24827e2
Updated PID for WiFi/BLE board and other changes (#595) 2022-05-24 08:07:49 -07:00
Earle F. Philhower, III
3ce961f84d Add in missing JSON files 2022-05-20 05:27:57 -07:00
Pontus Oldberg
e4153b03bc
Add new Challenger RP2040 WiFi/BLE board (#587) 2022-05-20 05:26:01 -07:00
Earle F. Philhower, III
8054015bff
Clean up misc obsolete references (#584)
Remove pico-extras from makelibpico.sh
Remove refs to SPIFFS in FS.h
Remove travis::: markers
Update Arduino IDE URL
2022-05-18 17:33:16 -07:00
Earle F. Philhower, III
65fe176795
Make default CPU speed 133MHz (#557)
The chip supports 133MHz and the other Pico core already defaults to
the higher speed, so make 133 the default.

It can still be changed through the menus and will stay at 125 unless
pre-existing users change it so they will see no difference.
2022-04-27 11:31:21 -07:00
Earle F. Philhower, III
561110231d
Add SparkFun Thing Plus RP2040 (#540) 2022-04-17 14:39:28 -07:00
Earle F. Philhower, III
eff908385e
Add Seeed XAIO RP2040 support (#538)
Fixes #537
2022-04-16 10:52:06 -07:00
randomllama
50befc42c3
udisks v2.9.0 dropped the trailing period for "udisksctl mount". (#516) 2022-03-16 14:25:44 -07:00
Maximilian Gerhardt
8deb47f2c3
Auto-ignore Adafruit TinyUSB Library if not active (#513)
Originally from https://github.com/episource/platform-raspberrypi/blob/my-platform-pico/builder/frameworks/arduino-pico/arduino-pico.py#L104-L115
2022-03-14 09:01:41 -07:00
Earle F. Philhower, III
01093482e7
Add script to update version number, new header (#506)
Define ARDUINO_PICO_MAJOR/_MINOR/_REVISION for app use and update the
Platform.IO and Arduino files for a new release version.

Fixes #309
Fixes #487
2022-03-06 11:04:19 -08:00
Arya11111
e444a7329c
Add DFRobot Beetle RP2040 boards V1.0.0 (#502) 2022-02-24 04:56:59 -08:00
Earle F. Philhower, III
03626e615b
Alphabetize the boards menu (#495)
Reorder the boards menu to make it easier to find any specific
board.  Add a note to the script asking manufacturers to keep it
that way.
2022-02-20 09:21:01 -08:00
Pontus Oldberg
8dabe44693
Add support for Challenger RP2040 LoRa (#494) 2022-02-19 06:56:32 -08:00
Earle F. Philhower, III
d562b00c37
Use Powershell to find UF2 drive if WMIC fails (#476)
Microsoft is deprecating WMIC, so fall back to a Powershell call in
case of failure to ruin WMIC.

Belt and suspenders, set PowerShell non-interactive mode and null STDIN.
2022-02-10 12:15:43 -08:00
gsexton
acbe190a20
Fix OpenSUSE upload, make mount point fionding more robust (#467)
Change order of tests to favor /run/media over /media. Parse output of udiskctl mount to find mount path
2022-02-08 08:24:30 -08:00
Earle F. Philhower, III
d24c8442c4
Make pio build script executable by default (#446)
In order to be consistent the other tools in the directory.
2022-01-28 12:46:51 -08:00
Maximilian Gerhardt
4a955b2a28
Correctly use earlephilhower.varant if variant not given, ensure USB power macro is always there (#444)
Fixes a crash of the builder script, `board.get("build.variant", None)` will throw an exception if the `build.variant` was not found (and not return `None` as the fallback value), but an empty string works, so check against that.

USB power defines moved directly into the board files, but still ensure that the macro always exists (with a default fallback value) to not fail the build.
2022-01-28 04:15:31 -08:00
Earle F. Philhower, III
4f27ec44eb
Generate Platform.IO board definitions (#426)
As part of the boards.txt generation, also make necessary files for
Platform.IO.

Fixes #399
2022-01-28 04:08:59 -08:00
Maximilian Gerhardt
00c0bc1e6e
Fix libraries and RAM size in PlatformIO build (#440) 2022-01-26 16:56:36 -08:00
风飘雨
97f9afac0a
Add board flyboard2040core (#437)
Thx!
2022-01-26 08:46:13 -08:00
Juraj Andrássy
1fdc0ab7c1
Arduino Nano R2040 Connect Nina pins access with WiFiNINA lib (#404) 2022-01-09 09:11:27 -08:00
arturo182
f91c4b3b9d
Add the RP2040 Stamp board (#407) 2022-01-03 11:38:05 -08:00
Maximilian Gerhardt
6591da9acf
Fix PlatformIO build (#395)
Defines USBD_MAX_POWER_MA as a static 250mA, which is correct for all the boards supported in platform-raspberrypi (aka, RaspberryPi Pico and Nano RP2040 Connect)
2021-12-29 09:19:47 -08:00
Limor "Ladyada" Fried
894a82f54f
Add Adafruit KB2040 (#390) 2021-12-26 05:28:50 -08:00
Earle F. Philhower, III
5cc9835303
Add warning not to edit boards.txt (#383) 2021-12-23 08:09:59 -08:00