PlatformIO Community

I don't understand the PlatformIO build process at all

I’ve created a custom N76E003 “board” under “mcs51” and installed SDCC, then wrote a bare-metal blinky in C.

I wanted to compile it so I clicked the checkmark icon, thinking it would auto-generate a makefile but instead it wants me to create a “task”. Makefiles are defacto standard for bare metal projects and I thought one would be auto-generated like it is under Eclipse with the SDCC plugin.

I’m totally baffled. Every tutorial on the web seems to want me to use C++ and Arduino framework, but I want to use C and bare-metal via SDCC. I know that my blinky code works because I’m able to run it in Eclipse+SDCC, but PlatformIO is wanting me to do something which I don’t understand.

Can someone please point me in the right direction? I don’t see how to feed any kind of makefile into PlatformIO so I’m completely lost. Also, PlatformIO installed a 2 year old version of SDCC! I’m kind of okay with that but it seems weird. I also don’t want to invoke any frameworks such as MBed and especially not Arduino, for such a simple project.

I did look into running it via “unit testing” but came up against the same issues. I’m starting to think that I need to learn how to use Arduino, just so I can understand how to completely avoid it, lol.

Hmm, there are other well known issues in that VSCode does not support SDCC. Solutions proposed:

You might be running into this issue, which is solved by a VSCode restart.

Bare-metal example projects are in the platform.

This only affects IntelliSense, not building. I’m running bare-metal projects on my Intel 8051 style CPUs and it works just fine with PlatformIO.

Thanks, that was it! Some pokes and restarts got it to pop out a binary. I also tried CodeBlocks today and found that it plays nicely with SDCC (and has an 8051 project wizard). Lot’s of good choices.