Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) wrong controller type detected (Read 9763 times)
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
wrong controller type detected
Jan 21st, 2017 at 11:51am
Print Post  
Hi,

Using Atmel Studio 7
I did install the XMega for arduino XMEGA Boards extension version 0.9.1

In the Ardiono IDE I did onstall the XMega extension as well

My controller: ATXMega32E5

With Arduino IDE all works well

But when I import this project with VisMicro then the controller change to ATSAM3x8E...I did not install any SAM thing, also checked in the Board Manager of Vis Micro...is not installed.

any idea how this can come?

Btw.: Atmel Studio complains during Project import that ATSAM3x8E is not supportet Sad

rgds
Martin

« Last Edit: Jan 21st, 2017 at 11:53am by LED Project »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #1 - Jan 21st, 2017 at 1:07pm
Print Post  
Hi,

Thanks for the post which relates to an attempt to setup intellisense in atmel studio. The build and upload should be working fine. (The arduino ide doesn't have intellisense so won't be an issue because it only does the build part)

The atmel intellisense only supports certain boards so visual micro has to switch unknown boards to a known atmel board type. If it doesn't know a board it pops up the error you see.

The issue is because boards such as Teensy used to use AVR but then moved to non-Atmel hardware. This causes atmel to show the error you see therefore visual micro attempts to use intellisense for a known board (SAM).

In the short term install the SAM hardware for atmel studio and you will have 80% intellisense + full build and upload.

In the next release we will add support the the ATXMega boards allowing atmel to use the correct intellisense definitions

We don't have this issue in Visual Studio which is more flexible than Atmel in this area.
  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #2 - Jan 21st, 2017 at 1:16pm
Print Post  
WOW Thanks so much for the fast answer

I use Atmel Studio for debugging

I am a not experienced with Windows, only using Windows exactly for one reason: to write Atmel software Smiley
MacOS is my "home"

So, the questions:

Can I install Visual Studio and Atmel Studio in parallel?
and after converting the Ardiono projec then import the project to Atmel studio?

hopefully this quesion is not too ....strange Smiley

Btw.: I have no problem to buy a 49 GBP license in case I can get this running and in case I can get a invocie; which is never so sure with British suppliers (some law difference)

rgds
Martin

« Last Edit: Jan 21st, 2017 at 1:20pm by LED Project »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #3 - Jan 21st, 2017 at 1:37pm
Print Post  
Hi,

You are right you will need the next update for atmel studio debugging because it also relies on the correct mcu type.

Yes you can install visual studio side by side. I have them all installed (atmel 6.2, 7.0, visual studio 2010->2017RC and they run happily.

You will need to install extensions within "Atmel studio >tools>extensions and updates" not directly using the downloaded .vsix from the www gallery.

Unless you use sub folders for you code outside of the allowed arduino \src sub folder your project code remains arduino  ide compatible. 

It does not use projects so there isn't really a concept of importing code. In fact you can delete the atmel .cppproj Project and the visual studio .vcxproj Project from your project folder then use "file>open>arduino project" in each ide to have a Project recreated. 

The ide project files just power intellisense and give you slightly more control over which files get compiled all other settings are worked out dynamically in the same way the arduino ide works. Visual micro entirely overrides the build  process to be like Arduino and does not let the IDE's do any part of it.

One tricky element in atmel that needs more work is that they have a different format .cppproj for each architecture. It's easy to sort out if you have ended up with the wrong project type. 

It sounds like you have a 32bit project type which is why the SAM is picked as the fallback. I suggest creating a new visual micro (8bit) project. Then rename the .cppproj to the current project name and copy the file into your current project folder. Then open the project in atmel as normal. Click "show all files" above the solution explorer and right click the sources to include them in the project.  After you do this you will have taken a new empty atmel project and rebuilt it.

Both IDE's use a "project" file with different extensions but they are both simple xml text files. The .sln is also a very simple xml text file. You can hack them in the future if need be.


  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #4 - Jan 21st, 2017 at 1:56pm
Print Post  
Hi Tim

>You will need to install extensions within "Atmel studio >tools>extensions and updates" 

I did so

>Unless you use sub folders for you code outside of the allowed Arduino
I have a standard Arduino Project in the standard folder structure
The project uses the *.INO, 1 CCP file and 2 *.h files

the the *.INO is imported into the Atmel Studio project, all other things not

some hrs ago I did import a Arduino project for a UNO with the Atmel built in Function..then all used libraries and project files are copied to the project folder
Unluckily this works for UNO only.

After some questions to Mr. Google I found your tool

maybe it works different and do not add all to a nice project folder?

I also recognized that you do not make  a new environment in the Atmel folder structure, maybe this confuses me so much.

Visual Studio is installing in the meantime…no idea what I am doing there….millions of options to instal and I do not know if need any. will see.

rgds
Martin
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #5 - Jan 21st, 2017 at 2:10pm
Print Post  
Not sure I fully understand. I will test the "open arduino project" feature in as7 before next release so wee why cpp and h files are not added automatically to the project for you.

You can follow my previous guide in the solution explorer show all files and include any files that have the red mark next to them. VS works the same when it comes to including files.

Yes visual micro works with the arduino folder structure and performs an arduino build for the files included in the project.

The first steps guide in the documentation will show you the full build and upload cycle.

http://www.visualmicro.com/page/User-Guide.aspx?doc=index

Visual studio only requires the C++ option for arduino to work. In Visual studio 2017 they have made a new installed that  installs much less junk and has a clearer option for the C++ install.

If you are using atmel debug (with a non-arduino hardware debugger) then you won't use visual studio
« Last Edit: Jan 21st, 2017 at 2:11pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #6 - Jan 21st, 2017 at 2:29pm
Print Post  
Hi Tim

OK, I understood…it is a different approach, you use the original structure

Basically I only need to add 1 library (RFM65) from an Arduino Test project to a bigger existing project which exists in Atmel Studio

I am just too lazy to rewrite this RFM65 for XMEGA, to be lazy is usually not a good idea Sad

When I sum up all the time need for install an re-install and try this and that…then maybe  I would be already done with porting the RFM69 to pure C.

rgds
Martin
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #7 - Jan 21st, 2017 at 2:51pm
Print Post  
I think you are confused by the fact that atmel added an arduino import into as7. that's not visual micro. 

Visual Micro retains the arduino structure. Libraries are not added to the project they are simply #included in the same way you do for arduino. There are advanced visual micro options to bring external sources such as lib and core into the project but you won't use those features just yet.

Maybe I am confused. A screen shot of your project with solution explorer open would help

Thanks



  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #8 - Jan 21st, 2017 at 3:36pm
Print Post  
Hi Tim

from wich Project a screenshot would help?
Atmel Studio only add the INO file noting els when I use ViMicro and the wrong controller
Visual Studio with ViMicro  do all well.

you are right!!!, Visual Studio works much better

The complete project show up in a nice structure, all what is needed.
EDIT:
the above is not true, all Arduino internal referenced files are not listed. So, does not help for my needs.


in order to transfer this „project tree“ to Atmel Studio I would need to know the location of all the files, some are on the system more than once (the XMEGA instances for example“
but more important: where is the main ()?
Atmet Studio Import of Arduino generates a main file with a simple main function which basically calls init and then while (1) loop()

I do not really know what this "arduino" system is doing behind the scents..all the initial processor setting like speed and controller specific setup is still mystic.

For programming with Visual Studio some problems remain 
1) I have a AVR Dragon board and the XMEGA-E5 Xplained Board
2) vMicro or Studio, recognize the Dragon board but with ISP only -- the XMEGA-E5 Xplained need PDI
3) when I select Dragon Board as Programmer then MicriBuild returns STK500 Error Sad

rgds
Martin
« Last Edit: Jan 21st, 2017 at 5:51pm by LED Project »  
Back to top
 
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #9 - Jan 21st, 2017 at 3:47pm
Print Post  
Tim@Visual Micro wrote on Jan 21st, 2017 at 1:37pm:
It sounds like you have a 32bit project


I am wondering how can come I may have a 32bit project, maybe something wrong in the XMEGA Boards extension version 0.9.1
rgds
Martin
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #10 - Jan 21st, 2017 at 4:55pm
Print Post  
Let's stay in visual studio and arduino for now.

What do you click in the arduino ide to upload to your board?

Thanks
  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #11 - Jan 21st, 2017 at 5:00pm
Print Post  
In Arduino Nothing, I did upload some tests with Atmel Studio for the ATXMEGA

In Arduino I did try the RF69 software with an UNO, after all worked I did change the settings to the XMEGA-E5 and compile again without errors but did not upload again becasue not sucessful to transfer the scetch to At Studio.

my XMEGA-E5 hardware setup works for software which I write directly in AT Studio.


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #12 - Jan 21st, 2017 at 5:08pm
Print Post  
Why are you trying to use visual micro it is for Arduino? You are not using an arduino compatible system.

You just need a standard atmel cpp project or to use the atml studio "import/convert" which will convert the .ino files to .cpp.

Without the .ino files visual micro goes to sleep and does nothing. Atmel does not support .ino files in standard .cpp projects.

Sorry for the confusion.

  
Back to top
WWW  
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #13 - Jan 21st, 2017 at 5:38pm
Print Post  
Hi

I did "extend" both the Arduino IDE and the Visual Micro with

https://raw.githubusercontent.com/XMegaForArduino/IDE/master/package_XMegaForArd...

or something like that.......from inside the IDE and from inside Visual Micro the correct link is used

rgds
Martin
« Last Edit: Jan 21st, 2017 at 5:44pm by LED Project »  
Back to top
 
IP Logged
 
LED Project
Newbies
*
Offline


Posts: 9
Joined: Jan 21st, 2017
Re: wrong controller type detected
Reply #14 - Jan 21st, 2017 at 5:41pm
Print Post  
I think the only problem is Visual Micro support ISP but not PDI or any of the many other programming interfaces used by Atmel

Just guessing.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong controller type detected
Reply #15 - Jan 21st, 2017 at 6:33pm
Print Post  
You needed to extend the arduino dragon definition using boards.txt and programmers.txt to add dragon support for your board.

Or after the next update use as7, in visual micro, set the programmer to be "Use atmel studio device programming". Then visual micro will hand over the upload to the currently selected atmel studio device.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint