Commit graph

242 commits

Author SHA1 Message Date
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
Earle F. Philhower, III
48877984b7
Remove redundant board.mcu in boards.txt, fix precompiled libs (#382)
* Remove redundant/wrong second board.mcu in boards.txt

Fixes #380

Boards.txt had the setting board.mcu twice.  The first one was correct,
while the second one wasn't and shouldn't have been there.  Remove it.

* Include fix from @rei-vilo in #381
2021-12-23 07:55:34 -08:00
Earle F. Philhower, III
7120a1508c
Update to SDK version 1.3.0 (#371) 2021-12-14 18:59:24 -08:00
Pontus Oldberg
a808f4ae6a
Adds option for setting USB max power in makeboards.py (#370) 2021-12-10 04:11:22 -08:00
Pontus Oldberg
f106035100
Adds support for Challenger NB RP2040 WiFi board and RPICO32 module (#366) 2021-12-07 09:44:38 -08:00
Wai Weng
341307cb8d
Added new variant: Cytron Maker Nano RP2040. (#365) 2021-12-06 00:02:54 -08:00
Earle F. Philhower, III
85990ff51d
Support CMSIS and rename conflicting header file (#362) 2021-12-03 12:49:34 -08:00
Earle F. Philhower, III
77f03a44b6
Add WIZnet W5100S-EVB-Pico board (#355) 2021-11-30 17:11:08 -08:00
Earle F. Philhower, III
1afbbaba63
Add RTC headers to path and pico_utils to link (#353)
Fixes #348

Add the RTC header path in the SDK to the Arduino build path.  Also add
pico_utils to the libpico.a for the datetime_to_str call.

Note that the pico_sdk has a bug in the datetime.h header so you need to
manually bracket the include file as "C":

extern "C" {
    #include "pico/util/datetime.h"
}
2021-11-28 09:00:14 -08:00
Earle F. Philhower, III
b7d76bd51d
Add RTTI menu to support apps which need RTTI (#338)
By default RTTI (Run-Time Type Information) is disabled because most apps
don't need run time type info enabled.  However, certain libraries expect
to be able to query types of objects at runtime, so add a menu to enable it.
2021-10-29 08:22:27 -07:00
uPesy Electronics
3d821f73a4
Add board variant for uPesy RP2040 DevKit (#335) 2021-10-29 08:12:45 -07:00
Wai Weng
a305b30d90
Added board variants Cytron Maker Pi RP2040. (#340) 2021-10-29 08:04:15 -07:00
Mike Lynch
0c22150fdb
Add compiler Optimize option (#322) 2021-09-26 18:05:35 -07:00
Ha Thach
423476dc87
Change qtpy boot2 to w25q080_2_padded (#321) 2021-09-22 07:40:03 -07:00
Earle F. Philhower, III
adf1c88c27
Fix spelling and update readme. Prep for 1.9.5 (#319) 2021-09-19 13:43:26 -07:00
Dan Halbert
ad905ae992
Build libpico.a with PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64 (#315)
Fixes #312
2021-09-19 13:31:39 -07:00
Leonardo La Rocca
608a5da480
Adds board variant definition for Melopero Shake RP2040 (#318) 2021-09-19 13:26:33 -07:00
Maximilian Gerhardt
3df3f0741a
Add PlatformIO support (#250)
* Add package.json

To make package easily integratable with PlatformIO

* Correct name back to original one

* Format package.json

* Add first shot at builder script

* Add USB stack flags, fix compile flags

* Formatting

* Add more link & USB flags

* Build Boot2 bootloader

* Formatting

* Generate linkerscript, linker fixes

* Fix linkflags, make firmware runnable

* Update USB flags and RAM size

* Correct USB flags, add dynamic sketch partitioning

* Restructure filesystem size and flash size logic into platform code

* Move C++ only flags to CXXFLAGS

* Add PlatformIO documentation

* Link to new platform.io document in the docs TOC

* Fix typos in platformio docs

* Fix one additional typo in platformio.rst

* Update docs

* Remove wrongly commited build folder
2021-09-13 21:28:07 -07:00
Pontus Oldberg
2c29314578
Add support for our new Challenger RP2040 board with LTE modem. (#275)
* 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
2021-08-12 08:42:09 -07:00
Pontus Oldberg
733aca5ac3
Adds support for Challenger RP2040 WiFi boards (#268) 2021-07-29 08:59:27 -07:00
majbthrd
47a4d9f803
Add pico-debug support (#239) 2021-07-07 12:55:03 -07:00
Earle F. Philhower, III
d67329a2b8
Rename assembly dir to boot2, only has boot2.Ss (#230) 2021-06-30 08:42:13 -07:00
Ha Thach
3a9703fc20
Update tinyusb 1.3.0 (#228)
* update included tinyusb to 1.2.0

move tusb_config.h from core to library for more portability

* pump tinyusb

* update tinyusb to 1.3.0

* try to fix ci warning
2021-06-30 08:22:36 -07:00
Earle F. Philhower, III
03e740a511
Add CPU cycle counter accessors (#226)
Use the 24-bit SYSTICK peripheral, wrapped in logic to extend it to a
full 32 or 64bits.  W/o the wrapper, SYSTICK will wrap around in ~100ms.

Adds rp2040.getCycleCount() and rp2040.getCycleCount64()

Clean up the libpico build process as crt0.S from the pico-sdk should
be directly used.

Clean up the keywords file.
2021-06-28 20:53:40 -07:00
Ha Thach
7eca6c609f
Use correct tusb_config.h for built-in usb (pico-sdk) (#219)
Fix issue with usbd_desc_cfg value may not be initialized as zero.
2021-06-26 09:37:41 -07:00
Earle F. Philhower, III
6afcf5881d
Initial Arduino Nano RP2040 Connect support (#212)
Thanks to @Claupio for the bringup!
Reference #208
2021-06-14 08:59:52 -07:00
Earle F. Philhower, III
77712f5904
Add SparkFun ProMicro RP2040 (#196)
It's still OOS, so hookup taken from their schematics.
2021-06-08 06:55:13 -07:00
Limor "Ladyada" Fried
d2a2fcb89d
Add a new board - the Adafruit Macropad w/RP2040 (#191)
* add two variant files

* add trinkey and stemma friend

* add fast SPI transfer using pico-sdk blocks

* update makeboards.py for new variants

- STEMMA Friend RP2040
- Trinkey RP2040 QT

* run astyle on SPI library

* fix auto -> ssize type

* astyled

* woops ssizet != sizet!

* a nice day for a new board definition! this is a macropad with 12 keys, oled and rotary encoder

Co-authored-by: hathach <thach@tinyusb.org>
2021-06-06 12:53:06 -07:00
Earle F. Philhower, III
e0d33e2536
Try to mount Pico drive if not already present (#175)
Fixes #27

As @vslinuxdotnet discovered, sometimes the Pico firmware update emulated USB
stick does not get automounted under Linux.  Add logic to attempt to use
standard tools to mount it to the uploader, only tried if no drives are
detected normally.
2021-05-27 13:07:55 -07:00
Limor "Ladyada" Fried
860b43b342
Two board variant definitions and a high speed SPI transfer function (#172) 2021-05-26 18:09:49 -07:00
Earle F. Philhower, III
83a32f1ba3
Add compilation to CI (#155)
Stolen from ESP8266, modified to run basic sanity compiles on the core.

Fix warnings identified by the new checks.
2021-05-22 02:58:57 -07:00
Earle F. Philhower, III
052331168e
Fix repo spelling issues (#152) 2021-05-19 18:03:12 -07:00
Scott Smith
4509e6cf38
Fix debug level "Wire" compile error (#151)
* add missing character for debug level "Wire"

if Debug Level "Wire" is chosen, the compiler posts error
> arm-none-eabi-g++: error: DDEBUG_RP2040_WIRE: No such file or directory

Add the missing '-' to correct the issue.

* change must be made via makeboards.py

The generator script needs to be fixed and rerun. If we just update the boards.txt, changes will be lost on a rebuild.

* Update boards.txt

boards.txt as generated by revised makeboards.py

* correct spelling issue for CI tool
2021-05-19 17:46:21 -07:00
Earle F. Philhower, III
0d593252e6
Ignore non-UTF8 chars in UF2 upload (#148)
Fixes #95
2021-05-19 15:38:56 -07:00
Earle F. Philhower, III
a0dac52e0e
Rationalize Adafruit Feather infra, update docs (#145)
Use same board.txt format as other Adafruit boards.
Add in quick note about the new USB stack to the docs.
2021-05-19 10:07:03 -07:00
Ha Thach
010039578f
Add Adafruit ItsyBitsy and QTPy RP2040 (#144)
* add adafruit qtpy and itsybitsy rp2040
* change qtpy boot2 to generic_03h_4
2021-05-19 09:39:19 -07:00
Ha Thach
f8a2f38fe7
Port Adafruit_TinyUSB_Arduino lib (#127)
* initial tinyusb lib port

* add Adafruit_TinyUSB_Arduino as submodules

* add yield() to main loop

* sync with tinyusb lib latest

* add USB manufacturer and product

* fix typo in tinyusb lib

* sync with master

updating implementation

* Rationalize link stage command line

Make the build process less insane.

* clean up delay

* clean up platform and board

* update makeboards.py for generating usbstack menu

* update tinyusb lib to 1.0.0
2021-05-18 18:10:47 -07:00
Earle F. Philhower, III
4a8ac3d902
Add support for shared USB Serial, Keyboard, Mouse (#132)
Use a shared infrastructure based on TinyUSB, allow users to use sketches
with ported Arduino Keyboard and Mouse libraries.
2021-05-13 19:20:24 -07:00
Earle F. Philhower, III
72a644f77d
Update README.md 2021-05-11 12:31:02 -07:00
Earle F. Philhower, III
a259eb7396
Clean up directory organization, libpico build (#129)
Also add a README.md to the tools directory.
2021-05-11 12:30:14 -07:00
Earle F. Philhower, III
f1e77995f5
Look for UF2 drives in additional spots on Linux (#37)
Fixes #28
2021-05-06 20:04:36 -07:00
Earle F. Philhower, III
19552151f2 Fix Picoprobe USB PID
Thanks to @me-no-dev for pointing out that the Picoprobe does UART
passthrough!
2021-04-06 20:51:21 -07:00
Earle F. Philhower, III
29f272e9ca Clear up FS menus
Heise.de seems to have been confused by the menu options for the
filesystem/sketch selection.  Explicitly list the Sketch and FS sizes in
each menu tem to avoid future confusion.
2021-04-02 16:19:14 -07:00
Earle F. Philhower, III
7bfffed649 Move Adafruit Feather RP2040 to w25x10cl_4
Testing in #42.  Thanks @blurfl!
2021-03-31 14:11:24 -07:00
Earle F. Philhower, III
09268fe064
Add multiple boot2 options with /2 and /4 SPI div (#67)
Build all 4 different boot_stage2 objects with SPI/2 and SPI/4 options.
Add a menu to the generic board to allow selecting between them.
Use the potato/4 boot2 for the Adafruit Feather until we have a better
version verified.

Fixes #42
2021-03-31 12:42:51 -07:00
Earle F. Philhower, III
1290f72e3e Add picoprobe upload support, cleanup up boards 2021-03-29 13:11:14 -07:00
Earle F. Philhower, III
eaaab62a43
Merge pull request #48 from blurfl/Address-Issue-#46
Recognize /dev/cu in args.serial
2021-03-28 16:53:19 -07:00
Scott Smith
a68f79055d Recognize /dev/cu in args.serial
Sketch upload to serial port fails on macos because the Arduino IDE uses the callout device "/dev/cu". Adding recognition of "/dev/cu" to uf2conv.py makes the sketch upload work.
2021-03-28 16:00:02 -07:00
Earle F. Philhower, III
9d9d9ebcd4 Fix Pyton on RPI, EEPROM start address in LD file 2021-03-28 15:42:35 -07:00
Earle F. Philhower, III
b2cef8d8d6 Adafruit Feather, overclocking, flash FS shims
Add support for Adafruit Feather RP2040 (8MB).  Identified with a unique
USB PID so it displays properly once programmed one time.  Moved LED to
pin 13 (per the website docs), but have no board to test.

Add over/underclocking menus, applied at boot.  Use at your own risk, as
usual.

Add shims to allocate flash space for a filesystem (but not implemented
yet).

Add a "generic" RP2040 board
2021-03-28 10:56:53 -07:00
Earle F. Philhower, III
c892443b5b Adjust directories for cleaner use w/Arduino
/system is only downloaded tools
/tools is all scripts/submodules that are part of the main core
/lib is the linker libs
2021-03-17 08:33:51 -07:00