Search code examples
carduinoavr-gcc

avr-gcc vs Arduino in PlatformIO


I'm using PlatformIO as an IDE for programming AVR MCUs. I'm beginning AVR programming (I have a background in C/C++ and programming on OS's, not embedded, although I have done some Arduino stuff in the past) and using PlatformIO gives me code completion for the registers/pins, which is why I use it.

It seems I can't switch framework from Arduino to avr-gcc in PlatformIO without losing code-completing.

I am wondering if there's any drawbacks in keeping Arduino as the framework?

I know Arduino uses avr-gcc in the back, but I read that it still does a bit of setup without the users knowing it (such as Timer0 setting for delays, which I need since I'm using it as a clock source for USI on my ATTiny85).

Otherwise, is there anyway in PlatformIO to keep code completion and use avr-gcc instead of Arduino?

Thanks!

EDIT: I'm on either OSX or linux (ubuntu).


Solution

  • As pointed out by ivankravets on the PlatformIO community platform (see: https://community.platformio.org/t/avr-programming-without-arduino-framework/525/4), it is as simple as removing the line framework = arduino from the platformio.ini file to get rid of the Arduino framework and work in bare C for avr-gcc.