Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Support .asm files? How to create a new project? (Read 13286 times)
AdonisThe First
Newbies
*
Offline



Posts: 6
Support .asm files? How to create a new project?
May 2nd, 2015 at 1:46pm
 
Hi, I'm brand,spanking, new here. New to Arduino, Studio6.2 and Visual Micro.
I'd tried, and failed, to get Studio set up manually as per U Tube videos, and was relieved to see that Visual Micro now enables a more straightforward set-up for us beginners. (I'm not new to assembly language programming - I did loads of it, but DECADES ago!.)
I followed the (easy, clear) instructions and typed in the following assembler program:

/*
* PortBToggle.asm
*
*  Created: 01/05/2015 16:19:32
*   Author: AdonisTheFirst
*/

                  .INCLUDE "M328DEF.INC"
                  .ORG 0

                 LDI R16,HIGH(RAMEND)
                 OUT SPH,R16
                 LDI R16,LOW(RAMEND)
                 OUT SPL,R16

MAIN:
                 LDI R16,0x00
                 OUT PORTB,R16
                 CALL Delay
                 LDI R16,0xFF
                 OUT PORTB,R16
                 Call Delay
                 RJMP MAIN

Delay:
                 LDI R16,0xFF

Again:
                 NOP
                 DEC R16
                 BRNE Again
                 RET

Pressed the "build" button and got this in the report window:-

------ Build started: Project: AssemblerBlink01, Configuration: Release AVR ------
Build started.
Project "AssemblerBlink01.asmproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Assembler.targets" from project "C:\Users\DadMaster\Documents\Atmel Studio\6.2\AssemblerBlink01\AssemblerBlink01\AssemblerBlink01.asmproj" (target "Build" depends on it):
     Task "RunAssemblerTask"
           C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\avrasm2.exe -fI -o "AssemblerBlink01.hex"  -m "AssemblerBlink01.map"  -l "AssemblerBlink01.lss"  -S "AssemblerBlink01.tmp"  -W+ie -im328def.inc -d "C:\Users\DadMaster\Documents\Atmel Studio\6.2\AssemblerBlink01\AssemblerBlink01\Release/AssemblerBlink01.obj"  "C:\Users\DadMaster\Documents\Atmel Studio\6.2\AssemblerBlink01\AssemblerBlink01\AssemblerBlink01.asm"  -I "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\Include"
           AVRASM: AVR macro assembler 2.1.57 (build 16 Aug 27 2014 16:39:43)
           Copyright (C) 1995-2014 ATMEL Corporation
           [builtin](2): Including file 'C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\Include\m328def.inc'
           C:\Users\DadMaster\Documents\Atmel Studio\6.2\AssemblerBlink01\AssemblerBlink01\AssemblerBlink01.asm(8): Including file 'C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\Include\M328DEF.INC'
           "ATmega328" memory use summary [bytes]:
           Segment   Begin    End      Code   Data   Used    Size   Use%
           ---------------------------------------------------------------
           [.cseg] 0x000000 0x000024     36      0     36   32768   0.1%
           [.dseg] 0x000100 0x000100      0      0      0    2048   0.0%
           [.eseg] 0x000000 0x000000      0      0      0    1024   0.0%
           Assembly complete, 0 errors. 0 warnings
     Done executing task "RunAssemblerTask".
Done building target "CoreBuild" in project "AssemblerBlink01.asmproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Avr.common.targets" from project "C:\Users\DadMaster\Documents\Atmel Studio\6.2\AssemblerBlink01\AssemblerBlink01\AssemblerBlink01.asmproj" (entry point):
Done building target "Build" in project "AssemblerBlink01.asmproj".
Done building project "AssemblerBlink01.asmproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========


But nothing got loaded onto the Uno (Which works fine when running sketches on the Arduino IDE setup)
So I tried pressing the next button to the right (Build Solution F7)
Still no download into the Uno board.
Yes, I see the "Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '')."
But I have no idea what to do to fix/repair, because I don't know what it means!
No, I'm not dumb! Just new......this stuff is only easy if you know the answer!!! Or maybe I am dumb after all?

Please help, the package looks enthralling and I'm getting increasingly miffed that I can't play with it yet!
All assistance gratefully received. I will try to return the favour once I get acclimatised to all this new Stuff!
AdonisTheFirst.
Back to top
« Last Edit: May 4th, 2015 at 10:07pm by Visual Micro »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Where can I find the documentation and manual?
Reply #1 - May 2nd, 2015 at 2:15pm
 
Hi,

I am sorry I do not know which video you are talking about.

You should follow the documentation first steps, create a project etc.

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

There are a few ways that Visual Micro provides to create a project. None result in a .asmproj project.

Visual Micro provides Arduino projects in Atmel Studio

Regards
Back to top
 
WWW  
IP Logged
 
AdonisThe First
Newbies
*
Offline



Posts: 6
Re: Where can I find the documentation and manual?
Reply #2 - May 2nd, 2015 at 6:18pm
 
Thanks for your fast response, but unfortunately the tutorial you quoted hasn't helped.
- I used a standard, Atmel example (.INO file "Blink"). The INO file loaded, but wouldn't compile; and yes it was in a folder of the same name....

So I now think there's something corrupt in the installation.

I suspect that the passing of code/paths from one application to the other is not working properly. This may be because I've already spent a whole day installing and re-installing etc. and paths could be set wrongly because of old files/folders not wiped, or checked "good",  by the installation application.

I'd hoped that this Visual Micro + Studio 6 thing would be an "ease of use"  dream.



I'm wiping everything tomorrow, every last trace of this, the Studio 6 and the Atmel IDE, and starting again.....

Thanks anyway.
Sad



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



Posts: 10395
United Kingdom
Re: Where can I find the documentation and manual?
Reply #3 - May 2nd, 2015 at 6:33pm
 
Hi Adonis,

No need to wipe anything.

Just open atmel studio. Click "File>New>Sketch Project" and enter the name MyTest

A new sketch project should be created for you along with a single .ino.

You should see the Visual Micro tool bar with an App such as Arduino 1.6 and a List of boards such as Uno/Yun.

Select the correct board and then click "Build>Build Solution".

If the build fails please paste the error into a post so I can see it.

If any user interface elements from what I have described above are missing then please say.

Based on your response I will have more insight into the issues you are hitting.

Thanks

Back to top
« Last Edit: May 2nd, 2015 at 6:34pm by Visual Micro »  
WWW  
IP Logged
 
AdonisThe First
Newbies
*
Offline



Posts: 6
Re: Where can I find the documentation and manual?
Reply #4 - May 3rd, 2015 at 4:50pm
 
I already wiped everything, and reloaded strictly in the order of the Visual Micro guide.
(I'd been working with all sorts of "recommended methods" to get Studio working for ASM use before, so I suppose a certain amount of conflict was inevitable - though not warned to me beforehand.)
Everyone made their "just do this" recommendations without caveat.

Everyone,
except Visual Micro
, was
WRONG
to so lead me astray!
Angry

I'm now at the point of having the "Blink" .INO program (sketch) compiling and downloading OK. I could do that before with Arduino IDE of course, but it serves as a preliminary check that Studio 6 with Visual Micro is now working with the Visual Micro "goodies" included.
And I see the "solution" orientation of Studio which was never brought to my attention properly before.....

So, it was something obscure to me, or some form of corruption, that killed me before. Doesn't matter now.
I can continue.
So thanks.
Grin

Now to move forward to the goal of being able to program in Assembler. I'll need to get beyond where I'm at on the VM tutorials to check this out and compile/load an ASM test program, to get things started, no doubt.

Bear in mind that - though I was pretty smart at it, and made £10 per ASM line of debugged code at the time - my past experience was in the days when my £700 TI TM990 card had 32K of Ram and 32K of EPROM, with a whiz-bang 3Mhz Clock! My 20MByte (8") SCSI hard disk was the first unwrapped in England, and cost TI >£2,000. In 1979 money....

Roll Eyes
Any trapdoors I need to avoid?
(Loose women is not a fair response! I learned a lot about them along the way, too!)
Thanks.
Smiley
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Where can I find the documentation and manual?
Reply #5 - May 3rd, 2015 at 6:42pm
 
Funny.

I think you are heading into a difficult time. I know of zero other people trying to do what you do most stick to simpler cpp using the simple arduino build and library system.

This forum is free and just ensures that Visual Studio or Atmel Studio work exactly the same way as the Arduino Ide.

After that all other build questions should be identical questions if you were using the Arduino Ide and can therefore be asked on the arduino.cc forum where you will find people with lots of knowledge (unlike me)

Thanks
Back to top
 
WWW  
IP Logged
 
AdonisThe First
Newbies
*
Offline



Posts: 6
Re: Where can I find the documentation and manual?
Reply #6 - May 4th, 2015 at 10:27am
 
I can see the extra "convenience" features which Visual Micro brings to Studio 6 over the AVR IDE when simply using .ino source, but using Assembler is 1/3 of the main capabilities of Studio 6.....and it looks to me that the only real issue is sorting out the pointers/instructions from Studio 6 back to reference files in AVR, and the issue would be fixed for that all ASM usage!
Quite surprised that VM "gave up" on it!

Anyway, I'll follow your suggestion and take the issue to the Studio 6 folks instead.
Thanks for your interest.
Smiley
Back to top
 
 
IP Logged
 
AdonisThe First
Newbies
*
Offline



Posts: 6
Re: Where can I find the documentation and manual?
Reply #7 - May 4th, 2015 at 10:54am
 
For completeness, here is the source I tried compiling today:

/*
* ASMTest002.asm
*
*  Created: 04/05/2015 09:26:28
*
*   Author: AdonisTheFirst
*/


.DEF
     mp = R16

     
rjmp
     main

main:

     
ldi
     mp,0b11111111

     
out      
DDRB,mp

loop:
     ldi      mp,0x00
     
out
     PORTB,mp

     
ldi      
mp,0xFF
     
out      
PORTB,mp

     
rjmp
     loop


Output Window:-
------ Build started: Project: ASMTest002, Configuration: Debug AVR ------
Build started.
Project "ASMTest002.asmproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Assembler.targets" from project "C:\Users\DadMaster\Documents\Atmel Studio\6.2\ASMTest002\ASMTest002\ASMTest002.asmproj" (target "Build" depends on it):
     Task "RunAssemblerTask"
           C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\avrasm2.exe -fI -o "ASMTest002.hex"  -m "ASMTest002.map"  -l "ASMTest002.lss"  -S "ASMTest002.tmp"  -W+ie -im328Pdef.inc -d "C:\Users\DadMaster\Documents\Atmel Studio\6.2\ASMTest002\ASMTest002\Debug/ASMTest002.obj"  "C:\Users\DadMaster\Documents\Atmel Studio\6.2\ASMTest002\ASMTest002\ASMTest002.asm"  -I "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\Include"
           AVRASM: AVR macro assembler 2.1.57 (build 16 Aug 27 2014 16:39:43)
           Copyright (C) 1995-2014 ATMEL Corporation
           [builtin](2): Including file 'C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\Include\m328Pdef.inc'
           "ATmega328P" memory use summary [bytes]:
           Segment   Begin    End      Code   Data   Used    Size   Use%
           ---------------------------------------------------------------
           [.cseg] 0x000000 0x000010     16      0     16   32768   0.0%
           [.dseg] 0x000100 0x000100      0      0      0    2048   0.0%
           [.eseg] 0x000000 0x000000      0      0      0    1024   0.0%
           Assembly complete, 0 errors. 0 warnings
     Done executing task "RunAssemblerTask".
Done building target "CoreBuild" in project "ASMTest002.asmproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Avr.common.targets" from project "C:\Users\DadMaster\Documents\Atmel Studio\6.2\ASMTest002\ASMTest002\ASMTest002.asmproj" (entry point):
Done building target "Build" in project "ASMTest002.asmproj".
Done building project "ASMTest002.asmproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

Looks like the relevant pointers (probably for the downloading of code stuff) aren't quite correct.
Note that the VM plug in is setting the target processor (on the UNO) correctly (m328Pdef.inc).

I don't think this will be "rocket science" in the right hands. Your coders might find fixing this a way to enhance completeness claims for the plug-in?

Thanks again anyway.
AdonisTheFirst
Smiley
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Where can I find the documentation and manual?
Reply #8 - May 4th, 2015 at 2:35pm
 
Hi,

I didn't give up on anything but I am not atmel or arduino. I do not make any money from selling hardware.

You need to understand how to do what you want to do in arduino. If you can do what you want to do in the arduino ide and it fails in Vm then I am here to help.

If you are proficient you do not need Vm you can do everything long hand following internet instructions and use native atmel features.

Visual Micro brings Arduino to Visual Studio and because Atmel Studio is written in Visual Studio I was asked to make VM work in Atmel Studio. No money was paid for this work.

So I think you are being unreasonable by expecting me to help you with something where we both have the same documentation to work with yet it is only of interest to you.

I am sorry. Your attitude is very unfair. You don't want an Arduino solution by the sounds of it and don't shoot me for being the messenger.
Back to top
 
WWW  
IP Logged
 
AdonisThe First
Newbies
*
Offline



Posts: 6
Re: Where can I find the documentation and manual?
Reply #9 - May 4th, 2015 at 9:46pm
 
No insult intended Tim.
I didn't assume (or expect) that you, personally, would have to "fix"  any shortcomings, and especially not for nothing!

My reaction is one of surprise that Visual Micro say on their Home Page:
"Visual Micro is a free Arduino programming plugin that makes Microsoft Visual Studio 2008-2013 and Atmel Studio 6.2 into full Arduino programming environment."

Not YOUR claim, it's Visual Micro's claim!

Bearing in mind that the primary thing to select, when starting a New Project in the Studio 6 + VM plug-in is:
"C/C++, Assembler or Atmel Studio Solution" I'd expected VM to do as it says and provide a full "Arduino programming environment" for each one.

My expectation was incorrect.
But that isn't MY fault, either.

I suggest that you provide VM's Marketing guys/gals with copies of our posts here; if I can be misled, so can others, and bad news like that travels much faster than any good news.
They need to change their claim or add the missing features. Simple as that.
..... and if that presents an "earner" opportunity for you, that pleases me too!

(I can now, in a round-about-way, download Studio 6 Assembler code output into my UNO using the download routines from Arduino IDE. It wasn't easy to find and I sense that LOTS of folks are out there looking for ways to do this, getting more and more frustrated at their predicament).

I probably won't be here again for a while - the things I'm having to do to fill in the missing features don't involve the VM plug-in.
So best wishes for your own dealings here, and with VM.
I will stop by from time-to-time.
Smiley
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Support .asm files? How to create a new project?
Reply #10 - May 4th, 2015 at 10:05pm
 
Hi,

All vm can do is follow the build commands in the Arduino build definitions. They allow for .S files but not .asm.

You might want to know that vm is really just me at the moment Smiley
Back to top
« Last Edit: May 4th, 2015 at 10:07pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print