You might not notice, but even though the Arduino framework files get compiled and linked into a static library, they don’t subsequently get linked to your own code - as far as I remember from my own experiments.
Thanks a lot @maxgerhardt
As the picture shows, when selecting “ATmega8/A (Microchip)” in Board section, then the “Arduino” appears in Framework section, and it can not be changed.
My board is a custom board, and the chip is atmega8a, for the native avr program, is there anyway to change something that I can select my custom board in Board section and don’t let the “Arduino” appeared in Framework section when using Project Wizard?
Thats because when you select the ATMega8 its board JSON definition file tells it what framework it supports, and displays it accordingly.
You can just ignore the VSCode setup screen and input whatever board and whatever framework at random. It just generates the platformio.ini which you can later change to fit your needs. Just make sure you have the right platform, board and noframework = .. line. Even if you choose ATmega8 + Arduino, just remove the line afterwards.
You can create a custom embedded board as the documentation tells you if you want. You could basically copy the above referenced ATmega8.json in the boards/ folder of the platform-atmelavr folder (home folder + .platformio\platforms\atmelavr) under a new name, e.g. myboard.json, and set frameworks to an empty array and give it a new name value. The project wizard should then pick it up… I’m however not sure if it handles an empty framework array correctly.
Also I would not go through the work of a local platform modification just to have the “New project” wizard display the board with no framework option for an already known chip where you can just delete a line in the platformio.ini.
I read the documentation “Custom Platform & Board”, being lack of some necessory knowledge, I find that the document is hard to understand & follow the steps for creating a custom plateform & board.
For the native avr-gcc, I think the framework should be avr-libc.