How to include pico-sdk in Qt
-
wrote on 16 Dec 2021, 10:55 last edited by jenya7
It's a quite specific question but may be someone can help me.
I installed pico-sdk on Raspbian (/home/pi/pico/pico-sdk). How can I include it in Qt IDE?
Inside a lot of folders and I see no include folder I can refer. -
It's a quite specific question but may be someone can help me.
I installed pico-sdk on Raspbian (/home/pi/pico/pico-sdk). How can I include it in Qt IDE?
Inside a lot of folders and I see no include folder I can refer.@jenya7 This Pico-SDK is a C/C++ SDK. A collection of libraries and CMake files. So, you can use it like any other C/C++ framework.
Read its documentation:- https://github.com/raspberrypi/pico-sdk
- https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf
Looks like you will need to use CMake as build system which is also supported by Qt (https://doc.qt.io/qt-5/cmake-manual.html).
-
@jenya7 This Pico-SDK is a C/C++ SDK. A collection of libraries and CMake files. So, you can use it like any other C/C++ framework.
Read its documentation:- https://github.com/raspberrypi/pico-sdk
- https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf
Looks like you will need to use CMake as build system which is also supported by Qt (https://doc.qt.io/qt-5/cmake-manual.html).
wrote on 16 Dec 2021, 12:29 last edited by jenya7@jsulm
I was hoping I can work with it like with a library.
For example I installsudo apt-get install libgpiod-dev
and the I add in Qt
LIBS += -lgpiod
And I work and compile from Qt.
In the getting started document it explained how to build from a command line. I'd love to integrate it in Qt.
If I provide all paths like
LIB+= "/pico-sdk/hardware_timer"
it's c and h files eventually. It can be build with Qt build like other sources, I think...
My doubt how this get compiled
#define uart0_hw ((uart_hw_t *const)UART0_BASE) #define uart1_hw ((uart_hw_t *const)UART1_BASE)
It's actually real registers pointers.
-
@jsulm
I was hoping I can work with it like with a library.
For example I installsudo apt-get install libgpiod-dev
and the I add in Qt
LIBS += -lgpiod
And I work and compile from Qt.
In the getting started document it explained how to build from a command line. I'd love to integrate it in Qt.
If I provide all paths like
LIB+= "/pico-sdk/hardware_timer"
it's c and h files eventually. It can be build with Qt build like other sources, I think...
My doubt how this get compiled
#define uart0_hw ((uart_hw_t *const)UART0_BASE) #define uart1_hw ((uart_hw_t *const)UART1_BASE)
It's actually real registers pointers.
wrote on 16 Dec 2021, 13:27 last edited by@jenya7 said in How to include pico-sdk in Qt:
I was hoping I can work with it like with a library.
It looks like to me that you might be mixing things here.
From the pico-sdk github site:
The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.And I'm not aware that there's a port of Qt framefork for such MCU architecture yet, so having a Qt app running on Raspberry Pico is unlikely...
However, if you only plan to use Qt Creator as the IDE to develop RP2040 specific applications, then I'd say to look at the Bare Metal option while configure a kit for such devices.
-
@jenya7 said in How to include pico-sdk in Qt:
I was hoping I can work with it like with a library.
It looks like to me that you might be mixing things here.
From the pico-sdk github site:
The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.And I'm not aware that there's a port of Qt framefork for such MCU architecture yet, so having a Qt app running on Raspberry Pico is unlikely...
However, if you only plan to use Qt Creator as the IDE to develop RP2040 specific applications, then I'd say to look at the Bare Metal option while configure a kit for such devices.
wrote on 16 Dec 2021, 15:12 last edited by@Pablo-J-Rogina
Yeah. But today with Qt I operate WIFI and BLE modules on Raspberry Pi. It also operates GPIO (hardware pins) with a third party lib. So I wouldn't be surprised if it works with Pico SDK headers and libraries. -
@Pablo-J-Rogina
Yeah. But today with Qt I operate WIFI and BLE modules on Raspberry Pi. It also operates GPIO (hardware pins) with a third party lib. So I wouldn't be surprised if it works with Pico SDK headers and libraries.wrote on 16 Dec 2021, 15:26 last edited by@jenya7 said in How to include pico-sdk in Qt:
It looks like you're still missing the concept of Qt supported platforms, and processor architectures (x86, x86_64, x86, armv7, armv8, etc.)
But today with Qt I operate WIFI and BLE modules on Raspberry Pi. It also operates GPIO (hardware pins) with a third party lib
Yes, because the Qt framework (most of its modules) were ported to platform (Linux) and architecture (armv7, armv8)
Please be aware that you're talking about Raspberry Pi devices here.So I wouldn't be surprised if it works with Pico SDK headers and libraries.
Once again, the Pico SDK is intended for writing applications to run on RP2040 microcontrollers, please read the documentation.
And be surprised, there's no Qt framework port for such architecture yet.
1/6