Trouble in Intel_mcs51 package

Hello PlatformIO community !

I just installed the intel_mcs51 platform, When I tried to import one of the examples, I got the following message in the output terminal :

Unable to resolve configuration with compilerPath “C:/Users/Ahmad/.platformio/packages/toolchain-sdcc/bin/sdcc.exe”. Using “C:\MinGW\bin\gcc.exe” instead.

This caused many code lines underlined by red error lines, could you please advise for a fix of this problem ?

In addition, there are paths missing in the default Include path, this is easy to fix but shouldn’t exist in the example projects

VSCode does not support SDCC as a compiler and falls back to GCC. The IntelliSense you’ll be getting will be there, but sometimes wrong (and it will also not find SDCC specific header files).

There are issues open for that on the VSCode side:

With the first one also containing instructions on how to add at least some SDCC include paths to configuration.

build_flags = 
   -I $PROJECT_PACKAGES_DIR/toolchain-sdcc/include

in the platofrmio.ini e.g. and a Ctrl+Shift+P → Rebuild IntelliSense should at least add the compiler’s internal include path to the include dirs in the .vscode/c_cpp_properties.json. (docs for variable).

Sadly, these VSCode issues are on Triage – they inspect the popularity of the issue with the upvotes / reactions on the issues, and if they don’t get enough compared to other issues, they’ll never be done…

However, compilation of these projects is completely unaffected, since PlatformIO takes care of that, and not VSCode. PIO calls into SDCC as normal and will compile your project. Just IntelliSense is affected.

1 Like

Thanks for your answer
Just a small correction to include the path :

build_flags = 

(without space after -I)
I made a vote on the issues. we wish it will be solved in the near future .