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

C/C++ • Re: Picotool v2.0.0 is built, but not seen by cmake

$
0
0
I won't be of much help as I use linux. Nevertheless, I just upgraded my pico SDK to 2.0.0 and noticed, like yourself, my project downloading picotool from github. All I did to solve this was grab the new picotool: git clone https://github.com/raspberrypi/picotool.git and install it appropriately (ie in PATH).

Seems you've done the hard work of building it. My test project now builds without downloading it each time. It also turns out my situation is complex but 'picotool' was still found.

Do you have the old picotool.exe in your PATH? Could be 'cmake' is finding that *before* the new picotool.exe?

Otherwise, from your description, it sounds like a windoze specific PATH searching issue.

Fwiw, I have a pair of utilities..

Code:

#include <stdio.h>#include <stdlib.h>intmain(int ac, char *av[], char *envp[]){size_t                 i; const char     *       p; for (i = 0; envp[i]; i++)        printf("[%lu]=[%s]\n",i,envp[i]) ; return EXIT_SUCCESS;}
.. and..

Code:

#include <stdio.h>#include <stdlib.h>intmain(int argc, char *argv[]){size_t                 i; const char     *       p; for (i = 0; argv[i]; i++)        printf("[%lu]=[%s]\n",i,argv[i]) ; return EXIT_SUCCESS;}
They're not installed anywhere because I might modify them slightly for the problem in hand. Once in a while, I might be desperate enough to move a real executable out the way and drop one of the above in its place just to confirm what the heck is being passed to that executable. eg: if windoze supports system() then you might..

Code:

foo@sdu:~/usr/src/sdenve$ cat main.c #include <stdio.h>#include <stdlib.h>intmain(int ac, char *av[], char *envp[]){size_ti; const char*p; for (i = 0; envp[i]; i++)printf("[%lu]=[%s]\n",i,envp[i]) ; system("picotool version"); return EXIT_SUCCESS;}

Code:

foo@sdu:~/usr/src/sdenve$ gcc -o c main.c

Code:

foo@sdu:~/usr/src/sdenve$ ./c[0]=[SHELL=/bin/bash][1]=[SESSION_MANAGER=local/sdu:@/tmp/.ICE-unix/2232,unix/sdu:/tmp/.ICE-unix/2232][2]=[QT_ACCESSIBILITY=1][3]=[COLORTERM=truecolor][4]=[XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg][5]=[XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0][6]=[GNOME_DESKTOP_SESSION_ID=this-is-deprecated][7]=[LANGUAGE=en_GB:en][8]=[SSH_AUTH_SOCK=/run/user/1000/keyring/ssh][9]=[HISTTIMEFORMAT=%F %T ][10]=[CINNAMON_VERSION=6.0.4][11]=[DESKTOP_SESSION=cinnamon][12]=[GTK_MODULES=gail:atk-bridge][13]=[XDG_SEAT=seat0][14]=[PWD=/home/foo/usr/src/sdenve][15]=[LOGNAME=foo][16]=[XDG_SESSION_DESKTOP=cinnamon][17]=[QT_QPA_PLATFORMTHEME=qt5ct][18]=[XDG_SESSION_TYPE=x11][19]=[GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1][20]=[XAUTHORITY=/home/foo/.Xauthority][21]=[XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/foo][22]=[GDM_LANG=en_GB][23]=[HOME=/home/foo][24]=[LANG=en_GB.UTF-8][25]=[XDG_CURRENT_DESKTOP=X-Cinnamon][26]=[VTE_VERSION=6800][27]=[XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0][28]=[GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/7e506312_efb4_4d10_ac16_0716e3b6313b][29]=[XDG_SESSION_CLASS=user][30]=[TERM=xterm-256color][31]=[LIBVIRT_DEFAULT_URI=qemu:///system][32]=[USER=foo][33]=[GNOME_TERMINAL_SERVICE=:1.104][34]=[DISPLAY=:0][35]=[SHLVL=1][36]=[XDG_VTNR=7][37]=[XDG_SESSION_ID=c1][38]=[XDG_RUNTIME_DIR=/run/user/1000][39]=[GTK3_MODULES=xapp-gtk3-module][40]=[XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/home/foo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share][41]=[PATH=/home/foo/bin:/usr/local/sd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin][42]=[GDMSESSION=cinnamon][43]=[HISTFILESIZE=2500][44]=[DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus][45]=[_=./c][46]=[OLDPWD=/home/foo/usr/src]sh: 1: picotool: not found
As I said, my setup is complex. Can't find it.

The prefix 'sd-qt' pulls in my live QT stuff and 'sd-QT' pulls in my pending QT stuff. All that really matters here is my ordinary system PATH gets modified to point at the correct QT environment. Now it can be found..

Code:

foo@sdu:~/usr/src/sdenve$ sd-QT ./c[0]=[INFOPATH=/usr/local/QT/6500r/share/info][1]=[PATH=/usr/local/QT/6500r/sbin:/usr/local/QT/6500r/bin:/usr/local/qt/xgcc/arm-none-eabi/bin:/home/foo/bin:/usr/local/sd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin][2]=[QTC_ENABLE_LIBTOOLING=1][3]=[LD_LIBRARY_PATH=/usr/local/QT/6500r/lib64:/usr/local/QT/6500r/lib:/usr/local/QT/6500r/lib32][4]=[MANPATH=/usr/local/QT/6500r/share/man][5]=[LLVM_INSTALL_DIR=/usr/local/QT/6500r][6]=[QTDIR=/usr/local/QT/6500r][7]=[SHELL=/bin/bash][8]=[SESSION_MANAGER=local/sdu:@/tmp/.ICE-unix/2232,unix/sdu:/tmp/.ICE-unix/2232][9]=[QT_ACCESSIBILITY=1][10]=[COLORTERM=truecolor][11]=[FREERTOS_KERNEL_PATH=/home/foo/usr/src/rpi/pico/freertos/FreeRTOS-Kernel][12]=[XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg][13]=[XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0][14]=[GNOME_DESKTOP_SESSION_ID=this-is-deprecated][15]=[LANGUAGE=en_GB:en][16]=[SSH_AUTH_SOCK=/run/user/1000/keyring/ssh][17]=[HISTTIMEFORMAT=%F %T ][18]=[CINNAMON_VERSION=6.0.4][19]=[DESKTOP_SESSION=cinnamon][20]=[GTK_MODULES=gail:atk-bridge][21]=[XDG_SEAT=seat0][22]=[PWD=/home/foo/usr/src/sdenve][23]=[XDG_SESSION_DESKTOP=cinnamon][24]=[LOGNAME=foo][25]=[QT_QPA_PLATFORMTHEME=qt5ct][26]=[XDG_SESSION_TYPE=x11][27]=[GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1][28]=[XAUTHORITY=/home/foo/.Xauthority][29]=[PICO_EXTRAS_PATH=/home/foo/usr/src/rpi/pico/pico-extras][30]=[XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/foo][31]=[PICO_SDK_PATH=/home/foo/usr/src/rpi/pico/pico-sdk][32]=[GDM_LANG=en_GB][33]=[HOME=/home/foo][34]=[LANG=en_GB.UTF-8][35]=[PICO_BOARD=pico_w][36]=[XDG_CURRENT_DESKTOP=X-Cinnamon][37]=[VTE_VERSION=6800][38]=[XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0][39]=[GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/7e506312_efb4_4d10_ac16_0716e3b6313b][40]=[PICO_PLAYGROUND_PATH=/home/foo/usr/src/rpi/pico/pico-playground][41]=[XDG_SESSION_CLASS=user][42]=[TERM=xterm-256color][43]=[LIBVIRT_DEFAULT_URI=qemu:///system][44]=[USER=foo][45]=[GNOME_TERMINAL_SERVICE=:1.104][46]=[DISPLAY=:0][47]=[SHLVL=2][48]=[PICO_EXAMPLES_PATH=/home/foo/usr/src/rpi/pico/pico-examples][49]=[XDG_VTNR=7][50]=[XDG_SESSION_ID=c1][51]=[XDG_RUNTIME_DIR=/run/user/1000][52]=[GTK3_MODULES=xapp-gtk3-module][53]=[XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/home/foo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share][54]=[GDMSESSION=cinnamon][55]=[HISTFILESIZE=2500][56]=[DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus][57]=[OLDPWD=/home/foo/usr/src][58]=[PIMORONI_PICO_PATH=/home/foo/usr/src/rpi/pico/pimoroni-pico][59]=[_=./c]picotool v2.0.0 (Linux, Clang-18.1.6, Release)
..because it's now in PATH. I just installed it to..

Code:

foo@sdu:~$ sd-QT which picotool/usr/local/QT/6500r/bin/picotool
If you can get the above "sd-enve" to build under windoze then it might show what's going on.

Statistics: Posted by swampdog — Wed Aug 14, 2024 9:56 pm



Viewing all articles
Browse latest Browse all 3873

Trending Articles