STAR Firmware by JonnyC - Source Code and Explanation

Brian - by looks large, what do you mean exactly?

Go to Project -> Properties, then click on Toolchain and select Optimization under AVR/GNU C Compiler, select -Os.

1.8k file size

thank you

Yeah, if you don't set the compiler to -Os it comes out way too large.

even set to -os it is still too large. it was 777bytes (base 16) and now its 752 bytes (base 16) which is still 1.8k.

ill start over and build with -os on rather than just rebuilding the existing project.

Brian

Huh. Did you add a lot of stuff to it? It should build just fine, even with a few extra modes added in. This is what it should look like:

yup those are my settings. 1.83kb file size

i added nothing. pasted it into the editor, changed the settings, saved (to make sure the settings would take effect and then built.

Brian

Hmmm. Are you sure you're selecting the AVR/GNU C Compiler and not the AVR/GNU C Linker? Did you delete the initial information that is in the file when you start a new project?

yes and yes

Not sure what's going on then, it should work. Did you create a C executable project for the ATTiny13A? I've never had a compile issue with these settings and I'm also using 5.1.

yes and yes……:slight_smile:

I also can’t get the unedited star firmware to compile under Atmel Studio (V6.1). This is also with the optimization level set for -Os. Is there some other setting somewhere that we are missing?

Error 1 Program Memory Usage : 1036 bytes 101.2 % Full (Memory Overflow)
Data Memory Usage : 50 bytes 78.1 % Full star 0 0 star

I know that some people have had issues with 6.1 not working size wise. The optimization routine must have changed.

i just tried toms revision of the code. it comes out at 1.73k

Gotta be something on your end then, but I don't know what it is. I would try downloading version 5.0 and try again.

ok. is 5.0 from atmel working unlike 5.1?

I was wrong in my earlier post, I am running 5.0. Thought I was using 5.1. I am running this version on Windows 7 x64, downloaded from Atmel: 5.0.1163.

ok ill try it