parent
a04e4ca9ac
commit
12078447a2
1551 changed files with 370972 additions and 1 deletions
@ -1 +0,0 @@ |
||||
Subproject commit 2062372d203b372849d573f252cf7c6dc2800c0a |
@ -0,0 +1,56 @@ |
||||
cmake_minimum_required(VERSION 3.13) |
||||
|
||||
# Note: this CMakeLists.txt can be used as a top-level CMakeLists.txt for the SDK itself. For all other uses |
||||
# it is included as a subdirectory via the pico_sdk_init() method provided by pico_sdk_init.cmake |
||||
if (NOT TARGET _pico_sdk_inclusion_marker) |
||||
add_library(_pico_sdk_inclusion_marker INTERFACE) |
||||
# This is a no-op unless we are the top-level CMakeLists.txt |
||||
include(pico_sdk_init.cmake) |
||||
|
||||
project(pico_sdk C CXX ASM) |
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") |
||||
if (PICO_DEOPTIMIZED_DEBUG) |
||||
message("Using fully de-optimized debug build (set PICO_DEOPTIMIZED_DEBUG=0 to optimize)") |
||||
else() |
||||
message("Using regular optimized debug build (set PICO_DEOPTIMIZED_DEBUG=1 to de-optimize)") |
||||
endif() |
||||
endif() |
||||
|
||||
pico_is_top_level_project(PICO_SDK_TOP_LEVEL_PROJECT) |
||||
|
||||
set(CMAKE_C_STANDARD 11) |
||||
set(CMAKE_CXX_STANDARD 11) |
||||
|
||||
if (NOT PICO_SDK_TOP_LEVEL_PROJECT) |
||||
set(PICO_SDK 1 PARENT_SCOPE) |
||||
endif() |
||||
|
||||
# allow customization |
||||
add_sub_list_dirs(PICO_SDK_PRE_LIST_DIRS) |
||||
add_sub_list_files(PICO_SDK_PRE_LIST_FILES) |
||||
|
||||
add_subdirectory(tools) |
||||
add_subdirectory(src) |
||||
|
||||
# allow customization |
||||
add_sub_list_dirs(PICO_SDK_POST_LIST_DIRS) |
||||
add_sub_list_files(PICO_SDK_POST_LIST_FILES) |
||||
|
||||
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") |
||||
|
||||
# add docs at the end, as we gather documentation dirs as we go |
||||
add_subdirectory(docs) |
||||
|
||||
if (NOT PICO_SDK_TOP_LEVEL_PROJECT) |
||||
pico_promote_common_scope_vars() |
||||
endif() |
||||
endif() |
||||
|
@ -0,0 +1,25 @@ |
||||
# Contributing to Raspberry Pi Pico C/C++ SDK |
||||
|
||||
## How to Report a Bug |
||||
|
||||
We use GitHub to host code, track [issues](https://github.com/raspberrypi/pico-sdk/issues) and feature requests, and to accept [pull requests](https://github.com/raspberrypi/pico-sdk/pulls). If you find think you have found a bug in the SDK please report it by [opening a new issue](https://github.com/raspberrypi/pico-sdk/issues/new). Please include as much detail as possible, and ideally some code to reproduce the problem. |
||||
|
||||
## How to Contribute Code |
||||
|
||||
In order to contribute new or updated code, you must first create a GitHub account and fork the original repository to your own account. You can make changes, save them in your repository, then [make a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) against this repository. The pull request will appear [in the repository](https://github.com/raspberrypi/pico-sdk/pulls) where it can be assessed by the maintainers, and if appropriate, merged with the official repository. |
||||
|
||||
**NOTE:** Development takes place on the `develop` branch in this repository. Please open your https://github.com/raspberrypi/pico-sdk/pulls[pull request] (PR) against the [`develop`](https://github.com/raspberrypi/pico-sdk/tree/develop) branch, pull requests against the `master` branch will automatically CI fail checks and will not be accepted. You will be asked to rebase your PR against `develop` and if you do not do so, your PR will be closed. |
||||
|
||||
While we are happy to take contributions, big or small, changes in the SDK may have knock-on effects in other places so it is possible that apparently benign pull requests that make seemingly small changes could be refused. |
||||
|
||||
### Code Style |
||||
|
||||
If you are contributing new or updated code please match the existing code style, particularly: |
||||
|
||||
* Use 4 spaces for indentation rather than tabs. |
||||
* Braces are required for everything except single line `if` statements. |
||||
* Opening braces should not be placed on a new line. |
||||
|
||||
### Licensing |
||||
|
||||
Code in this repository is lisensed under the [BSD-3 License](LICENSE.TXT). By contributing content to this repository you are agreeing to place your contributions under this licence. |
@ -0,0 +1,21 @@ |
||||
Copyright 2020 (c) 2020 Raspberry Pi (Trading) Ltd. |
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the |
||||
following conditions are met: |
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following |
||||
disclaimer. |
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following |
||||
disclaimer in the documentation and/or other materials provided with the distribution. |
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products |
||||
derived from this software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@ -0,0 +1,158 @@ |
||||
# Raspberry Pi Pico SDK |
||||
|
||||
The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system |
||||
necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico |
||||
in C, C++ or assembly language. |
||||
|
||||
The SDK is designed to provide an API and programming environment that is familiar both to non-embedded C developers and embedded C developers alike. |
||||
A single program runs on the device at a time and starts with a conventional `main()` method. Standard C/C++ libraries are supported along with |
||||
C level libraries/APIs for accessing all of the RP2040's hardware include PIO (Programmable IO). |
||||
|
||||
Additionally the SDK provides higher level libraries for dealing with timers, synchronization, USB (TinyUSB) and multi-core programming |
||||
along with various utilities. |
||||
|
||||
The SDK can be used to build anything from simple applications, to fully fledged runtime environments such as MicroPython, to low level software |
||||
such as RP2040's on-chip bootrom itself. |
||||
|
||||
Additional libraries/APIs that are not yet ready for inclusion in the SDK can be found in [pico-extras](https://github.com/raspberrypi/pico-extras). |
||||
|
||||
# Documentation |
||||
|
||||
See [Getting Started with the Raspberry Pi Pico](https://rptl.io/pico-get-started) for information on how to setup your |
||||
hardware, IDE/environment and for how to build and debug software for the Raspberry Pi Pico |
||||
and other RP2040-based devices. |
||||
|
||||
See [Raspberry Pi Pico C/C++ SDK](https://rptl.io/pico-c-sdk) to learn more about programming using the |
||||
SDK, to explore more advanced features, and for complete PDF-based API documentation. |
||||
|
||||
See [Online Raspberry Pi Pico SDK API docs](https://rptl.io/pico-doxygen) for HTML-based API documentation. |
||||
|
||||
# Example code |
||||
|
||||
See [pico-examples](https://github.com/raspberrypi/pico-examples) for example code you can build. |
||||
|
||||
# Quick-start your own project |
||||
|
||||
These instructions are extremely terse, and Linux-based only. For detailed steps, |
||||
instructions for other platforms, and just in general, we recommend you see [Raspberry Pi Pico C/C++ SDK](https://rptl.io/pico-c-sdk) |
||||
|
||||
1. Install CMake (at least version 3.13), and GCC cross compiler |
||||
``` |
||||
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib |
||||
``` |
||||
1. Set up your project to point to use the Raspberry Pi Pico SDK |
||||
|
||||
* 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 |
||||
2. Set `PICO_SDK_PATH` to the SDK location in your environment, or pass it (`-DPICO_SDK_PATH=`) to cmake later. |
||||
3. Setup a `CMakeLists.txt` like: |
||||
|
||||
```cmake |
||||
cmake_minimum_required(VERSION 3.13) |
||||
|
||||
# initialize the SDK based on PICO_SDK_PATH |
||||
# note: this must happen before project() |
||||
include(pico_sdk_import.cmake) |
||||
|
||||
project(my_project) |
||||
|
||||
# initialize the Raspberry Pi Pico SDK |
||||
pico_sdk_init() |
||||
|
||||
# rest of your project |
||||
|
||||
``` |
||||
|
||||
* 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: |
||||
|
||||
```cmake |
||||
cmake_minimum_required(VERSION 3.13) |
||||
|
||||
# initialize pico-sdk from submodule |
||||
# note: this must happen before project() |
||||
include(pico-sdk/pico_sdk_init.cmake) |
||||
|
||||
project(my_project) |
||||
|
||||
# initialize the Raspberry Pi Pico SDK |
||||
pico_sdk_init() |
||||
|
||||
# rest of your project |
||||
|
||||
``` |
||||
|
||||
* 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: |
||||
|
||||
```cmake |
||||
cmake_minimum_required(VERSION 3.13) |
||||
|
||||
# initialize pico-sdk from GIT |
||||
# (note this can come from environment, CMake cache etc) |
||||
set(PICO_SDK_FETCH_FROM_GIT on) |
||||
|
||||
# pico_sdk_import.cmake is a single file copied from this SDK |
||||
# note: this must happen before project() |
||||
include(pico_sdk_import.cmake) |
||||
|
||||
project(my_project) |
||||
|
||||
# initialize the Raspberry Pi Pico SDK |
||||
pico_sdk_init() |
||||
|
||||
# rest of your project |
||||
|
||||
``` |
||||
|
||||
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) |
||||
|
||||
```c |
||||
#include <stdio.h> |
||||
#include "pico/stdlib.h" |
||||
|
||||
int main() { |
||||
setup_default_uart(); |
||||
printf("Hello, world!\n"); |
||||
return 0; |
||||
} |
||||
``` |
||||
And add the following to your `CMakeLists.txt`: |
||||
|
||||
```cmake |
||||
add_executable(hello_world |
||||
hello_world.c |
||||
) |
||||
|
||||
# Add pico_stdlib library which aggregates commonly used features |
||||
target_link_libraries(hello_world pico_stdlib) |
||||
|
||||
# create map/bin/hex/uf2 file in addition to ELF. |
||||
pico_add_extra_outputs(hello_world) |
||||
``` |
||||
|
||||
Note this example uses the default UART for _stdout_; |
||||
if you want to use the default USB see the [hello-usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example. |
||||
|
||||
|
||||
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 |
||||
``` |
||||
|
||||
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. |
@ -0,0 +1,4 @@ |
||||
# this is included because toolchain file sets SYSTEM_NAME=PICO |
||||
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) |
||||
set(CMAKE_EXECUTABLE_SUFFIX .elf) |
@ -0,0 +1,29 @@ |
||||
# PICO_CMAKE_CONFIG: PICO_PLATFORM, platform to build for e.g. rp2040/host, default=rp2040 or environment value, group=build |
||||
if (DEFINED ENV{PICO_PLATFORM} AND (NOT PICO_PLATFORM)) |
||||
set(PICO_PLATFORM $ENV{PICO_PLATFORM}) |
||||
message("Using PICO_PLATFORM from environment ('${PICO_PLATFORM}')") |
||||
else() |
||||
if (NOT PICO_PLATFORM) |
||||
set(PICO_PLATFORM "rp2040") |
||||
pico_message("Defaulting PICO_PLATFORM to ${PICO_PLATFORM} since not specified.") |
||||
else() |
||||
message("PICO platform is ${PICO_PLATFORM}.") |
||||
endif() |
||||
endif () |
||||
|
||||
set(PICO_PLATFORM ${PICO_PLATFORM} CACHE STRING "PICO Build platform (e.g. rp2040, host)") |
||||
|
||||
# PICO_CMAKE_CONFIG: PICO_CMAKE_RELOAD_PLATFORM_FILE, custom CMake file to use to set up the platform environment, default=none, group=build |
||||
set(PICO_CMAKE_PRELOAD_PLATFORM_FILE "" CACHE INTERNAL "") |
||||
set(PICO_CMAKE_PRELOAD_PLATFORM_DIR "${CMAKE_CURRENT_LIST_DIR}/preload/platforms" CACHE INTERNAL "") |
||||
|
||||
if (NOT PICO_CMAKE_PRELOAD_PLATFORM_FILE) |
||||
set(PICO_CMAKE_PRELOAD_PLATFORM_FILE ${PICO_CMAKE_PRELOAD_PLATFORM_DIR}/${PICO_PLATFORM}.cmake CACHE INTERNAL "") |
||||
endif () |
||||
|
||||
if (NOT EXISTS "${PICO_CMAKE_PRELOAD_PLATFORM_FILE}") |
||||
message(FATAL_ERROR "${PICO_CMAKE_PRELOAD_PLATFORM_FILE} does not exist. \ |
||||
Either specify a valid PICO_PLATFORM (or PICO_CMAKE_PRELOAD_PLATFORM_FILE).") |
||||
endif () |
||||
|
||||
include(${PICO_CMAKE_PRELOAD_PLATFORM_FILE}) |
@ -0,0 +1,43 @@ |
||||
# PICO_CMAKE_CONFIG: PICO_TOOLCHAIN_PATH, Path to search for compiler, default=none (i.e. search system paths), group=build |
||||
set(PICO_TOOLCHAIN_PATH "${PICO_TOOLCHAIN_PATH}" CACHE INTERNAL "") |
||||
|
||||
# Set a default build type if none was specified |
||||
set(default_build_type "Release") |
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) |
||||
message(STATUS "Defaulting build type to '${default_build_type}' since not specified.") |
||||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build, options are: 'Debug', 'Release', 'MinSizeRel', 'RelWithDebInfo'." FORCE) |
||||
# Set the possible values of build type for cmake-gui |
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS |
||||
"Debug" "Release" "MinSizeRel" "RelWithDebInfo") |
||||
endif() |
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Default") |
||||
error("Default build type is NOT supported") |
||||
endif() |
||||
|
||||
# PICO_CMAKE_CONFIG: PICO_COMPILER, Optionally specifies a different compiler (other than pico_arm_gcc.cmake) - this is not yet fully supported, default=none, group=build |
||||
# If PICO_COMPILER is specified, set toolchain file to ${PICO_COMPILER}.cmake. |
||||
if (DEFINED PICO_COMPILER) |
||||
if (DEFINED CMAKE_TOOLCHAIN_FILE) |
||||
get_filename_component(toolchain "${CMAKE_TOOLCHAIN_FILE}" NAME_WE) |
||||
if (NOT "${PICO_COMPILER}" STREQUAL "${toolchain}") |
||||
message(WARNING "CMAKE_TOOLCHAIN_FILE is already defined to ${toolchain}.cmake, you\ |
||||
need to delete cache and reconfigure if you want to switch compiler.") |
||||
endif () |
||||
else () |
||||
set(toolchain_dir "${CMAKE_CURRENT_LIST_DIR}/preload/toolchains") |
||||
set(toolchain_file "${toolchain_dir}/${PICO_COMPILER}.cmake") |
||||
if (EXISTS "${toolchain_file}") |
||||
set(CMAKE_TOOLCHAIN_FILE "${toolchain_file}" CACHE INTERNAL "") |
||||
else () |
||||
# todo improve message |
||||
message(FATAL_ERROR "Toolchain file \"${PICO_COMPILER}.cmake\" does not exist, please\ |
||||
select one from \"cmake/toolchains\" folder.") |
||||
endif () |
||||
endif () |
||||
message("PICO compiler is ${PICO_COMPILER}") |
||||
endif () |
||||
|
||||
unset(PICO_COMPILER CACHE) |
||||
|
@ -0,0 +1,28 @@ |
||||
function(pico_message param) |
||||
if (${ARGC} EQUAL 1) |
||||
message("${param}") |
||||
return() |
||||
endif () |
||||
|
||||
if (NOT ${ARGC} EQUAL 2) |
||||
message(FATAL_ERROR "Expect at most 2 arguments") |
||||
endif () |
||||
message("${param}" "${ARGV1}") |
||||
endfunction() |
||||
|
||||
macro(assert VAR MSG) |
||||
if (NOT ${VAR}) |
||||
message(FATAL_ERROR "${MSG}") |
||||
endif () |
||||
endmacro() |
||||
|
||||
function(pico_find_in_paths OUT PATHS NAME) |
||||
foreach(PATH IN LISTS ${PATHS}) |
||||
if (EXISTS ${PATH}/${NAME}) |
||||
get_filename_component(FULLNAME ${PATH}/${NAME} ABSOLUTE) |
||||
set(${OUT} ${FULLNAME} PARENT_SCOPE) |
||||
return() |
||||
endif() |
||||
endforeach() |
||||
set(${OUT} "" PARENT_SCOPE) |
||||
endfunction() |
@ -0,0 +1,7 @@ |
||||
if (NOT (DEFINED PICO_COMPILER OR DEFINED CMAKE_TOOLCHAIN_FILE)) |
||||
pico_message("Defaulting PICO platform compiler to pico_arm_gcc since not specified.") |
||||
set(PICO_COMPILER "pico_arm_gcc") |
||||
endif () |
||||
|
||||
|
||||
|
@ -0,0 +1 @@ |
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico/pico.cmake) |
@ -0,0 +1,31 @@ |
||||
# Toolchain file is processed multiple times, however, it cannot access CMake cache on some runs. |
||||
# We store the search path in an environment variable so that we can always access it. |
||||
if (NOT "${PICO_TOOLCHAIN_PATH}" STREQUAL "") |
||||
set(ENV{PICO_TOOLCHAIN_PATH} "${PICO_TOOLCHAIN_PATH}") |
||||
endif () |
||||
|
||||
# Find the compiler executable and store its path in a cache entry ${compiler_path}. |
||||
# If not found, issue a fatal message and stop processing. PICO_TOOLCHAIN_PATH can be provided from |
||||
# commandline as additional search path. |
||||
function(pico_find_compiler compiler_path compiler_exe) |
||||
# Search user provided path first. |
||||
find_program( |
||||
${compiler_path} ${compiler_exe} |
||||
PATHS ENV PICO_TOOLCHAIN_PATH |
||||
PATH_SUFFIXES bin |
||||
NO_DEFAULT_PATH |
||||
) |
||||
|
||||
# If not then search system paths. |
||||
if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND") |
||||
if (DEFINED ENV{PICO_TOOLCHAIN_PATH}) |
||||
message(WARNING "PICO_TOOLCHAIN_PATH specified ($ENV{PICO_TOOLCHAIN_PATH}), but ${compiler_exe} not found there") |
||||
endif() |
||||
find_program(${compiler_path} ${compiler_exe}) |
||||
endif () |
||||
if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND") |
||||
set(PICO_TOOLCHAIN_PATH "" CACHE PATH "Path to search for compiler.") |
||||
message(FATAL_ERROR "Compiler '${compiler_exe}' not found, you can specify search path with\ |
||||
\"PICO_TOOLCHAIN_PATH\".") |
||||
endif () |
||||
endfunction() |
@ -0,0 +1,53 @@ |
||||
# NOTE: THIS IS A WIP ONLY PICO_ARM_GCC IS CURRENTLY SUPPORTED |
||||
# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform |
||||
# i.e. CMake<Lang>Information and whatnot |
||||
include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) |
||||
|
||||
# include our Platform/pico.cmake |
||||
set(CMAKE_SYSTEM_NAME PICO) |
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) |
||||
|
||||
# Find CLANG |
||||
pico_find_compiler(PICO_COMPILER_CC clang) |
||||
pico_find_compiler(PICO_COMPILER_CXX clang) |
||||
#pico_find_compiler(PICO_COMPILER_ASM armasm) |
||||
set(PICO_COMPILER_ASM "${PICO_COMPILER_CC}" CACHE INTERNAL "") |
||||
pico_find_compiler(PICO_OBJCOPY llvm-objcopy) |
||||
pico_find_compiler(PICO_OBJDUMP llvm-objdump) |
||||
|
||||
# Specify the cross compiler. |
||||
set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") |
||||
set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") |
||||
set(CMAKE_C_OUTPUT_EXTENSION .o) |
||||
|
||||
# todo should we be including CMakeASMInformation anyway - i guess that is host side |
||||
set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") |
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") |
||||
set(CMAKE_INCLUDE_FLAG_ASM "-I") |
||||
set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") |
||||
set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") |
||||
|
||||
# Disable compiler checks. |
||||
set(CMAKE_C_COMPILER_FORCED TRUE) |
||||
set(CMAKE_CXX_COMPILER_FORCED TRUE) |
||||
|
||||
# Add target system root to cmake find path. |
||||
get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) |
||||
get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) |
||||
|
||||
# Look for includes and libraries only in the target system prefix. |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
||||
include_directories(/usr/include/newlib) |
||||
|
||||
# todo move to platform/Generix-xxx |
||||
set(ARM_CLANG_COMMON_FLAGS " --target=arm-none-eabi -mcpu=cortex-m0plus -mthumb") |
||||
set(CMAKE_C_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
set(CMAKE_CXX_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
set(CMAKE_ASM_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
set(CMAKE_C_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") |
||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") |
||||
|
@ -0,0 +1,52 @@ |
||||
# NOTE: THIS IS A WIP ONLY PICO_ARM_GCC IS CURRENTLY SUPPORTED |
||||
# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform |
||||
# i.e. CMake<Lang>Information and whatnot |
||||
include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) |
||||
|
||||
# include our Platform/PICO.cmake |
||||
set(CMAKE_SYSTEM_NAME PICO) |
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) |
||||
|
||||
# Find ARMClang. |
||||
pico_find_compiler(PICO_COMPILER_CC armclang) |
||||
pico_find_compiler(PICO_COMPILER_CXX armclang) |
||||
pico_find_compiler(PICO_COMPILER_ASM armasm) |
||||
set(PICO_COMPILER_ASM "${PICO_COMPILER_ASM}" CACHE INTERNAL "") |
||||
pico_find_compiler(PICO_OBJCOPY llvm-objcopy) |
||||
pico_find_compiler(PICO_OBJDUMP llvm-objdump) |
||||
|
||||
# Specify the cross compiler. |
||||
set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") |
||||
set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") |
||||
set(CMAKE_C_OUTPUT_EXTENSION .o) |
||||
|
||||
# todo should we be including CMakeASMInformation anyway - i guess that is host side |
||||
set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") |
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") |
||||
set(CMAKE_INCLUDE_FLAG_ASM "-I") |
||||
set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") |
||||
set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") |
||||
|
||||
# Disable compiler checks. |
||||
set(CMAKE_C_COMPILER_FORCED TRUE) |
||||
set(CMAKE_CXX_COMPILER_FORCED TRUE) |
||||
|
||||
# Add target system root to cmake find path. |
||||
get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) |
||||
get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) |
||||
|
||||
# Look for includes and libraries only in the target system prefix. |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
||||
# todo move to platform/Generix-xxx |
||||
set(ARM_CLANG_COMMON_FLAGS " --cpu=Cortex-M0plus") |
||||
string(APPEND CMAKE_C_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
string(APPEND CMAKE_CXX_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
string(APPEND CMAKE_ASM_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") |
||||
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") |
||||
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") |
||||
|
||||
|
@ -0,0 +1,67 @@ |
||||
# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform |
||||
# i.e. CMake<Lang>Information and whatnot |
||||
include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) |
||||
|
||||
# include our Platform/PICO.cmake |
||||
set(CMAKE_SYSTEM_NAME PICO) |
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) |
||||
|
||||
if (NOT PICO_GCC_TRIPLE) |
||||
if (DEFINED ENV{PICO_GCC_TRIPLE}) |
||||
set(PICO_GCC_TRIPLE $ENV{PICO_GCC_TRIPLE}) |
||||
message("PICO_GCC_TRIPLE set from environment: $ENV{PICO_GCC_TRIPLE}") |
||||
else() |
||||
set(PICO_GCC_TRIPLE arm-none-eabi) |
||||
#pico_message_debug("PICO_GCC_TRIPLE defaulted to arm-none-eabi") |
||||
endif() |
||||
endif() |
||||
|
||||
# Find GCC for ARM. |
||||
pico_find_compiler(PICO_COMPILER_CC ${PICO_GCC_TRIPLE}-gcc) |
||||
pico_find_compiler(PICO_COMPILER_CXX ${PICO_GCC_TRIPLE}-g++) |
||||
set(PICO_COMPILER_ASM "${PICO_COMPILER_CC}" CACHE INTERNAL "") |
||||
pico_find_compiler(PICO_OBJCOPY ${PICO_GCC_TRIPLE}-objcopy) |
||||
pico_find_compiler(PICO_OBJDUMP ${PICO_GCC_TRIPLE}-objdump) |
||||
|
||||
# Specify the cross compiler. |
||||
set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") |
||||
set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") |
||||
set(CMAKE_C_OUTPUT_EXTENSION .o) |
||||
|
||||
# todo should we be including CMakeASMInformation anyway - i guess that is host side |
||||
set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") |
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") |
||||
set(CMAKE_INCLUDE_FLAG_ASM "-I") |
||||
set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") |
||||
set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") |
||||
|
||||
# Disable compiler checks. |
||||
set(CMAKE_C_COMPILER_FORCED TRUE) |
||||
set(CMAKE_CXX_COMPILER_FORCED TRUE) |
||||
|
||||
# Add target system root to cmake find path. |
||||
get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) |
||||
get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) |
||||
|
||||
# Look for includes and libraries only in the target system prefix. |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
||||
option(PICO_DEOPTIMIZED_DEBUG "Build debug builds with -O0" 0) |
||||
|
||||
# todo move to platform/Generix-xxx |
||||
|
||||
# on ARM -mcpu should not be mixed with -march |
||||
set(ARM_GCC_COMMON_FLAGS " -mcpu=cortex-m0plus -mthumb") |
||||
foreach(LANG IN ITEMS C CXX ASM) |
||||
set(CMAKE_${LANG}_FLAGS_INIT "${ARM_GCC_COMMON_FLAGS}") |
||||
if (PICO_DEOPTIMIZED_DEBUG) |
||||
set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-O0") |
||||
else() |
||||
set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-Og") |
||||
endif() |
||||
set(CMAKE_${LANG}_LINK_FLAGS "-Wl,--build-id=none") |
||||
endforeach() |
||||
|
@ -0,0 +1,59 @@ |
||||
find_package(Doxygen QUIET) |
||||
if (PICO_SDK_TOP_LEVEL_PROJECT AND ${DOXYGEN_FOUND}) |
||||
set(PICO_BUILD_DOCS_DEFAULT 1) |
||||
endif() |
||||
option(PICO_BUILD_DOCS "Build HTML Doxygen docs" ${PICO_BUILD_DOCS_DEFAULT}) |
||||
|
||||
if (DEFINED ENV{PICO_EXAMPLES_PATH} AND NOT PICO_EXAMPLES_PATH) |
||||
set(PICO_EXAMPLES_PATH $ENV{PICO_EXAMPLES_PATH}) |
||||
message("Using PICO_EXAMPLES_PATH from environment ('${PICO_EXAMPLES_PATH}')") |
||||
endif() |
||||
|
||||
if(PICO_BUILD_DOCS) |
||||
if(NOT DOXYGEN_FOUND) |
||||
message(FATAL_ERROR "Doxygen is needed to build the documentation.") |
||||
endif() |
||||
|
||||
include(ExternalProject) |
||||
|
||||
if(PICO_EXAMPLES_PATH) |
||||
get_filename_component(PICO_EXAMPLES_PATH "${PICO_EXAMPLES_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") |
||||
if (EXISTS ${PICO_EXAMPLES_PATH}) |
||||
message("Documentation example code will come from ${PICO_EXAMPLES_PATH}") |
||||
else() |
||||
message(WARNING "Documentation example code configured to come from ${PICO_EXAMPLES_PATH}, but that path does not exist") |
||||
endif() |
||||
add_custom_target(doc-pico-examples) |
||||
else() |
||||
ExternalProject_Add(doc-pico-examples |
||||
GIT_REPOSITORY https://github.com/raspberrypi/pico-examples |
||||
GIT_TAG master |
||||
CONFIGURE_COMMAND "" |
||||
BUILD_COMMAND "" |
||||
INSTALL_COMMAND "" |
||||
) |
||||
ExternalProject_Get_property(doc-pico-examples SOURCE_DIR) |
||||
ExternalProject_Get_property(doc-pico-examples GIT_REPOSITORY) |
||||
ExternalProject_Get_property(doc-pico-examples GIT_TAG) |
||||
set(PICO_EXAMPLES_PATH ${SOURCE_DIR}) |
||||
message("Documentation example code will come from git repo ${GIT_REPOSITORY}, branch ${GIT_TAG}") |
||||
endif() |
||||
|
||||
set(DOXY_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen") |
||||
set(DOXY_INPUT_DIRS "${PICO_DOXYGEN_PATHS}") |
||||
set(DOXY_EXCLUDE_DIRS "${PICO_DOXYGEN_EXCLUDE_PATHS}") |
||||
set(DOXY_EXAMPLE_DIR "${PICO_EXAMPLES_PATH}") |
||||
|
||||
set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) |
||||
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) |
||||
|
||||
configure_file(${doxyfile_in} ${doxyfile} @ONLY) |
||||
|
||||
add_custom_target(docs |
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} |
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
||||
COMMENT "Generating API documentation with Doxygen" |
||||
VERBATIM) |
||||
|
||||
add_dependencies(docs doc-pico-examples) |
||||
endif() |
@ -0,0 +1,63 @@ |
||||
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@ |
||||
# @PROJECT_BINARY_DIR@ |
||||
#INPUT = @doxy_main_page@ \ |
||||
# @PROJECT_SOURCE_DIR@ \ |
||||
# @PROJECT_BINARY_DIR@ |
||||
|
||||
FILE_PATTERNS = *.h \ |
||||
*.cpp \ |
||||
*.c \ |
||||
*.S \ |
||||
*.s \ |
||||
*.md |
||||
|
||||
USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/docs/mainpage.md |
||||
LAYOUT_FILE = @PROJECT_SOURCE_DIR@/docs/DoxygenLayout.xml |
||||
HTML_FOOTER = @PROJECT_SOURCE_DIR@/docs/footer.html |
||||
HTML_HEADER = @PROJECT_SOURCE_DIR@/docs/header.html |
||||
|
||||
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 |
||||
HTML_EXTRA_FILES = @PROJECT_SOURCE_DIR@/docs/logo-mobile.svg @PROJECT_SOURCE_DIR@/docs/logo.svg @PROJECT_SOURCE_DIR@/docs/search.svg \ |
||||
@PROJECT_SOURCE_DIR@/docs/main.js @PROJECT_SOURCE_DIR@/docs/pico.jpg @PROJECT_SOURCE_DIR@/docs/rp2040.png |
||||
GENERATE_TREEVIEW = YES # This is needed as it wraps the content area in an HTML tag that we need to use |
||||
HTML_COLORSTYLE_HUE = 350 |
||||
HTML_COLORSTYLE_SAT = 200 |
||||
HTML_COLORSTYLE_GAMMA = 150 |
||||
GENERATE_LATEX = NO |
||||
GENERATE_XML = YES |
||||
GROUP_GRAPHS = NO |
||||
|
||||
ALIASES += tag=@internal |
||||
ALIASES += end=@internal |
||||
|
||||
OUTPUT_DIRECTORY = @DOXY_OUTPUT_DIR@ |
||||
INPUT = @PROJECT_SOURCE_DIR@/docs/index.h @DOXY_INPUT_DIRS@ @PROJECT_SOURCE_DIR@/docs/ |
||||
|
||||
#EXCLUDE = @DOXY_EXCLUDE_DIRS@ @PROJECT_SOURCE_DIR@/src/rp2040 |
||||
EXCLUDE = @DOXY_EXCLUDE_DIRS@ |
||||
RECURSIVE = YES |
||||
EXAMPLE_PATH = @PICO_EXAMPLES_PATH@ |
||||
|
||||
# This is needed as we have a number of static inline functions that need to be documented. |
||||
EXTRACT_STATIC = YES |
||||
|
||||
EXTRACT_ALL = NO |
||||
ALWAYS_DETAILED_SEC = NO |
||||
#REPEAT_BRIEF = NO |
||||
|
||||
# Need these next options to ensure that functions with modifiers do not confuse the Doxygen parser. |
||||
# And any further function modifiers here. |
||||
MACRO_EXPANSION = YES |
||||
|
||||
PREDEFINED = __not_in_flash_func(x) \ |
||||
__time_critical_func(x) \ |
||||
__not_in_flash(x)= \ |
||||
__no_inline_not_in_flash(x)= \ |
||||
__attribute__(x)= |
@ -0,0 +1,246 @@ |
||||
<doxygenlayout version="1.0"> |
||||
<!-- Generated by doxygen 1.8.17 --> |
||||
<!-- Navigation index tabs for HTML output --> |
||||
<navindex> |
||||
<tab type="mainpage" visible="yes" title="Introduction"></tab> |
||||
<tab type="modules" visible="yes" title="API Documentation" intro="These are the libraries supplied in the Raspberry Pi Pico SDK"/> |
||||
<tab type="user" url="@ref examples_page" visible="yes" title="Examples" intro="Links to SDK examples"/> |
||||
<tab type="usergroup" url="@ref weblinks_page" visible="yes" title="Additional Documentation" intro="Links to datasheets and documentation"> |
||||
<tab type="user" url="https://rptl.io/pico-datasheet" visible="yes" title="Raspberry Pi Pico Datasheet" intro=""/> |
||||
<tab type="user" url="https://rptl.io/rp2040-datasheet" visible="yes" title="RP2040 Datasheet" intro=""/> |
||||
<tab type="user" url="https://rptl.io/rp2040-design" visible="yes" title="Hardware design with RP2040" intro=""/> |
||||
<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.com/" 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://forums.raspberrypi.com/" 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> |
||||
<tab type="pages" visible="no" title="" intro=""/> |
||||
<tab type="namespaces" visible="yes" title=""> |
||||
<tab type="namespacelist" visible="yes" title="" intro=""/> |
||||
<tab type="namespacemembers" visible="yes" title="" intro=""/> |
||||
</tab> |
||||
<tab type="interfaces" visible="yes" title=""> |
||||
<tab type="interfacelist" visible="yes" title="" intro=""/> |
||||
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/> |
||||
<tab type="interfacehierarchy" visible="yes" title="" intro=""/> |
||||
</tab> |
||||
<tab type="classes" visible="no" title=""> |
||||
<tab type="classlist" visible="yes" title="" intro=""/> |
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> |
||||
<tab type="hierarchy" visible="yes" title="" intro=""/> |
||||
<tab type="classmembers" visible="yes" title="" intro=""/> |
||||
</tab> |
||||
<tab type="structs" visible="yes" title=""> |
||||
<tab type="structlist" visible="yes" title="" intro=""/> |
||||
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/> |
||||
</tab> |
||||
<tab type="exceptions" visible="yes" title=""> |
||||
<tab type="exceptionlist" visible="yes" title="" intro=""/> |
||||
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/> |
||||
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/> |
||||
</tab> |
||||
<tab type="files" visible="no" title=""> |
||||
<tab type="filelist" visible="yes" title="" intro=""/> |
||||
<tab type="globals" visible="yes" title="" intro=""/> |
||||
</tab> |
||||
<tab type="examples" visible="yes" title="" intro=""/> |
||||
</navindex> |
||||
|
||||
<!-- Layout definition for a class page --> |
||||
<class> |
||||
<briefdescription visible="yes"/> |
||||
<includes visible="$SHOW_INCLUDE_FILES"/> |
||||
<inheritancegraph visible="$CLASS_GRAPH"/> |
||||
<collaborationgraph visible="$COLLABORATION_GRAPH"/> |
||||
<memberdecl> |
||||
<nestedclasses visible="yes" title=""/> |
||||
<publictypes title=""/> |
||||
<services title=""/> |
||||
<interfaces title=""/> |
||||
<publicslots title=""/> |
||||
<signals title=""/> |
||||
<publicmethods title=""/> |
||||
<publicstaticmethods title=""/> |
||||
<publicattributes title=""/> |
||||
<publicstaticattributes title=""/> |
||||
<protectedtypes title=""/> |
||||
<protectedslots title=""/> |
||||
<protectedmethods title=""/> |
||||
<protectedstaticmethods title=""/> |
||||
<protectedattributes title=""/> |
||||
<protectedstaticattributes title=""/> |
||||
<packagetypes title=""/> |
||||
<packagemethods title=""/> |
||||
<packagestaticmethods title=""/> |
||||
<packageattributes title=""/> |
||||
<packagestaticattributes title=""/> |
||||
<properties title=""/> |
||||
<events title=""/> |
||||
<privatetypes title=""/> |
||||
<privateslots title=""/> |
||||
<privatemethods title=""/> |
||||
<privatestaticmethods title=""/> |
||||
<privateattributes title=""/> |
||||
<privatestaticattributes title=""/> |
||||
<friends title=""/> |
||||
<related title="" subtitle=""/> |
||||
<membergroups visible="yes"/> |
||||
</memberdecl> |
||||
<detaileddescription title=""/> |
||||
<memberdef> |
||||
<inlineclasses title=""/> |
||||
<typedefs title=""/> |
||||
<enums title=""/> |
||||
<services title=""/> |
||||
<interfaces title=""/> |
||||
<constructors title=""/> |
||||
<functions title=""/> |
||||
<related title=""/> |
||||
<variables title=""/> |
||||
<properties title=""/> |
||||
<events title=""/> |
||||
</memberdef> |
||||
<allmemberslink visible="yes"/> |
||||
<usedfiles visible="$SHOW_USED_FILES"/> |
||||
<authorsection visible="yes"/> |
||||
</class> |
||||
|
||||
<!-- Layout definition for a namespace page --> |
||||
<namespace> |
||||
<briefdescription visible="yes"/> |
||||
<memberdecl> |
||||
<nestednamespaces visible="yes" title=""/> |
||||
<constantgroups visible="yes" title=""/> |
||||
<interfaces visible="yes" title=""/> |
||||
<classes visible="yes" title=""/> |
||||
<structs visible="yes" title=""/> |
||||
<exceptions visible="yes" title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
<membergroups visible="yes"/> |
||||
</memberdecl> |
||||
<detaileddescription title=""/> |
||||
<memberdef> |
||||
<inlineclasses title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
</memberdef> |
||||
<authorsection visible="yes"/> |
||||
</namespace> |
||||
|
||||
<!-- Layout definition for a file page --> |
||||
<file> |
||||
<briefdescription visible="yes"/> |
||||
<includes visible="$SHOW_INCLUDE_FILES"/> |
||||
<includegraph visible="$INCLUDE_GRAPH"/> |
||||
<includedbygraph visible="$INCLUDED_BY_GRAPH"/> |
||||
<sourcelink visible="yes"/> |
||||
<memberdecl> |
||||
<interfaces visible="yes" title=""/> |
||||
<classes visible="yes" title=""/> |
||||
<structs visible="yes" title=""/> |
||||
<exceptions visible="yes" title=""/> |
||||
<namespaces visible="yes" title=""/> |
||||
<constantgroups visible="yes" title=""/> |
||||
<defines title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
<membergroups visible="yes"/> |
||||
</memberdecl> |
||||
<detaileddescription title=""/> |
||||
<memberdef> |
||||
<inlineclasses title=""/> |
||||
<defines title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
</memberdef> |
||||
<authorsection/> |
||||
</file> |
||||
|
||||
<!-- Layout definition for a group page --> |
||||
<group> |
||||
<briefdescription visible="yes"/> |
||||
<groupgraph visible="$GROUP_GRAPHS"/> |
||||
<memberdecl> |
||||
<nestedgroups visible="yes" title=""/> |
||||
<dirs visible="yes" title=""/> |
||||
<files visible="yes" title=""/> |
||||
<namespaces visible="yes" title=""/> |
||||
<classes visible="yes" title=""/> |
||||
<defines title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<enumvalues title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
<signals title=""/> |
||||
<publicslots title=""/> |
||||
<protectedslots title=""/> |
||||
<privateslots title=""/> |
||||
<events title=""/> |
||||
<properties title=""/> |
||||
<friends title=""/> |
||||
<membergroups visible="yes"/> |
||||
</memberdecl> |
||||
<detaileddescription title=""/> |
||||
<memberdef> |
||||
<pagedocs/> |
||||
<inlineclasses title=""/> |
||||
<defines title=""/> |
||||
<typedefs title=""/> |
||||
<sequences title=""/> |
||||
<dictionaries title=""/> |
||||
<enums title=""/> |
||||
<enumvalues title=""/> |
||||
<functions title=""/> |
||||
<variables title=""/> |
||||
<signals title=""/> |
||||
<publicslots title=""/> |
||||
<protectedslots title=""/> |
||||
<privateslots title=""/> |
||||
<events title=""/> |
||||
<properties title=""/> |
||||
<friends title=""/> |
||||
</memberdef> |
||||
<authorsection visible="yes"/> |
||||
</group> |
||||
|
||||
<!-- Layout definition for a directory page --> |
||||
<directory> |
||||
<briefdescription visible="yes"/> |
||||
<directorygraph visible="yes"/> |
||||
<memberdecl> |
||||
<dirs visible="yes"/> |
||||
<files visible="yes"/> |
||||
</memberdecl> |
||||
<detaileddescription title=""/> |
||||
</directory> |
||||
</doxygenlayout> |
@ -0,0 +1,21 @@ |
||||
## Examples Index {#examples_page} |
||||
|
||||
This page links to the various example code fragments in this documentation. For more complete examples, please see the [pico-examples](https://github.com/raspberrypi/pico-examples) repository, which contains complete buildable projects. |
||||
|
||||
- [RTC example](@ref rtc_example) |
||||
- [UART example](@ref uart_example) |
||||
- [ADC example](@ref adc_example) |
||||
- [I2C example](@ref i2c_example) |
||||
- [Clock example](@ref clock_example) |
||||
- [Timer example](@ref timer_example) |
||||
- [Flash programming example](@ref flash_example) |
||||
- [Watchdog example](@ref watchdog_example) |
||||
- [Divider example](@ref divider_example) |
||||
- [PWM example](@ref pwm_example) |
||||
- [Multicore example](@ref multicore_example) |
||||
- [Reset example](@ref reset_example) |
||||
|
||||
|
||||
All examples are "Copyright (c) 2020 Raspberry Pi (Trading) Ltd", and are released under a 3-Clause BSD licence. Briefly, this means you are free to use the example code |
||||
as long as you retain the copyright notice. Full details on the licence can be found [here](https://opensource.org/licenses/BSD-3-Clause). |
||||
|
@ -0,0 +1,5 @@ |
||||
|
||||
<script src="main.js"></script> |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,64 @@ |
||||
<!-- HTML header for doxygen 1.8.20--> |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> |
||||
<meta name="generator" content="Doxygen $doxygenversion"/> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
||||
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> |
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> |
||||
|
||||
<!-- <link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/> --> |
||||
<script type="text/javascript" src="$relpath^jquery.js"></script> |
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script> |
||||
$treeview |
||||
$search |
||||
$mathjax |
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet"> |
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" /> |
||||
$extrastylesheet |
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div class="navigation-mobile"> |
||||
<div class="logo--mobile"> |
||||
<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a> |
||||
</div> |
||||
<div class="navigation-toggle"> |
||||
<span class="line-1"></span> |
||||
<span class="line-2"> |
||||
<p>Menu Toggle</p> |
||||
</span> |
||||
<span class="line-3"></span> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
||||
|
||||
<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> |
||||
|
||||
|
||||
<div class="navigation-footer"> |
||||
<img src="logo-mobile.svg" alt="Raspberry Pi"> |
||||
<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi (Trading) Ltd</a> |
||||
</div> |
||||
<!-- <div class="search"> |
||||
<form> |
||||
<input type="search" name="search" id="search" placeholder="Search"> |
||||
<input type="submit" value="Search"> |
||||
</form> |
||||
</div> --> |
@ -0,0 +1,90 @@ |
||||
/*
|
||||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. |
||||
* |
||||
* SPDX-License-Identifier: BSD-3-Clause |
||||
*/ |
||||
|
||||
// Here to organize documentation order
|
||||
|
||||
/**
|
||||
* \defgroup hardware Hardware APIs |
||||
* This group of libraries provides a thin and efficient C API / abstractions to access the RP2040 hardware without having to read and write |
||||
* hardware registers directly. |
||||
* @{ |
||||
* \defgroup hardware_adc hardware_adc |
||||
* \defgroup hardware_base hardware_base |
||||
* \defgroup hardware_claim hardware_claim |
||||
* \defgroup hardware_clocks hardware_clocks |
||||
* \defgroup hardware_divider hardware_divider |
||||
* \defgroup hardware_dma hardware_dma |
||||
* \defgroup hardware_exception hardware_exception |
||||
* \defgroup hardware_flash hardware_flash |
||||
* \defgroup hardware_gpio hardware_gpio |
||||
* \defgroup hardware_i2c hardware_i2c |
||||
* \defgroup hardware_interp hardware_interp |
||||
* \defgroup hardware_irq hardware_irq |
||||
* \defgroup hardware_pio hardware_pio |
||||
* \defgroup hardware_pll hardware_pll |
||||
* \defgroup hardware_pwm hardware_pwm |
||||
* \defgroup hardware_resets hardware_resets |
||||
* \defgroup hardware_rtc hardware_rtc |
||||
* \defgroup hardware_spi hardware_spi |
||||
* \defgroup hardware_sync hardware_sync |
||||
* \defgroup hardware_timer hardware_timer |
||||
* \defgroup hardware_uart hardware_uart |
||||
* \defgroup hardware_vreg hardware_vreg |
||||
* \defgroup hardware_watchdog hardware_watchdog |
||||
* \defgroup hardware_xosc hardware_xosc |
||||
* @} |
||||
* |
||||
* \defgroup high_level High Level APIs |
||||
* This group of libraries provide higher level functionality that isn't hardware related or provides a richer |
||||
* set of functionality above the basic hardware interfaces |
||||
* @{ |
||||
* \defgroup pico_multicore pico_multicore |
||||
* \defgroup pico_stdlib pico_stdlib |
||||
* \defgroup pico_sync pico_sync |
||||
* \defgroup pico_time pico_time |
||||
* \defgroup pico_unique_id pico_unique_id |
||||
* \defgroup pico_util pico_util |
||||
* @} |
||||
* |
||||
* \defgroup third_party Third-party Libraries |
||||
* Third party libraries for implementing high level functionality. |
||||
* @{ |
||||
* \defgroup tinyusb_device tinyusb_device |
||||
* \defgroup tinyusb_host tinyusb_host |
||||
* @} |
||||
* |
||||
* \defgroup runtime Runtime Infrastructure |
||||
* Libraries that are used to provide efficient implementation of certain |
||||
* language level and C library functions, as well as CMake INTERFACE libraries |
||||
* abstracting the compilation and link steps in the SDK |
||||
* @{ |
||||
* \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 |
||||
* \defgroup pico_float pico_float |
||||
* \defgroup pico_int64_ops pico_int64_ops |
||||
* \defgroup pico_malloc pico_malloc |
||||
* \defgroup pico_mem_ops pico_mem_ops |
||||
* \defgroup pico_platform pico_platform |
||||
* \defgroup pico_printf pico_printf |
||||
* \defgroup pico_runtime pico_runtime |
||||
* \defgroup pico_stdio pico_stdio |
||||
* \defgroup pico_standard_link pico_standard_link |
||||
* @} |
||||
* |
||||
* \defgroup misc External API Headers |
||||
* Headers for interfaces that are shared with code outside of the SDK |
||||
* @{ |
||||
* \defgroup boot_picoboot boot_picoboot |
||||
* \defgroup boot_uf2 boot_uf2 |
||||
* @} |
||||
*/ |
After Width: | Height: | Size: 8.7 KiB |