VSCode linting
Hi,
I have followed this tutorial https://www.plcnext-community.net/makersblog/how-to-use-visual-studio-code-to-write-c-for-plcnext/ for setting up VSCode. I'm using the 2024 toolkit and SDK for the 2152. It runs in a docker dev container on an ubuntu machine. Everything works fine, I can create and build projects and have tested them on PLCnext hardware. The issue I'm facing is with the linting in vs code.
I get this error,
#include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (<filePath>).C/C++(1696)
cannot open source file "gnu/stubs-soft.h" (dependency of "StarterKitProgram.hpp")C/C++(1696).
What is the best way to set up c_cpp_properites.json to avoid this? as the way in the blog does not work for me.
Thanks,
Adam
Comments
After a better read of the blog, I tried this and it does seem to solve the above issue.
"compilerArgs": [
"--sysroot=/opt/axcf2152-linux_sdk_2024/sysroots/cortexa9t2hf-neon-pxc-linux-gnueabi",
"-march=armv7-a",
"-mthumb",
"-mfpu=neon",
"-mfloat-abi=hard",
"-mcpu=cortex-a9"
]