Code Size

What was the final size of everyone’s code?
Ours was 30k :smiley:

The hex file you mean? Or the C files, cause those would be pretty big… :stuck_out_tongue:

I would have to say the hex files. It would be really hard to measure the C file size because of comments and whitespacing differences amoung teams.

In that case, my hex file is 28k, but I have a bunch of stuff I have to add still, so it’ll grow a bit.

exactly. the program’s not done till competition… and even then not necessarily :wink:

btw, if anyone wants to toss around wacky code ideas in st. louis, find me at the prank monkeys’ pit :slight_smile:

~Dav

Well competition is done for us this year. Got a technical award for the code in Manch Vegas.

I read some where that the max program size can be 32K.

To find out you current program size look in the *.map file somewhere in the mid part. It will tell you your program size. * is the name of your project.

My “program memory utilization” is 46%. The actual HEX file size was 43.4k.

i dont know the exact size of the hex file… but we overran the memory in the RC, producing a nasty ram dump and some WIERD errors…

39K in the hex file and 40% utilization in the map file.

16.4K, 17%. But the autonomous is going to be totally revamped, so I’ll repost when that happens.
[Edit: Printf_Lib adds about 12K]

How’d you get it to only 16k? Our’s really isn’t that complicated and has all the non-vital stuff removed and it’s still 40k something. What are the revamps you’re doing?

Going beyond arrays. Encoders, gyros, all the fun stuff

I’ll post code later

Actually the award was for an innovative control idea. Our awesome switchbox played a role in that.

make sure you comment out ALL the printF statements if you want to min the amount of code used

and they are in other places - like main.c - if you have only one printf statement the compiler dumps a TON of junk into your hex file.

actually, if you truly want the smallest code possible, don’t include printf_lib in the first place (this will require commenting/taking out all the printf statements anyways)

yeah for our last revision of autonimous i did a global find for printf and took them all out, and then un-included it. it cut down on the size by 13k

In addition you should also remove printf_lib.* from the project.

that’s what i said.

Whoops… Didn’t notice that. Sorry for the double respones. :rolleyes: