Closed shabaz123 closed 1 year ago
(Please ignore this issue, it was a fault in my CMakeLists.txt file. I have corrected it, and this issue can be closed. For the benefit of anyone interested, it was a conflict with the header files for pico-lorawan, and a SD card FAT library, which both use files called spi.h. The solution was to place the text pico-lorawan/lib/LoRaMac-node/src/system as the first entry for target_include_directories in CMakeLists.txt).
(Please ignore this issue, it was a fault in my CMakeLists.txt file. I have corrected it, and this issue can be closed. For the benefit of anyone interested, it was a conflict with the header files for pico-lorawan, and a SD card FAT library, which both use files called spi.h. The solution was to place the text pico-lorawan/lib/LoRaMac-node/src/system as the first entry for target_include_directories in CMakeLists.txt).
Hello,
I don't know if it is an issue with my CMakeLists.txt or not, but when I tried integrating the pico-lorawan project into the rest of my application, I received an error, relating to spi.h during the code building.
The error is:
To fix it, I had to do these things:
in src/boards/rp2040/spi-board.c I had to add this line:
#include "../../../LoRaMac-node/src/system/spi.h"
in lorawan.c I had to add this line:
#include "spi.h"
Now the code builds fine, and runs.
My code structure consists of several files (main.c and so on) at a top level, and the pico-lorawan library is in a folder.
I'm a beginner with CMake, so I don't know if it's a real issue, or some fault at my end. This is what my CMakeLists.txt file contains:
If you think my CMakeLists.txt looks OK, then I'm happy to create a pull request with the modifications.
Many thanks!