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
Normal Topic Compiler settings in atmel studio 7 ( using atmel studio debugger ) (Read 5200 times)
danieldk
Junior Member
**
Offline


Posts: 11
Joined: Jun 18th, 2013
Compiler settings in atmel studio 7 ( using atmel studio debugger )
Jan 5th, 2017 at 12:14pm
Print Post  
hihi
Where does visualmicro forĀ  Atmel studio get the compiler and linker settings from ?


- my board is based on a portĀ  ( new variant ) for the SAM4S4A device,

in the Toolchain :  the c and c++ compiler settings show its importing files for sam3xa.

the linker was using a .ld file for the samd21g18 ( arduino zero ) instead of the one I specified in my boards.txt in the Variants folder.

I'm trying to figure out why the code compiles and uploads, but does not run on the cpu.

Windows 10, Atmel studio 7, Segger J-link
« Last Edit: Jan 5th, 2017 at 12:21pm by danieldk »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler settings in atmel studio 7 ( using atmel studio debugger )
Reply #1 - Jan 5th, 2017 at 12:25pm
Print Post  
Hi,

The compile and link does not use the atmel settings it reads the arduino ide settings and performs and arduino build.

The only time atmel should be invoked is to launch debug after visual micro has uploaded. 

Atmel should prompt device programming when debug launches for the first time. After you select the correct mcu, programmer etc. then debug should start.

This way we should see an an arduino build and upload and an atmel debug, not an atmel build.

You "port" should be an arduino style port that builds and works normally without discussion of atmel debug. 

Questions:-

Does your board work in normal arduino mode?
Does your board work when uploaded via the arduino ide?

Thanks

  
Back to top
WWW  
IP Logged
 
danieldk
Junior Member
**
Offline


Posts: 11
Joined: Jun 18th, 2013
Re: Compiler settings in atmel studio 7 ( using atmel studio debugger )
Reply #2 - Jan 5th, 2017 at 12:49pm
Print Post  
normal Arduino IDE loads my variant, compiles and uploads using bossa, but th ecode doesnt run on teh MCU ( it resets at the end of upload and then does nothing )

does visualmicro use boards.txt and platform.txt directly, or does it depend on the IDE to get those settings ?

Its a project I ported from an Atmel studio project to create a new arduino variant based on the Sam4s4a  - ( this was all pre Arduino Zero's D21 low pin count ARM )

I'm trying to figure out of my boards.txt, and all the variant configurations are correct, ( from verbose build it looks like its using the correct files )
and trying to see if my libsam was compiled correctly ( CMSIS, libsam and arduino core )

its easier for me to traverse calls through the imported files in atmel studio than in the arduino IDE.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler settings in atmel studio 7 ( using atmel studio debugger )
Reply #3 - Jan 5th, 2017 at 2:21pm
Print Post  
Make sense. Yes Visual Micro uses board.txt and platform.txt. It should give identical results to arduino ide.
  
Back to top
WWW  
IP Logged
 
danieldk
Junior Member
**
Offline


Posts: 11
Joined: Jun 18th, 2013
Re: Compiler settings in atmel studio 7 ( using atmel studio debugger )
Reply #4 - Jan 5th, 2017 at 3:52pm
Print Post  
cool, 
Do you know where it might be getting the 
"
Code
Select All
Documents/Arduino/hardware/laserx/sam/system/CMSIS/Device/ATMEL/sam3xa/include 

" from ?

AFAIK i'm not referencing anything from the arduino Due in my boards.txt or platform.txt

everytime after I load VS the device selection is back to SAM3X
cannot seem to find why it keeps wanting to use teh sam3x's SystemInit() ( looks like it crashed there from the few succesful step thru code times i've had )

- I have it working directly in atmel studio using atmel studio's toolchain using my arduino cores port, now its getting the arduino IDE to succesfully compile the code ( this is where visualmicro is realy useful ).



« Last Edit: Jan 5th, 2017 at 3:54pm by danieldk »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler settings in atmel studio 7 ( using atmel studio debugger )
Reply #5 - Jan 5th, 2017 at 4:23pm
Print Post  
Yes look at the recipe/pattern for cpp files. It includes {libsam.c.flags}. The libsam.c.flags are defined lower down in your platform.txt

Code
Select All
compiler.libsam.c.flags="-I{build.system.path}/libsam" "-I{build.system.path}/CMSIS/CMSIS/Include/" "-I{build.system.path}/CMSIS/Device/ATMEL/"
 



In visual micro you can switch on "vmicro>compiler>verbose" and "vmicro>compiler>show build properties" to see the compiler info
« Last Edit: Jan 5th, 2017 at 4:24pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint