Commit graph

126 commits

Author SHA1 Message Date
Earle F. Philhower, III
20cabe824f Update version 2023-06-17 19:40:40 -07:00
Earle F. Philhower, III
7eb176c0b4 Update version 2023-06-07 18:06:55 -07:00
Earle F. Philhower, III
b2b4b2d71d Update version 2023-05-23 17:57:38 -07:00
Earle F. Philhower, III
3dee0a276b Update version 2023-05-05 09:00:07 -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
Earle F. Philhower, III
c276a36c9b Update version 2023-04-05 13:38:25 -07:00
Earle F. Philhower, III
7851dc8cb7 Update version 2023-03-10 09:08:28 -08:00
Rei Vilo
0be1d9c3ea
Fix picow default libname in platform.txt (#1250) 2023-03-03 07:40:02 -08:00
Earle F. Philhower, III
06a1fdac50 Update version 2023-03-01 16:59:38 -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
Earle F. Philhower, III
11ac5ed33e Update version 2023-02-18 13:04:53 -08:00
Ha Thach
060aa52c89
Add picoprobe CMSIS-DAP support (#1198) 2023-02-18 12:09:02 -08:00
Earle F. Philhower, III
b473139758
Enable use of uninitialized_ram() macro (#1199)
The uninitted RAM macro would fail because the OTA code would clear out the
first 50KB or so of RAM to copy its code and global values.

Move all global values to the end of RAM in OTA, and then align any uninitted
vars to a 16KB unit to ensure it won't appear in the 1st part of RAM that is
still needed to copy the OTA executable.

In the normal case, without any uninit_ram vars, no additional space is used.
When uninit_ram is used, up to 16KB of space may be lost to get that alignment,
but it will work properly.

Fixes #1188
2023-02-16 17:59:15 -08:00
Earle F. Philhower, III
1bfd07c19a Update version 2023-02-11 12:34:40 -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
f212720484 Update version 2023-01-14 14:34:45 -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
Earle F. Philhower, III
6a30e4b7a4 Update version 2022-12-30 13:28:23 -08:00
Earle F. Philhower, III
4cc8e6d6db Update version 2022-12-17 12:07:51 -08:00
Earle F. Philhower, III
f9321b034f Update version 2022-11-28 10:07:41 -08:00
Earle F. Philhower, III
40855c90fb Update version 2022-11-03 08:54:31 -07:00
Earle F. Philhower, III
9d0b9bef67 Update version 2022-10-25 08:02:54 -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
075958883f Update version 2022-10-16 10:50:29 -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
Earle F. Philhower, III
69ab736cf8 Update version 2022-10-04 17:14:52 -07:00
Earle F. Philhower, III
3e758dcebb
Add TARGET_RP2040 to build defines (#898)
Fixes #896 since it seems the Arduino.cc core defines this constant
2022-10-04 17:04:25 -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
Earle F. Philhower, III
cd0e83843f Update version 2022-09-21 19:19:24 -07:00
Earle F. Philhower, III
d9478801ed Update version 2022-09-21 17:56:26 -07:00
Earle F. Philhower, III
1812b829dc Update version 2022-09-03 09:34:46 -07:00
Earle F. Philhower, III
34d311fd81 Update version 2022-09-02 08:59:01 -07:00
Earle F. Philhower, III
805d20d199
Use pipes between GCC stages (#827)
Should speed builds up slightly, depending on the OS and virus scanning.
2022-09-01 18:49:05 -07:00
Earle F. Philhower, III
257db5ac7d Update version 2022-08-27 09:33:50 -07:00
Earle F. Philhower, III
8aad2ca3d2 Update version 2022-08-21 19:54:11 -07:00
Earle F. Philhower, III
2044d2e51c
Fix OTA signing (#786)
Force the builder to include the path where we build the signing header.

Undo a breaking bug in the Updater class (TBD fix in ESP8266)

Fixes #783
2022-08-21 15:20:00 -07:00
Earle F. Philhower, III
e947895119 Update version 2022-08-12 12:29:32 -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
AngeloGioacchino Del Regno
6e0175bd8e
platform.txt: Add compiler flags for ARM CMSIS (#717)
Adds compiler flags to correctly build Cortex-M0/M0+ code variants for
libraries inside of the ARM CMSIS codebase.

This was tested with the Arduino_CMSIS-DSP library.
2022-07-27 19:11:50 -07:00
Earle F. Philhower, III
1f5139d209 Update version 2022-07-24 12:58:02 -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
Earle F. Philhower, III
824070b899 Update version 2022-07-18 20:28:49 -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
53cecae109 Update version 2022-07-17 05:52:01 -07:00
Earle F. Philhower, III
988940b25e Update version 2022-07-15 16:49:36 -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
Earle F. Philhower, III
cfaae84813 Update version 2022-06-28 15:07:55 -07:00
Earle F. Philhower, III
de069cf8c9 Update version 2022-06-24 11:25:21 -07:00
Earle F. Philhower, III
0ee072671b Update version 2022-06-20 08:30:24 -07:00