Atmel Studio 7 importing Arduino project UIPEthernet problem

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I'm not sure is Atmel Studio or Arduino group better, bu I decided to write it here.


First of all I'm rookie in Atmel Studio so be polite ;-)

Even If I know what I want to do, I don't know where AS options are.

Besides those situations I don't know what to do ;-) 


I would like to debug code for atmega328p I have written in Arduino IDE as changing one line, uploading it to uC and checking effect is not efficient.

I'm balancing on 31kb border of flash so adding Serial.print() is not a good idea.

I need to debug POST form because I have a suspicion that it eats all sram memory and messes with already set variables.

So I was thinking that using Atmel-Ice which I bought used on OLX (polish second-hand stuff website) is a good idea.

I also thought to learn something new. 

But before debugging I stuck with different problem.


I have installed Atmel Studio 7 and tried to import Arduino sketch. Import works fine, but... it doesn't compile throwing errors.


Trying to get to the point, I made very simple test sketch just with header file:

#include <UIPEthernet.h>

void setup() {


void loop() {


and imported this sketch to Atmel Studio 7.


When I try to compile I get errors that:

C:\tmp\AtmelStudio\import004\import004\ArduinoCore\src\core\IPAddress.cpp(23,1): error: 'IPAddress' does not name a type

and a bunch of following errors. As I understand it means exactly what it says IPAddress is not a type name and this means that proper header file IPAddress.h was not included.
In src/core/IPAddress.cpp file I have IPAddress.h file included:

20: #include <Arduino.h>
21: #include "IPAddress.h"
23: IPAddress::IPAddress()
24: {
25:    _address.dword = 0;
26: }

But putting cursor into the filename shows the path in Definitions bar which is wrong I gues - screen1.jpg

because if it's src/core/IPAddress.cpp IPAddress.h should be taken from include/core/IPAddress.h not from include/libraries/uipethernet/mbed/IPAddress.h what you can see on a screenshot.

Am I right?



What I did till now:

1) I create very similar sketch with Ehternet.h (so "original etherent header") and imported it into Atmel Studio 7 - everything works fine and I can compile/build solution without any problem.


2) I have compared both solutions and figured out (can be mistaken) that some paths to IPAddres.h are different in both cases and compiler takes UIPEthernets IPAddress.h file instead of core arduino one and this causes the error.


 3) I tried to look closer into Makefile and compared them between original Ethernet and UIPEtherent solutions


4) I have reordered some paths in UIPEthernet solution, setting src/core before src/libraries/uipethernet and this gives me errors in different places


What I can't find is the place in Atmel Studio (or maybe it's lack of c/c++ knolege) how to set pat to included header for specific file?

As I understand in Makefile there is a certain order for compiler to search for header files - do I understand it correctly?


5) I'm continuing to find solution to this compile problem in comparison to working Arduino library



I'm attaching working ( and not working ( solutions

if there is someone who have enough time to explain me what is going on in not working solution and hopefully how to fix/set this I will be grateful.


Of course I'm still searching... 


Thanks in advance



My Atmel Studio is 7.0.2397
Device Package Manager for Atmel.ATmega_DFP.1.4.315

Arduino IDE 1.8.2




Last Edited: Tue. Jul 21, 2020 - 10:12 PM