Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: raspberrypi/pico-examples
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e0d8b6249278a4aeabb212b41c78444924ae4ced
Choose a base ref
..
head repository: raspberrypi/pico-examples
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5932b7762899d5fb7c821470284923fa3e0f1fdd
Choose a head ref
3 changes: 1 addition & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -39,8 +39,7 @@ jobs:

- name: Build Project
working-directory: ${{github.workspace}}/pico-examples
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
shell: bash
shell: pwsh
run: |
mkdir build
cd build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -368,8 +368,9 @@ These require you to set `PICO_ARM_TOOLCHAIN_PATH` and `PICO_RISCV_TOOLCHAIN_PAT

App|Description
---|---
[blink](universal/CMakeLists.txt#L126) | Same as the [blink](blink) example, but universal.
[hello_universal](universal/hello_universal) | The obligatory Hello World program for Pico (USB and serial output). On RP2350 it will reboot to the other architecture after every 10 prints.
[nuke_universal](universal/CMakeLists.txt#L107) | Same as the [nuke](flash/nuke) binary, but universal. On RP2350 runs as a packaged SRAM binary, so is written to flash and copied to SRAM by the bootloader
[nuke_universal](universal/CMakeLists.txt#L132) | Same as the [nuke](flash/nuke) example, but universal. On RP2350 runs as a packaged SRAM binary, so is written to flash and copied to SRAM by the bootloader

### USB Device

7 changes: 6 additions & 1 deletion bootloaders/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
add_subdirectory_exclude_platforms(encrypted host rp2040 rp2350-riscv)
if (TARGET pico_mbedtls)
add_subdirectory_exclude_platforms(encrypted host rp2040 rp2350-riscv)
else()
# Assume picotool has no signing support, if no pico_mbedtls available
message("Skipping encrypted bootloader example as pico_mbedtls unavailable")
endif ()
2 changes: 1 addition & 1 deletion bootloaders/encrypted/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ example_auto_set_url(enc_bootloader)

# Example binary to load
add_executable(hello_serial_enc
../../hello_world/serial/hello_serial.c
hello_serial.c
)

# pull in common dependencies
17 changes: 17 additions & 0 deletions bootloaders/encrypted/hello_serial.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <stdio.h>
#include "pico/stdlib.h"

int main() {
stdio_init_all();
while (true) {
printf("Hello, world!\n");
printf("I'm an encrypted binary\n");
sleep_ms(1000);
}
}
2 changes: 1 addition & 1 deletion freertos/hello_freertos/hello_freertos.c
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
#endif

// Whether to flash the led
#ifndef USB_LED
#ifndef USE_LED
#define USE_LED 1
#endif

3 changes: 3 additions & 0 deletions sha/mbedtls_sha256/mbedtls_sha256.c
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@

#include <stdio.h>
#include <string.h>
// Include sys/types.h before inttypes.h to work around issue with
// certain versions of GCC and newlib which causes omission of PRIu64
#include <sys/types.h>
#include <inttypes.h>
#include <stdlib.h>

3 changes: 3 additions & 0 deletions sha/sha256/hello_sha256.c
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@

#include <stdio.h>
#include <string.h>
// Include sys/types.h before inttypes.h to work around issue with
// certain versions of GCC and newlib which causes omission of PRIu64
#include <sys/types.h>
#include <inttypes.h>
#include <stdlib.h>

8 changes: 2 additions & 6 deletions usb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -9,11 +9,7 @@ else ()
message("Skipping TinyUSB host examples as TinyUSB is unavailable")
endif ()
if (TARGET tinyusb_pico_pio_usb)
if ((NOT CMAKE_C_COMPILER_ID STREQUAL "GNU") OR CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.3)
message("Skipping TinyUSB dual examples, as TinyUSB hw/mcu/raspberry_pi/Pico-PIO-USB does not currently compile on non GCC or GCC 11.3 or greater")
else()
add_subdirectory(dual)
endif()
add_subdirectory(dual)
else ()
message("Skipping TinyUSB dual examples, as TinyUSB hw/mcu/raspberry_pi/Pico-PIO-USB submodule unavailable")
endif ()
endif ()