In file included from G:\Arduino\rp2040\sketch_jan14b\main.cpp:21:0:
C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\mbed_rp2040\4.1.1\cores\arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_stdlib/include/pico/stdlib.h:11:10: fatal error: pico/stdio.h: No such file or directory
#include "pico/stdio.h"
^~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
这是调用出错的库
#ifndef _PICO_STDLIB_H
#define _PICO_STDLIB_H
#include "pico.h"
#include "pico/stdio.h"
#include "pico/time.h"
#include "hardware/gpio.h"
#include "hardware/uart.h
这是#include "pico/stdlib.h"这个库里面的,这个库是存在的,也有要调用#include "pico/stdio.h"这个库,但实际文件夹里没有这个库,还是在其他地方。
下面是一部份说明文档的解释
Aggregation of a core subset of Raspberry Pi Pico SDK libraries used by most executables along with some additional
* utility methods. Including pico_stdlib gives you everything you need to get a basic program running
* which prints to stdout or flashes a LED
*
* This library aggregates:
* - @ref hardware_uart
* - @ref hardware_gpio
* - @ref pico_binary_info
* - @ref pico_runtime
* - @ref pico_platform
* - @ref pico_printf
* - @ref pico_stdio
* - @ref pico_standard_link
* - @ref pico_util
*
* There are some basic default values used by these functions that will default to
* usable values, however, they can be customised in a board definition header via
* config.h or similar
*/
// Note PICO_STDIO_UART, PICO_STDIO_USB, PICO_STDIO_SEMIHOSTING are set by the
// respective INTERFACE libraries, so these defines are set if the library
// is included for the target executable
这段代码是关于Raspberry Pi Pico SDK库的一个子集聚合的描述。Pico SDK是Raspberry Pi RP2040微控制器的一个软件开发工具包,它提供了许多库和工具,使得开发者能够更容易地为这个微控制器编写代码。
以下是对代码的详细解释:
-
聚合库:
- 这段代码描述了一个聚合库,该库包含了大多数可执行文件所需的核心Pico SDK库子集以及一些额外的实用方法。使用
pico_stdlib
库,你可以获得运行一个基本程序所需的所有内容,比如向标准输出打印信息或闪烁LED。
- 这段代码描述了一个聚合库,该库包含了大多数可执行文件所需的核心Pico SDK库子集以及一些额外的实用方法。使用
-
包含的库:
@ref hardware_uart
: 硬件UART库,用于串行通信。@ref hardware_gpio
: 硬件GPIO库,用于通用输入输出。@ref pico_binary_info
: Pico二进制信息库,可能包含与二进制文件相关的信息。@ref pico_runtime
: Pico运行时库,提供程序运行时的支持。@ref pico_platform
: Pico平台库,与硬件平台相关的功能。@ref pico_printf
: Pico的printf实现,用于格式化输出。@ref pico_stdio
: Pico的标准输入输出库。@ref pico_standard_link
: 标准链接库,可能包含一些通用的链接器设置或函数。@ref pico_util
: Pico实用工具库,包含一些实用的函数或方法。
-
默认值:
- 这些函数使用了一些基本的默认值,这些默认值通常是可以使用的。但是,如果你需要,可以在板级定义头文件中通过
config.h
或类似的文件来定制这些值。
- 这些函数使用了一些基本的默认值,这些默认值通常是可以使用的。但是,如果你需要,可以在板级定义头文件中通过
-
接口库设置:
PICO_STDIO_UART
,PICO_STDIO_USB
,PICO_STDIO_SEMIHOSTING
这些定义是由各自的接口库设置的。如果目标可执行文件包含了相应的库,那么这些定义就会被设置。这意味着,这些定义用于确定程序应该使用哪种接口进行标准输入/输出,例如UART、USB还是半托管模式。
总的来说,这段代码描述了一个为Raspberry Pi RP2040微控制器提供的Pico SDK库的子集聚合,这个子集包含了大多数基本程序所需的功能,并允许开发者根据需要定制一些默认值。