Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8050

SDK • I'm having trouble with SDK 2.0.0

$
0
0
I've been working with a different processor and development environment for a few months now, and have come back to Pico RP2040 to make some program mods to an existing project. I noticed a new SDK was available and decided to give it a try.

My development environment is using Windows with MS Visual Studio 2022 Community Edition, and VisualGDB. In the past, I was able to change the PICO_SDK_PATH system environment variable to whatever SDK version I want to use; I also tell VisualGDB to use the same SDK directory path. I would delete the build directory, reload the Cmake project, and everything would compile with 0 warnings and 0 errors.

This time, with the 2.0.0 SDK, I end up with hundreds of compile errors, not just in my own code, but in SDK files as well. Here's just a small snip of the errors I get...

Code:

D:/Pico/pico-sdk_2.0.0/src/rp2_common/pico_stdio/include/pico/stdio.h:1:1: note: 'uint32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?  +++ |+#include <stdint.h>    1 | /*D:/Pico/pico-sdk_2.0.0/src/rp2_common/pico_stdio/include/pico/stdio.h:97:38: error: unknown type name 'uint32_t'   97 | static inline int getchar_timeout_us(uint32_t timeout_us) {      |                                      ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/pico_stdio/include/pico/stdio.h:97:38: note: 'uint32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?D:/Pico/pico-sdk_2.0.0/src/rp2_common/pico_stdio/include/pico/stdio.h:173:41: error: unknown type name 'absolute_time_t'  173 | int stdio_get_until(char *buf, int len, absolute_time_t until);      |                                         ^~~~~~~~~~~~~~~In file included from D:/Pico/pico-sdk_2.0.0/src/rp2040/hardware_structs/include/hardware/structs/timer.h:15,                 from D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_timer/include/hardware/timer.h:11,                 from D:/Pico/pico-sdk_2.0.0/src/common/pico_time/include/pico/time.h:11,                 from D:/Pico/pico-sdk_2.0.0/src/common/pico_stdlib_headers/include/pico/stdlib.h:12:D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:63:18: error: unknown type name 'uint64_t'   63 | typedef volatile uint64_t io_rw_64;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:64:24: error: unknown type name 'uint64_t'   64 | typedef const volatile uint64_t io_ro_64;      |                        ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:65:18: error: unknown type name 'uint64_t'   65 | typedef volatile uint64_t io_wo_64;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:66:18: error: unknown type name 'uint32_t'   66 | typedef volatile uint32_t io_rw_32;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:67:24: error: unknown type name 'uint32_t'   67 | typedef const volatile uint32_t io_ro_32;      |                        ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:68:18: error: unknown type name 'uint32_t'   68 | typedef volatile uint32_t io_wo_32;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:69:18: error: unknown type name 'uint16_t'   69 | typedef volatile uint16_t io_rw_16;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:70:24: error: unknown type name 'uint16_t'   70 | typedef const volatile uint16_t io_ro_16;      |                        ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:71:18: error: unknown type name 'uint16_t'   71 | typedef volatile uint16_t io_wo_16;      |                  ^~~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:72:18: error: unknown type name 'uint8_t'   72 | typedef volatile uint8_t io_rw_8;      |                  ^~~~~~~D:/Pico/pico-sdk_2.0.0/src/rp2_common/hardware_base/include/hardware/address_mapped.h:73:24: error: unknown type name 'uint8_t'   73 | typedef const volatile uint8_t io_ro_8;      |                        ^~~~~~~

So, apparently it can't find the basic C types? Why would this behaviour be different from one SDK version to another? If I re-point the PICO_SDK_PATH back to 1.5.1 and tell VisualGDB to use that one ( after zapping the build directory ) I once again get a perfect clean compile.

I have a feeling that I'm missing something very simple, like a newly required variable in cmakelists.txt; but darned if I can figure it out. Is there any document for porting from SDK 1.5.1 to 2.0.0? I looked, but didn't find any.

I'll stay at SDK 1.5.1 for this current build, but would like to keep current with the latest SDK at some point.

Any ideas?

Statistics: Posted by ronter — Sat Aug 31, 2024 7:56 pm



Viewing all articles
Browse latest Browse all 8050

Trending Articles