Skip to content

Commit

Permalink
Merge commit of 1.1.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kilograham authored Mar 5, 2021
2 parents 2d5789e + 8c059ca commit fc10a97
Show file tree
Hide file tree
Showing 164 changed files with 25,654 additions and 22,838 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CMake
on: [push, pull_request]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
if: github.repository_owner == 'raspberrypi'
runs-on: [self-hosted, Linux, X64]

steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Checkout repo
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Get core count
id: core_count
run : cat /proc/cpuinfo | grep processor | wc -l

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE --parallel ${{steps.core_count.outputs.output}}
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ if (NOT TARGET _pico_sdk_inclusion_marker)

add_compile_options(-Winline)

# allow customization
add_sub_list_dirs(PICO_SDK_POST_LIST_DIRS)

if (PICO_SDK_TOP_LEVEL_PROJECT AND NOT DEFINED PICO_SDK_TESTS_ENABLED)
set(PICO_SDK_TESTS_ENABLED 1)
endif()
if (PICO_SDK_TESTS_ENABLED)
add_subdirectory(test)
endif ()
set(PICO_SDK_TESTS_ENABLED "${PICO_SDK_TESTS_ENABLED}" CACHE INTERNAL "Enable build of SDK tests")

# allow customization
add_sub_list_dirs(PICO_SDK_POST_LIST_DIRS)
set(PICO_SDK_TESTS_ENABLED "${PICO_SDK_TESTS_ENABLED}" CACHE INTERNAL "Enable build of SDK tests")

# add docs at the end, as we gather documentation dirs as we go
add_subdirectory(docs)
Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ instructions for other platforms, and just in general, we recommend you see [Ras
```
1. Set up your project to point to use the Raspberry Pi Pico SDK

* By cloning the SDK locally (most common)
* Either by cloning the SDK locally (most common) :
1. `git clone` this Raspberry Pi Pico SDK repository
1. Copy [pico_sdk_import.cmake](https://github.com/raspberrypi/pico-sdk/blob/master/external/pico_sdk_import.cmake)
from the SDK into your project directory
Expand All @@ -65,7 +65,7 @@ instructions for other platforms, and just in general, we recommend you see [Ras
```

* With the Raspberry Pi Pico SDK as a submodule
* Or with the Raspberry Pi Pico SDK as a submodule :
1. Clone the SDK as a submodule called `pico-sdk`
1. Setup a `CMakeLists.txt` like:

Expand All @@ -85,7 +85,7 @@ instructions for other platforms, and just in general, we recommend you see [Ras
```

* With automatic download from github
* Or with automatic download from GitHub :
1. Copy [pico_sdk_import.cmake](https://github.com/raspberrypi/pico-sdk/blob/master/external/pico_sdk_import.cmake)
from the SDK into your project directory
1. Setup a `CMakeLists.txt` like:
Expand All @@ -110,16 +110,7 @@ instructions for other platforms, and just in general, we recommend you see [Ras
```

3. Setup a CMake build directory.
For example, if not using an IDE:
```
$ mkdir build
$ cd build
$ cmake ..
```

4. Write your code (see [pico-examples](https://github.com/raspberrypi/pico-examples) or the [Raspberry Pi Pico C/C++ SDK](https://rptl.io/pico-c-sdk) documentation
for more information)
1. Write your code (see [pico-examples](https://github.com/raspberrypi/pico-examples) or the [Raspberry Pi Pico C/C++ SDK](https://rptl.io/pico-c-sdk) documentation for more information)

About the simplest you can do is a single source file (e.g. hello_world.c)

Expand Down Expand Up @@ -151,10 +142,17 @@ for more information)
if you want to use the default USB see the [hello-usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example.


5. Make your target from the build directory you created.
1. Setup a CMake build directory.
For example, if not using an IDE:
```
$ mkdir build
$ cd build
$ cmake ..
```

1. Make your target from the build directory you created.
```sh
$ make hello_world
```

6. You now have `hello_world.elf` to load via a debugger, or `hello_world.uf2` that can be installed and
run on your Raspberry Pi Pico via drag and drop.
1. You now have `hello_world.elf` to load via a debugger, or `hello_world.uf2` that can be installed and run on your Raspberry Pi Pico via drag and drop.
7 changes: 3 additions & 4 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PROJECT_NAME = "Raspberry Pi Pico SDK"
PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
PROJECT_NAME = "Raspberry Pi Pico SDK"
PROJECT_BRIEF = "Raspberry Pi Pico SDK documentation"
PROJECT_NUMBER = @PICO_SDK_VERSION_STRING@

#STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@
STRIP_FROM_PATH = @DOXY_INPUT_DIRS@
Expand All @@ -20,8 +21,6 @@ LAYOUT_FILE = @PROJECT_SOURCE_DIR@/docs/DoxygenLayout.xml
HTML_FOOTER = @PROJECT_SOURCE_DIR@/docs/footer.html
HTML_HEADER = @PROJECT_SOURCE_DIR@/docs/header.html

PROJECT_BRIEF = "Raspberry Pi Pico SDK documentation"
PROJECT_NUMBER = 1.0
OPTIMIZE_OUTPUT_FOR_C = YES
# HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/docs/customdoxygen.css
HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/docs/normalise.css @PROJECT_SOURCE_DIR@/docs/main.css @PROJECT_SOURCE_DIR@/docs/styles.css
Expand Down
14 changes: 7 additions & 7 deletions docs/DoxygenLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
<tab type="user" url="https://rptl.io/pico-c-sdk" visible="yes" title="Raspberry Pi Pico C/C++ SDK" intro=""/>
<tab type="user" url="https://rptl.io/pico-micropython" visible="yes" title="Raspberry Pi Pico Python SDK" intro=""/>
<tab type="user" url="https://rptl.io/pico-get-started" visible="yes" title="Getting started with Raspberry Pi Pico" intro=""/>
<tab type="user" url="https://rptl.io/pico-faq" visible="yes" title="Raspberry Pi Pico FAQ" intro=""/>
</tab>
<tab type="usergroup" url="@ref weblinks_page" visible="yes" title="Web" intro="useful weblinks">
<tab type="user" url="https://www.raspberrypi.org/" visible="yes" title="Raspberry Pi Site" intro=""/>
<tab type="user" url="https://rptl.io/rp2040-get-started" visible="yes" title="Raspberry Pi Pico Page" intro=""/>
<tab type="user" url="https://www.raspberrypi.org/forums" visible="yes" title="Raspberry Pi Forums" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-sdk" visible="yes" title="Raspberry Pi Pico SDK on Github" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-examples" visible="yes" title="Pico Examples on Github" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-extras" visible="yes" title="Pico Extras on Github" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-playground" visible="yes" title="Pico Playground on Github" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-bootrom" visible="yes" title="Pico Bootrom on Github" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-sdk" visible="yes" title="Raspberry Pi Pico SDK on GitHub" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-examples" visible="yes" title="Pico Examples on GitHub" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-extras" visible="yes" title="Pico Extras on GitHub" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-playground" visible="yes" title="Pico Playground on GitHub" intro=""/>
<tab type="user" url="https://github.com/raspberrypi/pico-bootrom" visible="yes" title="Pico Bootrom on GitHub" intro=""/>
</tab>
<tab type="pages" visible="no" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
Expand Down Expand Up @@ -146,8 +147,7 @@
</namespace>

<!-- Layout definition for a file page -->
<file> <tab type="modules" visible="yes" title="Libraries" intro="Here is a list of all the libraries supported in the Raspberry Pi Pico SDK"/>

<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
Expand Down
3 changes: 3 additions & 0 deletions docs/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@

<div class="logo">
<a href="$relpath^index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
<span style="display: inline-block; margin-top: 10px;">
v$projectnumber
</span>
</div>


Expand Down
4 changes: 3 additions & 1 deletion docs/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
* @{
* \defgroup boot_stage2 boot_stage2
* \defgroup pico_base pico_base
* \defgroup pico_binary_info pico_binary_info
* \defgroup pico_bit_ops pico_bit_ops
* \defgroup pico_bootrom pico_bootrom
* \defgroup pico_bootsel_via_double_reset pico_bootsel_via_double_reset
* \defgroup pico_cxx_options pico_cxx_options
* \defgroup pico_divider pico_divider
* \defgroup pico_double pico_double
Expand All @@ -84,4 +86,4 @@
* \defgroup boot_picoboot boot_picoboot
* \defgroup boot_uf2 boot_uf2
* @}
*/
*/
8 changes: 6 additions & 2 deletions docs/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body {
}

h1, h2, h3, h4, h5, h6, p, a, li, span, blockquote, input, textarea, select, label {
font-family: 'Roboto', sans-serif !important;
font-family: 'Roboto', sans-serif;
}

p {
Expand Down Expand Up @@ -97,5 +97,9 @@ a {
display: none !important;
}


div.line,
div.line a,
div.line span {
font-family: monospace;
}

8 changes: 4 additions & 4 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
}
#MSearchSelectWindow {
position: fixed;
top: 145px !important;
left: 35px !important;
top: 178px !important;
left: 49px !important;
border: solid 1px #d4d4d4;
border-radius: 0;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.25);
Expand All @@ -118,8 +118,8 @@
}
#MSearchResultsWindow {
position: fixed;
top: 145px !important;
left: 35px !important;
top: 178px !important;
left: 49px !important;
border: solid 1px #d4d4d4;
border-radius: 0;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.25);
Expand Down
11 changes: 6 additions & 5 deletions docs/weblinks_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
The full documentation for the RP2040 and Raspberry Pi Pico board can be found at the following links

- [RP2040 Datasheet](https://rptl.io/rp2040-datasheet)
- [Raspberry Pi Pico datasheet](https://rptl.io/pico-datasheet)
- [Hardware Design with the RP2040](https://rptl.io/rp2040-design)
- [Raspberry Pi Pico Datasheet](https://rptl.io/pico-datasheet)
- [Hardware design with the RP2040](https://rptl.io/rp2040-design)
- [Raspberry Pi Pico C/C++ SDK](https://rptl.io/pico-c-sdk)
- [Raspberry Pi Pico Python SDK](https://rptl.io/pico-micropython)
- [Getting Started with Raspberry Pi Pico](https://rptl.io/pico-get-started)
- [Getting started with Raspberry Pi Pico](https://rptl.io/pico-get-started)
- [Raspberry Pi Pico FAQ](https://rptl.io/pico-faq)

### Weblinks

Expand All @@ -19,9 +20,9 @@ For the main Raspberry Pi website, [see here](https://www.raspberrypi.org)

For the Raspberry Pi Pico page, [see here](https://rptl.io/rp2040-get-started)

### Github
### GitHub

All the source code for the Raspberry Pi Pico SDK, examples and other libraries can be found on Github.
All the source code for the Raspberry Pi Pico SDK, examples and other libraries can be found on GitHub.

- [Raspberry Pi Pico SDK](https://github.com/raspberrypi/pico-sdk)
- [Pico Examples](https://github.com/raspberrypi/pico-examples)
Expand Down
2 changes: 1 addition & 1 deletion lib/tinyusb
4 changes: 2 additions & 2 deletions pico_sdk_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set(PICO_SDK_VERSION_MAJOR 1)
# PICO_BUILD_DEFINE: PICO_SDK_VERSION_MINOR, SDK minor version number, type=int, pico_base
# PICO_CONFIG: PICO_SDK_VERSION_MINOR, SDK minor version number, type=int, pico_base
set(PICO_SDK_VERSION_MINOR 0)
set(PICO_SDK_VERSION_MINOR 1)
# PICO_BUILD_DEFINE: PICO_SDK_VERSION_REVISION, SDK version revision, type=int, pico_base
# PICO_CONFIG: PICO_SDK_VERSION_REVISION, SDK version revision, type=int, pico_base
set(PICO_SDK_VERSION_REVISION 1)
set(PICO_SDK_VERSION_REVISION 0)
# PICO_BUILD_DEFINE: PICO_SDK_VERSION_STRING, SDK version, type=string, group=pico_base
# PICO_CONFIG: PICO_SDK_VERSION_STRING, SDK version, type=string, group=pico_base
set(PICO_SDK_VERSION_STRING "${PICO_SDK_VERSION_MAJOR}.${PICO_SDK_VERSION_MINOR}.${PICO_SDK_VERSION_REVISION}")
88 changes: 88 additions & 0 deletions src/boards/include/boards/adafruit_feather_rp2040.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

// -----------------------------------------------------
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
// -----------------------------------------------------

#ifndef _BOARDS_ADAFRUIT_FEATHER_RP2040_H
#define _BOARDS_ADAFRUIT_FEATHER_RP2040_H

// For board detection
#define ADAFRUIT_FEATHER_RP2040

//------------- UART -------------//
#ifndef PICO_DEFAULT_UART
#define PICO_DEFAULT_UART 0
#endif

#ifndef PICO_DEFAULT_UART_TX_PIN
#define PICO_DEFAULT_UART_TX_PIN 0
#endif

#ifndef PICO_DEFAULT_UART_RX_PIN
#define PICO_DEFAULT_UART_RX_PIN 1
#endif

//------------- LED -------------//
#ifndef PICO_DEFAULT_LED_PIN
#define PICO_DEFAULT_LED_PIN 13
#endif

#ifndef PICO_DEFAULT_WS2812_PIN
#define PICO_DEFAULT_WS2812_PIN 16
#endif

//------------- I2C -------------//
#ifndef PICO_DEFAULT_I2C
#define PICO_DEFAULT_I2C 0
#endif

#ifndef PICO_DEFAULT_I2C_SDA_PIN
#define PICO_DEFAULT_I2C_SDA_PIN 2
#endif

#ifndef PICO_DEFAULT_I2C_SCL_PIN
#define PICO_DEFAULT_I2C_SCL_PIN 3
#endif

//------------- SPI -------------//
#ifndef PICO_DEFAULT_SPI
#define PICO_DEFAULT_SPI 0
#endif

#ifndef PICO_DEFAULT_SPI_TX_PIN
#define PICO_DEFAULT_SPI_TX_PIN 19
#endif

#ifndef PICO_DEFAULT_SPI_RX_PIN
#define PICO_DEFAULT_SPI_RX_PIN 20
#endif

#ifndef PICO_DEFAULT_SPI_SCK_PIN
#define PICO_DEFAULT_SPI_SCK_PIN 18
#endif

//------------- FLASH -------------//
#ifndef PICO_FLASH_SPI_CLKDIV
#define PICO_FLASH_SPI_CLKDIV 2
#endif

#ifndef PICO_FLASH_SIZE_BYTES
#define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
#endif

// All boards have B1 RP2040
#ifndef PICO_FLOAT_SUPPORT_ROM_V1
#define PICO_FLOAT_SUPPORT_ROM_V1 0
#endif

#ifndef PICO_DOUBLE_SUPPORT_ROM_V1
#define PICO_DOUBLE_SUPPORT_ROM_V1 0
#endif

#endif
Loading

0 comments on commit fc10a97

Please sign in to comment.