AVR Studio 5.1 is no good, any alternative assemblers?   - Page 1
Forum section: electronics / general

author: commie
author_rank: Frequent Contributor
timestamp: September 20, 2015, 11:30:40 am
content: HiI'm playing around with DDS in an AVR attiny4313 chip, using my high level compiler I can get a single run of my program in 72 clocks.However, using low level assembler I can get this down to 9 clocks which is highly desirable.So, my high level solution works no problem but I can't get my low level assembler program working using Atmels AVR studio 5.1, it's just too complex to use, so my question is simple, are there any easy to use AVR assemblers out there available for download.Really, Atmels studio is a joke.

author: alank2
author_rank: Super Contributor
timestamp: September 20, 2015, 07:54:47 pm
content: The latest studio is 6.2 SP2 and I think 7 is in beta. They replaced 5 with 6 pretty quickly so I'm not sure how many people used 5. As I recall it had a lot of problems...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: September 20, 2015, 08:10:59 pm
content: I use AVR Studio 4.19.http://www.atmel.com/tools/studioarchive.aspx

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: September 20, 2015, 08:18:05 pm
content: I hate Studio 6 because it is a bloated resource hogging piece of crap. It will only work with Win 7 & above. Studio 5 is even worse. I use 4.19 (it has simulator 1 & 2) so the older chips are supported. Please do yourself a favour and remove the Studio 5 virus and install 4.19 with AVR GCC. I think you will be happy. Tons of videos. Enjoy.Quote from: Bruce Abbott on September 20, 2015, 08:10:59 pm" Ditto

author: commie
author_rank: Frequent Contributor
timestamp: September 20, 2015, 09:15:02 pm
content: Well, I thought it was just me but it seems 5.1 is hated throughout. I do have version 4 installed on my computer but unfortunately it does not support my target chip which I was using, it is a attiny4313 , only 5.1 and above supports it.However, not to get mixed up, v4.1 does support the attiny2313, dunno?? go figure.Anyway, I did get my project working using the attiny4313 and V5.1(takes forever to load, so slow to use it), basically I'm trying to make a programmable dds, at first, I used my compiler and I had it working more or less straight away, the problem.... was it was gobbling 72 mcu clocks in its loop, the pure assembler version takes only 9 clocks giving a maximum sine wave frequency output of just over 10KHz(brill), with my compiler I was struggling to get 2KHz with 8 bit res.dac.It took me a good part of a whole day to get it working using V5.1 in assembler, but best of all, I have also managed to embedded it in my high level compiler mixing asm and compiler and it works, so now I can interrupt the chip and change the frequency on the fly.

author: ralphd
author_rank: Frequent Contributor
timestamp: September 20, 2015, 09:56:20 pm
content: I do most of my development from the shell, using avr-gcc, which is part of the Atmel AVR toolchain.http://nerdralph.blogspot.ca/2014/06/atmel-avr-toolchain-344.html

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: September 20, 2015, 10:10:26 pm
content: Um..wah???Mine works just fine. I used to be a diehard 2313 man. Same diff more mem. I think it's the 4.19 thing that is the issue. Try my version.Quote from: commie on September 20, 2015, 09:15:02 pm

author: westfw
author_rank: Super Contributor
timestamp: September 20, 2015, 11:55:14 pm
content: Everyone seems to hate AS5.x, and it's widely recommended that it be avoided. If the bloat doesn't bother you, go to AS6.2; it's not really THAT bad.Alternatives:For AVR assembler programming, there are two main "varieties" of assembler floating around. There is the Atmel assembler, as designed and documented by Atmel and used in their datasheets and examples, and there is the Gnu assembler (part of gcc), which is different because ... gnu.Atmel assembler alternatives:You can always install Atmel Studio somewhere, extract the CLI assembler code and relevant include files, move them somewhere else, and use it without Studio wrapped around it. (something like C:\Program Files\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler )tavrasm:http://freecode.com/projects/tavrasmavra:http://avra.sourceforge.net/(runs on macs, too!)Neither avra nor tavrasm is what I would call "actively maintained."Gnu assembler:WinAVR (old and no longer supported):http://sourceforge.net/projects/winavr/files/Atmel Command Line tools:http://www.atmel.com/tools/atmelavrtoolchainforwindows.aspx(also available for linux)Assorted other gcc-related packages for various operating systems.(And of course there are some other compilers and assemblers from commercial vendors. Imagecraft and IAR spring to mind.)Quotemildly unbelievable, except for bitshifting algorithms that can make use the carry bit. (but you didn't ask for help with your code...)Don't forget that most compilers have inline-assembler capabilities. (did I mention that the Atmel Assembler does not support linking with other modules?)

author: alank2
author_rank: Super Contributor
timestamp: September 21, 2015, 01:00:43 am
content: I used to think "don't pry 4.19 from my hands", but 6.2 is actually pretty nice. It has support for newer parts which is one of the reasons I finally broke down to start using it. I found though that right with the standard options it would make code as compact as some of my hand tweaked makefiles that had whole program optimization enabled.

author: rs20
author_rank: Super Contributor
timestamp: September 21, 2015, 01:23:43 am
content: I use Atmel Studio 6.2, and it's perfectly fine. After all, I like coding firmware, not crafting build scripts (and this is coming from someone with two linux servers in the house). It's free. It's fast enough*. It has code refactoring tools ready to go. It has easy menus to flip between debugwire and SPI.It has on-chip debugging.Anybody who proposes avr-gcc (a compiler) as an complete alternative to Atmel Studio (a completely integrated IDE) is surely trolling. On that note, though, the OP's question seems odd. Atmel Studio is an IDE, and it just uses the avr-gcc assembler internally, right?* I do have a pretty good computer though, so I'm evidently oblivious to this supposed bloat.

author: westfw
author_rank: Super Contributor
timestamp: September 21, 2015, 05:10:28 am
content: QuoteNo, by default a "assembler project" in studio would use the Atmel assembler:Code:Build started.Project "AssemblerApplication1.asmproj" (default targets):Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').Target "CoreBuild" in file "C:\Program Files\Atmel\Atmel Studio 6.2\Vs\Assembler.targets" from project "C:\Documents and Settings\Bill\My Documents\Atmel Studio\6.2\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asmproj" (target "Build" depends on it):Using "RunAssemblerTask" task from assembly "C:\Program Files\Atmel\Atmel Studio 6.2\Extensions\Application\AvrAssembler.dll".Task "RunAssemblerTask"C:\Program Files\Atmel\Atmel Toolchain\AVR Assembler\Native\2.1.1175\avrassembler\avrasm2.exe -fI -o "AssemblerApplication1.hex" -m "AssemblerApplication1.map" -l "AssemblerApplication1.lss" -S "AssemblerApplication1.tmp" -W+ie -itn4313def.inc -d "C:\Documents and Settings\Bill\My Documents\Atmel Studio\6.2\AssemblerApplication1\AssemblerApplication1\Debug/AssemblerApplication1.obj" "C:\Documents and Settings\Bill\My Documents\Atmel Studio\6.2\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asm" -I "C:\Program Files\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 CorporationTo use avr-gcc as an assembler, you'd create a C project and add assembler files to it. (because gcc-assembler modules have to go through essentially the same build phases as a C program: preprocess, assemble to .o, link to .elf, convert to .hex...

author: obiwanjacobi
author_rank: Super Contributor
timestamp: September 21, 2015, 06:00:44 am
content: I work with Visual Studio in my day job so Atmel Studio (6.2-SP2) - which is build on Visual Studio 2010 shell- feels very familiar. For my needs (no assembler) is works quite nice. The only thing is that I had to add an External Tool entry to have avrdude drive my Chinese USBaps programmer. Some shortcuts in the editor are different than standard VS but that is fine.I do not know any alternatives that give you this developer experience - but I'd like to know if there are any.

author: rs20
author_rank: Super Contributor
timestamp: September 21, 2015, 06:41:36 am
content: Btw, can't you just use __asm__ blocks in C? I did that a while back to incorporate some SIMD instructions on a project involving a 32-bit AVR chip, and I was using Atmel Studio. Worked fine?I ask partially from a place of ignorance, I didn't really consider that therewasany other way, let alone another way that was preferable. I've already been corrected once or twice in this thread, please keep it up

author: commie
author_rank: Frequent Contributor
timestamp: September 21, 2015, 10:33:40 am
content: Quote from: Quarlo Klobrigney on September 20, 2015, 10:10:26 pmI downloaded V4.18 or V4.19 last night, I now have support for attiny4313 with Studio 4.18, great stuff, so I don't need V5.1 anymore, lovely

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: September 21, 2015, 11:52:43 am
content: Excellent! Enjoy the happiness!