Log in

View Full Version : Code Size


Ryan Cumings
06-03-2004, 21:29
What was the final size of everyone's code?
Ours was 30k :D

Ian W.
06-03-2004, 21:34
What was the final size of everyone's code?
Ours was 30k :D
The hex file you mean? Or the C files, cause those would be pretty big... :p

Ryan Cumings
06-03-2004, 21:55
The hex file you mean? Or the C files, cause those would be pretty big... :p

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.

Ian W.
06-03-2004, 22:13
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.

deltacoder1020
06-03-2004, 22:17
exactly. the program's not done till competition... and even then not necessarily ;)

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

~Dav

Ryan Cumings
06-03-2004, 22:59
exactly. the program's not done till competition... and even then not necessarily ;)

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

~Dav

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

Daniel
06-03-2004, 23:07
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.

Ryan M.
07-03-2004, 08:36
My "program memory utilization" is 46%. The actual HEX file size was 43.4k.

jacob_dilles
07-03-2004, 17:17
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....

MikeDubreuil
07-03-2004, 19:12
39K in the hex file and 40% utilization in the map file.

Astronouth7303
07-03-2004, 19:21
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]

Ryan M.
07-03-2004, 20:52
16.4K, 17%. But the autonomous is going to be totally revamped, so I'll repost when that happens.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?

Astronouth7303
07-03-2004, 20:56
Going beyond arrays. Encoders, gyros, all the fun stuff

I'll post code later

Keys
08-03-2004, 08:46
Well competition is done for us this year. Got a technical award for the code in Manch Vegas.

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

KenWittlief
08-03-2004, 09:56
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.

deltacoder1020
08-03-2004, 10:13
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)

jacob_dilles
08-03-2004, 11:29
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

Ryan M.
08-03-2004, 14:18
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.In addition you should also remove printf_lib.* from the project.

deltacoder1020
08-03-2004, 14:49
In addition you should also remove printf_lib.* from the project.

that's what i said.

Ryan M.
08-03-2004, 15:11
that's what i said.Whoops... Didn't notice that. Sorry for the double respones. :rolleyes:

Astronouth7303
08-03-2004, 17:48
I modified my printf_lib.c so it only compiles if I define _debug_.