platformIO for mcs51

Hi,I am a beginner.
There is a question about setting of PlatformIO.
I installed PlatformIO in VSCODE. when I creat a new project and click the Finish button.A warning appears in the output window:
“[2023/1/2 18:24:06] Unable to resolve configuration with compilerPath: “C:/Users/xxx/.platformio/packages/toolchain-sdcc/bin/sdcc.exe””
And the result of this problem is that the keyword __sfr is not be recognized,so the code have not be compiled.
where the problem?how to fix it?

The problem is with VSCode itself and Microsoft giving 0 support for the SDCC compiler doing the compilation for MCS51. See

Unless you apply these workarounds, you will only have basic and sometimes wrong intellisense completion with VSCode. (And actually I don’t know of any other IDE supporting SDCC for intellisense too).

thanks for your reply.
I checked my code,there are some errors inside,I corrected them,The code can be compiled successfully.

1 Like