Compile error when installing with pico_setup.sh #474

Closed
opened 2021-06-03 13:00:25 -05:00 by fivdi · 7 comments
fivdi commented 2021-06-03 13:00:25 -05:00 (Migrated from github.com)

Trying to install with pico_setup.sh (https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh) results in this error:

Scanning dependencies of target picoprobe_probe_pio_h
[ 22%] Generating probe.pio.h
[ 22%] Built target picoprobe_probe_pio_h
Scanning dependencies of target picoprobe
[ 23%] Building C object CMakeFiles/picoprobe.dir/src/led.c.obj
[ 25%] Building C object CMakeFiles/picoprobe.dir/src/main.c.obj
[ 25%] Building C object CMakeFiles/picoprobe.dir/src/usb_descriptors.c.obj
[ 26%] Building C object CMakeFiles/picoprobe.dir/src/probe.c.obj
[ 27%] Building C object CMakeFiles/picoprobe.dir/src/cdc_uart.c.obj
[ 28%] Building C object CMakeFiles/picoprobe.dir/src/get_serial.c.obj
[ 29%] Building C object CMakeFiles/picoprobe.dir/home/pi/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
In file included from /home/pi/pico/picoprobe/src/get_serial.c:27:0:
/home/pi/pico/pico-sdk/src/rp2_common/pico_unique_id/include/pico/unique_id.h:72:52: error: unknown type name 'uint'; did you mean 'int'?
 void pico_get_unique_board_id_string(char *id_out, uint len);
                                                    ^~~~
                                                    int
make[2]: *** [CMakeFiles/picoprobe.dir/build.make:128: CMakeFiles/picoprobe.dir/src/get_serial.c.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1515: CMakeFiles/picoprobe.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I think this is happening because the declaratrion of pico_get_unique_board_id_string in header unique_id.h (see here) uses type uint but the header unique_id.h doesn't include pico.h or types.h and therfore doesn't know what a uint is.

Trying to install with pico_setup.sh (https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh) results in this error: ``` Scanning dependencies of target picoprobe_probe_pio_h [ 22%] Generating probe.pio.h [ 22%] Built target picoprobe_probe_pio_h Scanning dependencies of target picoprobe [ 23%] Building C object CMakeFiles/picoprobe.dir/src/led.c.obj [ 25%] Building C object CMakeFiles/picoprobe.dir/src/main.c.obj [ 25%] Building C object CMakeFiles/picoprobe.dir/src/usb_descriptors.c.obj [ 26%] Building C object CMakeFiles/picoprobe.dir/src/probe.c.obj [ 27%] Building C object CMakeFiles/picoprobe.dir/src/cdc_uart.c.obj [ 28%] Building C object CMakeFiles/picoprobe.dir/src/get_serial.c.obj [ 29%] Building C object CMakeFiles/picoprobe.dir/home/pi/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj In file included from /home/pi/pico/picoprobe/src/get_serial.c:27:0: /home/pi/pico/pico-sdk/src/rp2_common/pico_unique_id/include/pico/unique_id.h:72:52: error: unknown type name 'uint'; did you mean 'int'? void pico_get_unique_board_id_string(char *id_out, uint len); ^~~~ int make[2]: *** [CMakeFiles/picoprobe.dir/build.make:128: CMakeFiles/picoprobe.dir/src/get_serial.c.obj] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1515: CMakeFiles/picoprobe.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 ``` I think this is happening because the declaratrion of `pico_get_unique_board_id_string` in `header unique_id.h` ([see here](https://github.com/raspberrypi/pico-sdk/blob/1.2.0/src/rp2_common/pico_unique_id/include/pico/unique_id.h#L72)) uses type `uint` but the header `unique_id.h` doesn't include `pico.h` or `types.h` and therfore doesn't know what a `uint` is.
aallan commented 2021-06-03 13:22:14 -05:00 (Migrated from github.com)

What platform were you on?

What platform were you on?
fivdi commented 2021-06-03 13:28:24 -05:00 (Migrated from github.com)

A Raspberry Pi 4

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux

Not sure why you moved this. It's a pico-sdk issue. I have it fixed locally.

A Raspberry Pi 4 ``` pi@raspberrypi:~ $ uname -a Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux ``` Not sure why you moved this. It's a pico-sdk issue. I have it fixed locally.
aallan commented 2021-06-03 13:29:51 -05:00 (Migrated from github.com)

Not sure why you moved this. It's a pico-sdk issue. I have it fixed locally.

Because the issue started out with… "Trying to install with pico_setup.sh".

> Not sure why you moved this. It's a pico-sdk issue. I have it fixed locally. Because the issue started out with… "Trying to install with pico_setup.sh".
fivdi commented 2021-06-03 13:31:43 -05:00 (Migrated from github.com)

Ah ok 😄

This is the important bit:

I think this is happening because the declaratrion of pico_get_unique_board_id_string in header unique_id.h (see here) uses type uint but the header unique_id.h doesn't include pico.h or types.h and therfore doesn't know what a uint is.

Ah ok 😄 This is the important bit: > I think this is happening because the declaratrion of `pico_get_unique_board_id_string` in `header unique_id.h` ([see here](https://github.com/raspberrypi/pico-sdk/blob/1.2.0/src/rp2_common/pico_unique_id/include/pico/unique_id.h#L72)) uses type `uint` but the header `unique_id.h` doesn't include `pico.h` or `types.h` and therfore doesn't know what a `uint` is.
fivdi commented 2021-06-03 13:34:57 -05:00 (Migrated from github.com)

Adding this:

#include "pico.h"

here fixes the problem.

Adding this: ```c #include "pico.h" ``` [here](https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_unique_id/include/pico/unique_id.h#L9) fixes the problem.
kilograham commented 2021-06-03 15:22:51 -05:00 (Migrated from github.com)

merged here, but i have added a pico.h include to picoprobe for the interim

merged here, but i have added a pico.h include to picoprobe for the interim
kilograham commented 2021-06-03 15:23:18 -05:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#474
No description provided.