make the build system & compilation docs a bit better
This commit is contained in:
parent
3f7696a566
commit
54e6dde912
|
@ -6,11 +6,19 @@ set(PROJECT ${BOARD}-${PROJECT})
|
|||
set(TOP "./tinyusb")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
|
||||
option(USE_SYSTEMWIDE_PICOSDK "Use the systemwide Pico SDK instead of relying on the one from a deeply nested Git submodule (OFF by default)" OFF)
|
||||
|
||||
# Check for -DFAMILY=
|
||||
if(FAMILY STREQUAL "rp2040")
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
#set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk)
|
||||
include(pico_sdk_import.cmake)
|
||||
|
||||
if (USE_SYSTEMWIDE_PICOSDK)
|
||||
include(pico_sdk_import.cmake)
|
||||
else()
|
||||
set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk)
|
||||
include(${PICO_SDK_PATH}/pico_sdk_init.cmake)
|
||||
endif()
|
||||
|
||||
project(${PROJECT})
|
||||
pico_sdk_init()
|
||||
add_executable(${PROJECT})
|
||||
|
|
|
@ -21,7 +21,7 @@ For BOARD=stm32f072disco, the inexpensive [32F072BDISCOVERY evaluation board](ht
|
|||
After initially downloading this project's code, issue the following command to download TinyUSB and CMSIS_5 code:
|
||||
|
||||
```
|
||||
git submodule update --init
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Follow the TinyUSB build instructions [available here](https://github.com/hathach/tinyusb/tree/master/docs), but issue the make command in the base directory of Dapper Mime.
|
||||
|
@ -35,6 +35,11 @@ mkdir cmake-build && cd cmake-build
|
|||
cmake -DBOARD=raspberry_pi_pico -DFAMILIY=rp2040 -DCMAKE_BUILD_TYPE=Debug ..
|
||||
```
|
||||
|
||||
If you have the Pico SDK installed on your system, and the `PICO_SDK_PATH`
|
||||
environment variable is specified properly, you can omit the `--recursive` flag
|
||||
in the `git submodule` invocation (to avoid many many git clones), and pass
|
||||
the `-DUSE_SYSTEMWIDE_PICOSDK=On` flag to CMake, too.
|
||||
|
||||
## Usage
|
||||
|
||||
The pin mapping is as follows:
|
||||
|
|
Loading…
Reference in New Issue