-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #724 from alphatech56/SupportPicoW
fixing problem "MPU6050/examples/ do not support PICO W"
- Loading branch information
Showing
5 changed files
with
127 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
# Generated Cmake Pico project file | ||
|
||
cmake_minimum_required(VERSION 3.13) | ||
|
||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Pull in Raspberry Pi Pico SDK (must be before project) | ||
# Pull in SDK (must be before project) | ||
# set(PICO_BOARD pico_w) # Needed only for PICO W | ||
# set(CYW43_LWIP 1) # Needed only for PICO W | ||
include(pico_sdk_import.cmake) | ||
|
||
project(mpu6050_DMP_port C CXX ASM) | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Initialise the Raspberry Pi Pico SDK | ||
pico_sdk_init() | ||
|
||
# Add executable. Default name is the project name, version 0.1 | ||
|
||
add_executable(mpu6050_DMP_port mpu6050_DMP_port.cpp I2Cdev.cpp MPU6050.cpp ) | ||
add_executable(mpu6050_DMP_port | ||
mpu6050_DMP_port.cpp | ||
MPU6050.cpp | ||
I2Cdev.cpp | ||
) | ||
|
||
# Add any user requested libraries | ||
target_link_libraries(mpu6050_DMP_port | ||
pico_stdlib | ||
# pico_cyw43_arch_none # we need Wifi to access the GPIO. Needed only for PICO W | ||
hardware_i2c | ||
pico_double | ||
) | ||
|
||
pico_set_program_name(mpu6050_DMP_port "mpu6050_DMP_port") | ||
pico_set_program_version(mpu6050_DMP_port "0.1") | ||
|
||
pico_enable_stdio_uart(mpu6050_DMP_port 0) | ||
pico_enable_stdio_usb(mpu6050_DMP_port 1) | ||
|
||
# Add the standard library to the build | ||
target_link_libraries(mpu6050_DMP_port pico_stdlib) | ||
|
||
# Add any user requested libraries | ||
target_link_libraries(mpu6050_DMP_port | ||
hardware_i2c | ||
pico_double | ||
) | ||
|
||
# create map/bin/hex file etc. | ||
pico_add_extra_outputs(mpu6050_DMP_port) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 19 additions & 15 deletions
34
RP2040/MPU6050/examples/mpu6050_calibration/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
# Generated Cmake Pico project file | ||
|
||
cmake_minimum_required(VERSION 3.13) | ||
|
||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Pull in Raspberry Pi Pico SDK (must be before project) | ||
# Pull in SDK (must be before project) | ||
# set(PICO_BOARD pico_w) # Needed only for PICO W | ||
# set(CYW43_LWIP 1) # Needed only for PICO W | ||
include(pico_sdk_import.cmake) | ||
|
||
project(mpu6050_calibration C CXX ASM) | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Initialise the Raspberry Pi Pico SDK | ||
pico_sdk_init() | ||
|
||
# Add executable. Default name is the project name, version 0.1 | ||
|
||
add_executable(mpu6050_calibration mpu6050_calibration.cpp I2Cdev.cpp MPU6050.cpp ) | ||
add_executable( mpu6050_calibration | ||
mpu6050_calibration.cpp | ||
MPU6050.cpp | ||
I2Cdev.cpp | ||
) | ||
|
||
# Add any user requested libraries | ||
target_link_libraries( mpu6050_calibration | ||
pico_stdlib | ||
# pico_cyw43_arch_none # we need Wifi to access the GPIO. Needed only for PICO W | ||
hardware_i2c | ||
) | ||
|
||
pico_set_program_name(mpu6050_calibration "mpu6050_calibration") | ||
pico_set_program_version(mpu6050_calibration "0.1") | ||
|
||
pico_enable_stdio_uart(mpu6050_calibration 0) | ||
pico_enable_stdio_usb(mpu6050_calibration 1) | ||
|
||
# Add the standard library to the build | ||
target_link_libraries(mpu6050_calibration pico_stdlib) | ||
|
||
# Add any user requested libraries | ||
target_link_libraries(mpu6050_calibration | ||
hardware_i2c | ||
) | ||
|
||
pico_add_extra_outputs(mpu6050_calibration) | ||
# create map/bin/hex file etc. | ||
pico_add_extra_outputs( mpu6050_calibration) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters