![]() (1) Having to run cmake twice to configure correctly (mixed pico/pico_w build).In no particular order these are issues I've encountered. It would be better if the C and C++ stuff were in separate folders but as this is a "get things working" approach I'd suggest simply adding *.cpp and *.hpp into the above GLOB's so all user sources are in the same folder. Pico_cyw43_arch_lwip_threadsafe_background : $ PRIVATE "LINKER:-no-warn-rwx-segments") If you're finding that confusing, it would probably help to find a source for learning about software development and just day-to-day work in a Unix environment (there are many of them all around). And as others have pointed out, you can set up your system so that the environment variable is always set when you log in, which makes it the easiest way to do this for the SDK.Įnvironment variables and syntax such as '.' are everyday stuff in Unix, it's not about the Pico or cmake or the SDK. ![]() The Unix environment doesn't know or care if you're using it for cmake or anything else. A cmake variable only exists while cmake runs, whereas an environment variable persists for the lifetime of a shell session. The effects for building code are the same, but cmake variables and environment variables are very different things. CMake code usually first looks for the cmake variable, as defined with -D on the command line, and if no such value was defined, it looks for the environment variable. You can, for example, issue 'echo $PICO_SDK_PATH' on the next line to see its value. 'export PICO_SDK_PATH=/path/to/pico-sdk' defines an environment variable in a Unix shell. (And guessing furthermore that 'D' is for 'define'.) So my guess is that this feature of cmake is patterned after C compilers. ![]() It's the same syntax used on C compiler command lines to define preprocessor variables, as in 'cc -DFOO=bar', for example (it's the same as having '#define FOO bar' in your C source code). D on the cmake command line defines variables for the cmake invocation: -DPICO_SDK_PATH=/path/to/sdk means that the CMake variable PICO_SDK_PATH will have the value /path/to/sdk during that cmake run. ![]() Both seem to be the path to the same place. My question, I guess, boils down to what's the difference between -DPICO_SDK_PATH= and PICO_SDK_PATH=. Code: Select all $ export PICO_SDK_PATH=././pico-sdk and just cmake. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |