howto: Use Atmel AVR Studio 5 to make a .hex file

When I arrive at this step “Build > Build AVRGCCxx” I am getting this:

I am trying to make a .hex file for MiniMo

I thought the original code was omitted to declare lastmode. Add lastmode=1, to the 10th line uint8_t count=0,mode=0,waspressed=0;

Stock code minimo?

I compiled the original code
https://www.dropbox.com/sh/e9n69yjcmj1s24m/AAAzVZaYmnfLUTghN-Cz9b74a

@Microa
Thanks!

@WarHawk-AVG
Yes the stock one.
I will try it tomorrow, now I am using “STAR momentary with srobo…” and it works nice.
I wanted to modify MiniMo to get short press for “ON/OFF” and long press to be for “next mode”, and to have memory. That would be perfect for momentary switch.
It is very annoying when you don’t have single click for ON/OFF

P.S. MiniMo doesn’t have voltage monitoring and strobe :frowning:

Hi, Can anyone offer me any help with AVR studio?

I have V6.1 installed, as i was unable to get V5 to install on any of my computers.

I am taking SRK_no_ramp_1.0.c from jcapsolutions.com.

I am following the instructions comfychair gives in the first post (thanks). While the options in 6.1 are named slightly differently, it seems very similar, and obvious which buttons to click in 6.1.

After I click build, I receive the error:

Error 1 variable ‘modes’ must be const in order to be put into read-only section by means of ‘attribute((progmem))’ C:\Users\xxx\Documents\Atmel Studio\6.1\GccApplication1\GccApplication1\GccApplication1.c 59 18 GccApplication1

This means nothing to me! If anyone could help that would be great. Thanks.

Change this line

PROGMEM uint8_t modes = { MODES };

to

PROGMEM const uint8_t modes = { MODES };

Thanks i will give it at try now.

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

Excellent. Thanks!

Hi Comfy,

Thanks for doing this. I have been using AVR S.4 and attempted to do this, but since I dont know what I am doing I didnt get anywhere.

I have also attempted multiple times to download 5, but am having no luck with that either. Is this where I am suppose to get it from?
https://docs.google.com/file/d/0Bz85IxvlZQErdlpFYUhpbjYtZGM/edit

That linik is what I’m using. EDIT: although many BLF members are now using Atmel Studio 6 I believe.

Yeah that’s what I’m using.
I’m not sure what the benefit/differences are between the latest and the older versions of the software but 6 seems to work perfectly for the basic source editing and generating of hex files that I used it for. That’s on Windows 7 64bit btw.

Has anyone tried this with AVR 6.2?

Its it just me or are the pictures in the op missing now? All I get are broken links :(

yes

GCC C executable project then find Atiny13 which is in the TinyAVR family.

Copy in your .C file press F7 or go to build solution.

Works fine.

Apparently I am still doing something wrong then. I went through the steps as best I could tell with no pictures.

Everything seems to match up fairly well. The code that I am using is a proven code so I know that is good. What happens for me though is this.

I copy all the lines of code from the C file. Clear what is written in the blank template and paste the code. I clicked build and get a string of 58 error messages.


Any idea what I am doing wrong?

Put the C file some place I download it and look.

What error messages are you getting?

Ok, if anyone has rocks in thier pockets please refrain from throwing them. Right now vesture is that guy in the deep end of the pool wearing water wings.

The reason my conversion failed is because the file I was trying to convert was not C at all. It was already the hex.

I am infact able to convert C files to hex now using 6.2 ( I got the correct file and tried it) I was NOT able to do it using 4.

I do apologize and also thank everyone for bearing with my on this.

I will write/tweak code if it kills me!!!



Pictures are working again!!!

Thanks for making this how-to comfychair. It was really helpful in my first flash projects.

I’m trying to build Narsil.C into a .hex file with atmel studio 7.

However, this time I get the following 2 errors:

Severity Code Description Project File Line
Error recipe for target ‘main.o’ failed GccApplication7 c:\users\Frank\Documents\Atmel Studio\7.0\GccApplication7\GccApplication7\Debug\Makefile 79

Severity Code Description Project File Line
Error tk-attiny.h: No such file or directory GccApplication7 c:\users\Frank\Documents\Atmel Studio\7.0\GccApplication7\GccApplication7\main.c 147

What am I missing here? Any ideas?