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 Assembly In Visual Micro (Read 4942 times)
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Assembly In Visual Micro
Jan 23rd, 2017 at 6:07pm
Print Post  
Why not add the source file type *.s (lower case 's') to Visual Micro.  It is a great way to expose someone to assembly, minus real time debugging Sad and great for those die hards like me. 

See attached text file (rename to delayMS.s and add to your AVR project).  The *.ino must contain the following:

extern "C" {
     void delayMS(uint16_t);
}
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Assembly In Visual Micro
Reply #1 - Jan 23rd, 2017 at 6:56pm
Print Post  
Great idea. I will add as a new file option. Thanks very much
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Assembly In Visual Micro
Reply #2 - Feb 13th, 2017 at 4:26pm
Print Post  
I looked at this and started to build in the facility.

I hit an issue where by your example is specific to the avr architecture so it would be appreciated if we can also do same for SAM and SAMD if that makes sense.

Otherwise the menu item to create .s files will have to appear and disappear based on the currently selected hardware.

If you have time to give other examples that will be appreciated.
  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: Assembly In Visual Micro
Reply #3 - Feb 23rd, 2017 at 2:14pm
Print Post  
Yes, I should have specified I was doing this on AVR (Arduino UNO).  I do not have SAMD board to test with.  The feature would be nice but not necessary, since one can manually add the *.s file to an AVR project.
« Last Edit: Feb 23rd, 2017 at 2:15pm by Richard Arndt »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Assembly In Visual Micro
Reply #4 - Feb 23rd, 2017 at 2:17pm
Print Post  
Okay thanks. What might be useful is to provide an empty .s file more easily for visual studio users.

Atmel studio already has the facility so I guess you are using that.

Thanks again.
  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: Assembly In Visual Micro
Reply #5 - Feb 23rd, 2017 at 2:38pm
Print Post  
For those who would enjoy a little Arduino UNO assembly:

Create a Visual Studio/Visual Micro project named BlinkyAssembly.  Replace the BlinkyAssembly.ino create by Visual Micro with the attached BlinkyAssembly.ino. Place the delayMS.s file into the project folder and add it to your project ("Add Existing").  Compile and download.  The function void delayMS(uint16_t) is a blocking function that spins its wheel until it has consumed the delay period passed in.  This is provided only to demonstrate using assembly, and has not been exhaustively test for delay accuracy... but should be close  Roll Eyes

Rich
« Last Edit: Feb 28th, 2017 at 4:13pm by Richard Arndt »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint