Skip to content

Commit d2855a8

Browse files
committed
Update Build for PicoADK v2.
2 parents 5f8dd00 + 6d637ce commit d2855a8

File tree

113 files changed

+567
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+567
-297
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
7171
* Pimoroni Pico Plus 2
7272
* Pimoroni Plasma2040
7373
* Pimoroni Tiny2040
74+
* Pimoroni Tiny2350
7475
* Pintronix PinMax
7576
* RAKwireless RAK11300
7677
* Redscorp RP2040-Eins

boards.txt

Lines changed: 349 additions & 56 deletions
Large diffs are not rendered by default.

cores/rp2040/RP2040USB.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,6 @@ usbd_class_driver_t const *usbd_app_driver_get_cb(uint8_t *driver_count) {
566566

567567
#elif defined NO_USB
568568

569-
// will ensure backward compatibility with existing code when using pico-debug
570-
571569
#warning "NO_USB selected. No output to Serial will occur!"
572570

573571
#include <Arduino.h>

cores/rp2040/SerialPIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ void SerialPIO::begin(unsigned long baud, uint16_t config) {
201201

202202
digitalWrite(_tx, HIGH);
203203
pinMode(_tx, OUTPUT);
204-
gpio_set_outover(_tx, _invertTX);
205204

206205
pio_tx_program_init(_txPIO, _txSM, off, _tx);
207206
pio_sm_clear_fifos(_txPIO, _txSM); // Remove any existing data
@@ -212,6 +211,7 @@ void SerialPIO::begin(unsigned long baud, uint16_t config) {
212211
pio_sm_exec(_txPIO, _txSM, pio_encode_mov(pio_isr, pio_osr));
213212

214213
// Start running!
214+
gpio_set_outover(_tx, _invertTX);
215215
pio_sm_set_enabled(_txPIO, _txSM, true);
216216
}
217217
if (_rx != NOPIN) {

cores/rp2040/SoftwareSerial.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class SoftwareSerial : public SerialPIO {
3737
};
3838

3939
void begin(unsigned long baud, uint16_t config) override {
40-
setInvertTX(invert);
41-
setInvertRX(invert);
40+
setInvertTX(_invert);
41+
setInvertRX(_invert);
4242
SerialPIO::begin(baud, config);
4343
}
4444

docs/install.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,9 @@ The first line creates a file with the USB vendor and ID of the Picoprobe and te
184184

185185
Once Picoprobe permissions are set up properly, then select the board "Raspberry Pi Pico (Picoprobe)" in the Tools menu and upload as normal.
186186

187-
Uploading Sketches with pico-debug
188-
----------------------------------
189-
pico-debug differs from Picoprobe in that pico-debug is a virtual debug pod that runs side-by-side on the same RP2040 that you run your code on; so, you only need one RP2040 board instead of two. pico-debug also differs from Picoprobe in that pico-debug is standards-based; it uses the CMSIS-DAP protocol, which means even software not specially written for the Raspberry Pi Pico can support it. pico-debug uses OpenOCD to handle your sketch uploads, and debugging can be accomplished with CMSIS-DAP capable debuggers including GDB.
190-
191-
Under Windows and macOS, any user should be able to access pico-debug automatically, but under Linux `udev` must be told about the device and to allow normal users access.
187+
Uploading Sketches with OpenOCD
188+
-------------------------------
189+
Under Windows and macOS, any user should be able to access OpenOCD automatically, but under Linux `udev` must be told about the device and to allow normal users access.
192190

193191
To set up user-level access to all CMSIS-DAP adapters on Ubuntu (and other OSes which use `udev`):
194192

@@ -199,10 +197,8 @@ To set up user-level access to all CMSIS-DAP adapters on Ubuntu (and other OSes
199197
200198
The first line creates a file that recognizes all CMSIS-DAP adapters and tells UDEV to give users full access to it. The second causes `udev` to load this new rule. Note that you will need to unplug and re-plug in your device the first time you create this file, to allow udev to make the device node properly.
201199

202-
Once CMSIS-DAP permissions are set up properly, then select the board "Raspberry Pi Pico (pico-debug)" in the Tools menu.
203-
204-
When first connecting the USB port to your PC, you must copy pico-debug-gimmecache.uf2 to the Pi Pico to load pico-debug into RAM; after this, upload as normal.
200+
Once CMSIS-DAP permissions are set up properly, then select the Upload Method "Picoprobe/Debugprobe (CMSIS-DAP)" in the Tools menu.
205201

206-
Debugging with Picoprobe/pico-debug, OpenOCD, and GDB
202+
Debugging with Picoprobe/Debugprobe, OpenOCD, and GDB
207203
-----------------------------------------------------
208-
The installed tools include a version of OpenOCD (in the pqt-openocd directory) and GDB (in the pqt-gcc directory). These may be used to run GDB in an interactive window as documented in the Pico Getting Started manuals from the Raspberry Pi Foundation. For pico-debug, replace the raspberrypi-swd and picoprobe example OpenOCD arguments of "-f interface/raspberrypi-swd.cfg -f target/rp2040.cfg" or "-f interface/picoprobe.cfg -f target/rp2040.cfg" respectively in the Pico Getting Started manual with "-f board/pico-debug.cfg".
204+
The installed tools include a version of OpenOCD (in the pqt-openocd directory) and GDB (in the pqt-gcc directory). These may be used to run GDB in an interactive window as documented in the Pico Getting Started manuals from the Raspberry Pi Foundation.

docs/platformio.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ To specify the debugging adapter, use ``debug_tool`` (`documentation <https://do
342342
* ``jlink``
343343
* ``raspberrypi-swd``
344344
* ``blackmagic``
345-
* ``pico-debug``
346345

347346
These values can also be used in ``upload_protocol`` if you want PlatformIO to upload the regular firmware through this method, which you likely want.
348347

@@ -362,25 +361,6 @@ For further information on customizing debug options, like the initial breakpoin
362361

363362
You can obtain precompiled binaries from `here <https://github.com/blackmagic-debug/blackmagic/issues/1364#issuecomment-1503372723>`__. A flashing guide is available `here <https://primalcortex.wordpress.com/2017/06/13/building-a-black-magic-debug-probe/>`__. You then have to configure the target serial port ("GDB port") in your project per `documentation <https://docs.platformio.org/en/latest/plus/debug-tools/blackmagic.html#debugging-tool-blackmagic>`__.
364363

365-
.. note::
366-
For the pico-debug (`download <https://github.com/majbthrd/pico-debug/releases>`__) debugging way, *which needs no additional debug probe*, add this snippet to your ``platformio.ini`` and follow the given procedure:
367-
368-
.. code:: ini
369-
370-
upload_protocol = pico-debug
371-
debug_tool = pico-debug
372-
build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
373-
374-
1. Build your firmware normally
375-
2. Plug in the Pico in BOOTSEL mode
376-
3. Drag and drop your ``.pio/build/<env>/firmware.uf2`` onto the boot drive
377-
4. Unplug and replug your Pico back into BOOTSEL mode for the second time
378-
5. Drag and drop the downloaded ``pico-debug-gimmecache.uf2`` file onto the boot drive
379-
6. A CMSIS-DAP device should now appear on your computer
380-
7. Start debugging via the debug sidebar as normal
381-
382-
Note the restrictions: The second core cannot be used, the USB port cannot be used (no USB serial, only UART serial), 16KB less RAM is available.
383-
384364
Filesystem Uploading
385365
--------------------
386366

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Dir KEYWORD1
1313
File KEYWORD1
1414
timeval KEYWORD1
1515
time_t KEYWORD1
16+
SoftwareSerial KEYWORD1
1617

1718
#######################################
1819
# Methods and Functions (KEYWORD2)

package/package_pico_index.template.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@
227227
{
228228
"name": "Pimoroni Tiny2040"
229229
},
230+
{
231+
"name": "Pimoroni Tiny2350"
232+
},
230233
{
231234
"name": "Pintronix PinMax"
232235
},

tools/json/0xcb_helios.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe",
51-
"pico-debug"
50+
"picoprobe"
5251
]
5352
},
5453
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

0 commit comments

Comments
 (0)