Open Molgaard78 opened 9 months ago
This project relies on the CMake extension for VSCode to build. I didn't update the README to show that you also need to define paths for all the other libs you mentioned. I have set all the paths on my CMake extension configuration.
Like so;
Well it is possible to make your setup a little more generic when using VS Code.
I installed the VS Code with pico-sdk support using the official guide.
So whenever I launch the Pico version of VS Code, then the PICO_SDK_PATH
environment variable is already defined as part of launch of VS Code.
I also found out that the FREERTOS_KERNEL_PATH
I was using pointed to a not up-to-date version, so that gave a few compiling errors.
I have added the FreeRTOS Kernel to my lib folder, and now my .vscode\settings.json
contains the following addition:
"cmake.configureEnvironment": {
"CORE_MQTT_PATH": "${workspaceFolder}/lib/coreMQTT",
"CORE_MQTT_AGENT_PATH": "${workspaceFolder}/lib/coreMQTT-Agent",
"FREERTOS_KERNEL_PATH": "${workspaceFolder}/lib/FreeRTOS-Kernel",
"JSON_MAKER_PATH": "${workspaceFolder}/lib/json-maker",
"TINY_JSON_PATH" : "${workspaceFolder}/lib/tiny-json",
"TWIN_THING_PICO_PATH" : "${workspaceFolder}/lib/twinThingPicoW"
}
However building you project now gives me a lot of complains about configUSE_CORE_AFFINITY is not supported in single core FreeRTOS
.
I guess that relates to configs/FreeRTOSConfig.h
? :-)
Found that error a bit odd, since Raspberry Pico W does have a dual core CPU, so why does it talk about running on only one core? :-)
I thought the point of using FreeRTOS was to fully utilize the CPU.
Looks like FreeRTOS was updated and something changed. Replace the FreeRTOSConfig.h in the project with one from the FreeRTOS repo
Looks like FreeRTOS was updated and something changed. Replace the FreeRTOSConfig.h in the project with one from the FreeRTOS repo
This is a bug in FreeRTOS they are fixing it - so it follow the normal naming
I am trying to build your project using VS Code and ran into a few issues.
For reference when I write a path below the name of my workspace folder is
PicoMQTT
.To start off VSCode complained that it could not find
mqttFilePaths.cmake
andmqttAgentFilePaths.cmake
. It will also complain aboutjson-maker
andtiny-json
missing.I solved all those issues by creating a subfolder called
lib
and ran the following commands inside the folder:I also added the following to
CMakeList.txt
in the workplace root folder:I added the statements just prior where you are defining your config files.
Like so:
However:
When I try to build the project I get the error:
I can see the value is defined in
PicoMQTT\configs\CoreMQTT\core_mqtt_config.h
, so how come that the compile cannot find the file when compiling the project?I could copy-paste the definition for
MQTT_COMMAND_CONTEXTS_POOL_SIZE
over, but then I get a range of other compiling issues, so it looks to me that there are a general cross-referencing issue going on that is not being handled.