I am stuck with atmel ICE (AS7 or PIO/VSCode??)

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I am at a dead end in my projects.

I bought some 32 pin surface mount ATmega328p. I never managed to program them from a breadboard using Arduino as ISP so I decided to buy Atmel ICE.

I used to work with VS Code and platformio, so I could easily manage my Arduino libraries and create multiple file projects. I find it very efficient.

 

But I never managed to use the Atmel ICE on platformIO. For those of you who know how it works, I believe the closest I got to have a functioning platformio.ini file was:

[env:ATmega328P]
platform = atmelavr
board = ATmega328P
framework = arduino
upload_protocol = atmelice_isp   
upload_port = usb

So as I could not program with PIO, I downloaded Atmel studio 7 and it worked! unfortunately, I cannot figure out a nice way to write code with Arduino libraries on AS7.. There is that great option: import Arduino file as a new project, but I feel like it is only useful if I predetermine which libraries I am adding since I wont be able to add any new Arduino library once the project is created. It also seems like some libraries do not function properly once added to AS7.

 

So my question is: if I decide to use AS7, how am I supposed to proceed when using a bunch of I2C or SPI components in my project, which have an Arduino library? Am I supposed to recreate all the functions I need to operate them? This would seem like a waste of time. Or should I create a project from an Arduino sketch and deal with the errors? 

 

I am sorry if this is broad but I really need to understand what should be my next steps! Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jcsb1994 wrote:

upload_port = usb

https://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer

...

upload_flags =
    -Pusb

...

The follow-on to Atmel AVRISP mkII is Atmel-ICE.

Some third party AVR programmers implement STK500v2.

jcsb1994 wrote:
It also seems like some libraries do not function properly once added to AS7.
Possible tool chain mis-match.

https://github.com/arduino/toolchain-avr#configuring

...

At time of writing, the latest toolchain available is based on Atmel 3.6.1 version. It contains:

...

 


Pololu - 5.4. AVR programming using the Arduino IDE

 

"Dare to be naïve." - Buckminster Fuller