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) C assembler startup code (Read 9626 times)
JR
Newbies
*
Offline


Posts: 5
Joined: Dec 4th, 2014
C assembler startup code
Dec 4th, 2014 at 4:23pm
Print Post  
It would be nice to see the C assembler startup code in solution explorer.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C assembler startup code
Reply #1 - Dec 4th, 2014 at 5:28pm
Print Post  
Hi,

I am not sure I fully understand the question but if you want to see the arduino core and library sources then click "project>show all sketch files". (Click it again to remove them or delete yourself)
« Last Edit: Dec 4th, 2014 at 5:28pm by Tim@Visual Micro »  
Back to top
IP Logged
 
JR
Newbies
*
Offline


Posts: 5
Joined: Dec 4th, 2014
Re: C assembler startup code
Reply #2 - Dec 4th, 2014 at 5:54pm
Print Post  
Actually, Project -> "Show Sketch Core and Library Sources" does that. Project -> "show all sketch files" doesn't seem to do much.

All C programs use an assembler startup module that sets up the initial C environment and then calls main(). That is how main() gets called. I have had to make small mod's to the startup code on a couple of projects in the past.

This module does not appear in the solution explorer. It would be nice if it did.

See http://en.wikipedia.org/wiki/Crt0

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C assembler startup code
Reply #3 - Dec 5th, 2014 at 1:58am
Print Post  
If you are using atmel studio that was installed from the gallery you can update visual micro using the download from visualmicro.com

The latest release isn't in the gallery yet and includes support for the "show core and library sources". (I forgot the menu had been renamed in the past year)

The option has worked in visual studio for some years but the atmel version of visual micro has only recently been brought up to the same feature

You won't see an object file only the core and sources for arduino. if that isn't enough I can point you to the correct documentation.

Which platform are you using? avr/sam?
  
Back to top
IP Logged
 
JR
Newbies
*
Offline


Posts: 5
Joined: Dec 4th, 2014
Re: C assembler startup code
Reply #4 - Dec 5th, 2014 at 4:12am
Print Post  
I'm just making a suggestion that the crt0.asm (or whatever it's particular name may be) be included in the solution explorer. It is part of the build (although it is not obvious) and it would be nice to bring it into the light and list it, therby giving it the attention it deserves and longs for.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C assembler startup code
Reply #5 - Dec 5th, 2014 at 3:10pm
Print Post  
I see. The asm file is not specified in the arduino build configuration tools it is automatically discovered and used by the underlying tool chain.

You need to find the location of the file you need and then can add it as a link to your visual studio project.

Thanks
  
Back to top
IP Logged
 
JR
Newbies
*
Offline


Posts: 5
Joined: Dec 4th, 2014
Re: C assembler startup code
Reply #6 - Dec 5th, 2014 at 4:56pm
Print Post  
Yes, I realize that I can do it manually. What I am suggesting (this is the ideas and suggestions forum after all) is that it be done automatically just as the Arduino modules are listed automatically.

Please see that it is implemented.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C assembler startup code
Reply #7 - Dec 5th, 2014 at 4:58pm
Print Post  
Hi,

As I explained this information is not contained within the Arduino configuration files instead it is hard coded in some of the underlying tool chain programs such as avr-gcc.exe.

Therefore, unfortunately your request is not practical.

Thanks
  
Back to top
IP Logged
 
JR
Newbies
*
Offline


Posts: 5
Joined: Dec 4th, 2014
Re: C assembler startup code
Reply #8 - Dec 5th, 2014 at 8:13pm
Print Post  
Not practical - surely you jest. It's just a matter of programming after all.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C assembler startup code
Reply #9 - Dec 5th, 2014 at 8:33pm
Print Post  
Sorry I have not been clear.

Visual Micro does not know about any specific hardware. Instead it supports the Arduino 3rd party build definition and a few other build definitions.

This is why you point Visual Micro to your preferred Ide(s) and allows Visual Micro to support hardware such as Arduino, Intel, ChipKIT, Teensy etc which all basically use the same configuration system.

The Arduino 1.5.x Ide also works this way but with slightly less flexible variations.

Visual Micro reads the configuration files from each Ide which provides a list of boards, programmers and discovers the available patforms such as avr, sam, pic32 etc.

Each of the 3rd party Ides also includes a set of cpp/c/h/s files to be used within the compile. These files are located in sub folders below the definition files so they can be discovered from known locations. These sources are called the platform "core".

The compiler commands are also read from the configuration file of each Ide. The configuration files also describe which tools to run when compiling such as avr-gcc.exe or an arm compiler for arm boards.

Visual Micro is designed to provide a replacement for the Arduino Ide but inside Visual Studio and Atmel Studio. The various Ides that it supports are constantly changing and it is a lot of work to stay current and also support the past. Users range from novice through to expert but support being provided for free means that we need to keep as close to the Arduino Ide way of working as possible allowing users to ask questions and make suggestions via the open source community of each supported ide. This means that questions such as your should be raised with the core ide developers so that they include knowledge/location of the source code you are talking about within their config files.

Of course the source code you are talking about will exist in a slightly different form for each platform. I try when possible to help users but have to rely on users who want advanced functions providing good and clear information. 

So far you have not said which hardware platform you are using, which ide vs/atmel or which arduino ide version. 

You have said that you have edited the source before so you must know where it is located and what it is called? This would at least allow me to look if their is some automatic way of discovering the right files. 

If I guess you are using an avr board then I suspect that what you are after is the avr system files. You might see the help files from the avr system in the Visual Micro Platform Explorer. If these are the files you are talking about then it might be possible them on the new feature request list the only issue is that Visual Micro has to guess where they are located because as stated earlier in this post nothing in the config of any ide tells us where to find these files (Each toolchain works it out for itself using a hard coded relative location)

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint