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

Lucky you I added the dependencies the lazy way (Copy them into the same project folder) this but still can't get the toykeeper bistro to compile in Atmel Studio 7 :(

I'm working out of a VM, so I really don't want to create a VM within a VM to run linux... Nor do I want tp or have the space to install linux on my laptop.

I believe it may just be a dependency problem. There is a bunch of includes like this

#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <avr/sleep.h>   

and I don't know where to get them from.

As a software developer, if my pride was not so hurt I would have given up.

But I found the following information.

1) Install winAVR.

2) following this guid (Well sorta) -> https://avrstudio5.wordpress.com/2013/03/07/using-winavr-with-atmel-studio-6-0-or-later/

Now I just need to figure out why I don't have a .hex file :(

I'm getting an error:

Severity Code Description Project File Line
Error recipe for target 'main.o' failed Bistro C:\bazaar\Atmel\toykeeper\Bistro\Bistro\Bistro\Release\Makefile 79

Lines 79 and after in the makefile :

@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 0.0.0
$(QUOTE)C:\WinAVR-20100110\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DNDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.1.102\include" -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -mmcu=attiny25 -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
@echo Finished building: $<

Ok last post is probably not correct, what I was seeing is actually just an error that was short circuiting all the errors I was seeing before. The link I found shows the correct picture, but the description above seems to imply I was not supposed to select the bin directory shown in the picture. Well you do need the bin directory which was quite obvious after I figured out how to show the Output window in the IDE (It would display while compiling for 1/2 second then disappear!) .

Severity Code Description Project File Line Source
Error Program Memory Usage : 2412 bytes 117.8 % Full (Memory Overflow)
 Data Memory Usage : 29 bytes 22.7 % Full GccApplication1 GccApplication1 0 Build

I am trying to compile Bistro under Atmel Studio 7.

Did you actually get it to work Justintoxicated?

Here are the errors AS is giving me: Imgur: The magic of the Internet

I gave up with Atmel Studio 7 and installed the version suggested in the OP.

I realized that I had never defined which Attiny version I was using and this may have been the problem all along with AS 7. But all is working with AS 5. I can compile, produce hex, and load it onto a attiny25 with avr dude.

For those having a similiar problem to mine mentioned in my last post, you need to go into tk-attiny.h and choose which define you want. I am using #define ATTINY 25.

Its good to see you have it sorted david. You have a new world ahead of you now. :+1:

So I am trying to compile and flash toykeepers a6 firmare on an a6 driver and when i build it, it is compiling to 4kb. The one directly from toykeepers repository is 3kb. I cannot send mine to the chip as avrdude is telling me its too big. Any suggestions? I have not modified the code at all.

Optimize for size

Okay how do I do that?

Atmel Studio is using -Os by default which is apparently optimize for size.

Oh boy, after ordering hardware to flash my D4 I am now starting to look into the joy of the SW part of it. Anyway, based on what I am reading I see that likely Studio 5 is the way to go, but I am only finding Studio 7. Help please?

edit: Never mind, it took about 3 seconds to search and find a link in an old forum, presently installing . . .

Well, Atmel Studio 5 installed great, or so it seemed. At the end of the installation I got a note that some features would not run unless I installed a service patch. I ignored that, and got the same message when I opened Studio 5. So I tried to download the patch, and apparently it no longer exists. Oh joy . . . :person_facepalming:

Is there any reason 7 wont work the same?

not sure, I recall reading posts earlier in this thread that had problems with 7 for some reason, but likely I will give it a go next.

This should help you out.
Here

Looks very helpful, thank you. :+1:

what is tk-attiny.h: and where do i get it from?

using avr 5.1 and keep getting this error.

was it supposed to be installed with the program, is it something i need to download? i have no idea how to insert it as previously mention in thread?
when i try to build hex tk-attiny file appears in my project folder but now idea what it is?

sorry to drag up a old thread

but having a few problems compiling dragon firmware

ive downloaded the source and all the other files to compile

but im lost

can anyone compile it for me pleasee

It would be cool if someone made a docker for compiling firmware, it is much simpler on linux and a docker makes it even simpler.

Search for a post from toykeeper, she gives some commands to compile on linux that works and is fairly simple. Can use a VM or might even work on the linux inside windows 10.

I managed to do it in the end
I found the source from toykeeper repo
Compiled it for the tiny25 on the dragon driver , it ended up being about 200bytes to big , so I cut it down a little , removed the temp management , flashed it , put the driver in a convoy s2 with single emitter

It worked

Seems to be only working on turbo mode , can’t get into config mode from the flashlight

I’ve asked toykeeper on on if she has the hex file for the driver

And asked cwf if he also has the hex file

I did a proper stupid mistake , I like to have all the firmwares for my flashlights in a folder on my computer , so I read the tiny25 on the driver , and forgot I clicked the erase tick box last tim I ran avrdude gui , it earsed the tiny25 and didn’t save the file

So been searching for 6 hours for the firmware :frowning: