AVR programming without arduino framework

I would like to know if it’s possible to use Platform.io for AVR programming in plain C without the Arduino framework (or any of it’s drawbacks). I’m using an ATTiny85 and an Arduino as ISP.



Is this your question?

You can use PlatformIO IDE for native AVR programming without any problems. Just put board = _the_nearest_board_for_your_mcu into platformio.ini and Menu: PlatformIO > Rebuild C/C++ Index.

To find some board ID with your MCU, please use PlatformIO Board Explorer.

For example

platform = atmelavr
board = pro16MHzatmega168

Did it help you?

Exactly what I was looking for! I was going to ask from your first answer if it was as simple as not using the line “framework=arduino” in the project file, which seem to be exactly that from your second answer.

Yes, the question on stackoverflow was mine. I didn’t get an answer linked to platform.io, thus I asked here. Thanks a lot!

Thanks, I’ve just updated our example platform-atmelavr/platformio.ini at develop · platformio/platform-atmelavr · GitHub

P.S: Would be thankful if you explain here ( c - avr-gcc vs Arduino in PlatformIO - Stack Overflow ) because my account is banned :frowning:

It’s done! :slight_smile: That’s what I wanted to do too. Thanks a lot for the help!

As pointed out by ivankravets on the platform.io community platform (see: AVR programming without arduino framework - #4 by cedricmenard), it is as simple as removing the line framework = arduino from the projectio.ini file to get rid of the Arduino framework and work in bare C for avr-gcc.

Thanks! A few corrections:


Please replace with PlatformIO. Platform io is ADs platform :smile:


Should be platformio.ini :blush:

Oh right thanks! I fixed the errors! :slight_smile: