EasyManuals Logo

Raspberry Pi Pico User Manual

Raspberry Pi Pico
77 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #73 background imageLoading...
Page #73 background image
#define bi_program_url(url) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_URL,
url)
You then either use bi_decl(bi_blah(…)) for unconditional inclusion of the binary info blah, or
bi_decl_if_func_used(bi_blah(…)) for binary information that may be stripped if the enclosing function is not included in
the binary by the linker (think
--gc-sections).
For example,
Ê1 #include <stdio.h>
Ê2 #include "pico/stdlib.h"
Ê3 #include "hardware/gpio.h"
Ê4 #include "pico/binary_info.h"
Ê5
Ê6
const uint LED_PIN = 25;
Ê7
Ê8
int main() {
Ê9
10 bi_decl(bi_program_description(
"This is a test binary."));
11 bi_decl(bi_1pin_with_name(LED_PIN,
"On-board LED"));
12
13 setup_default_uart();
14 gpio_set_function(LED_PIN, GPIO_FUNC_PROC);
15 gpio_set_dir(LED_PIN, GPIO_OUT);
16
while (1) {
17 gpio_put(LED_PIN,
0);
18 sleep_ms(
250);
19 gpio_put(LED_PIN,
1);
20 puts(
"Hello World\n");
21 sleep_ms(
1000);
22 }
23 }
when queried with
picotool,
$ sudo picotool info -a test.uf2
File test.uf2:
Program Information
Êname: test
Êdescription: This is a test binary.
Êfeatures: stdout to UART
Êbinary start: 0x10000000
Êbinary end: 0x100031f8
Fixed Pin Information
Ê0: UART0 TX
Ê1: UART0 RX
Ê25: On-board LED
Build Information
Êbuild date: Jan 4 2021
shows our information strings in the output.
Getting started with Raspberry Pi Pico
Binary Information 72

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Raspberry Pi Pico and is the answer not in the manual?

Raspberry Pi Pico Specifications

General IconGeneral
MicrocontrollerRP2040
Clock Speed133 MHz
SRAM264 KB
Flash Memory2 MB
GPIO Pins26
Operating Temperature-20°C to +85°C
ArchitectureARM Cortex-M0+ (dual-core)
InterfacesI2C, SPI, UART, PWM
Operating Voltage1.8–5.5 V
Dimensions51 mm × 21 mm

Related product manuals