|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
White Paper Discuss: Handy script to examine the size of your code
Thread created automatically to discuss a document in the White Papers.
Handy script to examine the size of your code by kc8nod |
|
#2
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
Hi, I'm having a few problems with this script.
When I tried using the script the first two lines were as follows. Code:
Unused Memory 28651 bytes 93.3% vfprintf() 3062 bytes 10.0% vfprintf.c I have a feeling that my code is actually larger than the maximum possible size and somehow this is affecting the result. Thanks. |
|
#3
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
Quote:
|
|
#4
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
Thanks for replying.
By the way, I don't think this should make a difference but the script is being run as a post-build command from within eclipse. The mapfile is in the attachment in the FRCMapfile.zip archive because the forum does not allow text file attachments of greater than 100kb. Thanks. |
|
#5
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
Quote:
I'm guessing that you are doing something clever with your linker script and that is confusing the codsize script. Are you even using the linker script? I can only imagine what hacks you have had to perpetrate to make mcc18 work under Eclipse. Anyway, from your mapfile: Code:
Program Memory Usage
Start End
--------- ---------
0x000800 0x000814
0x000818 0x0063a0
0x300000 0x30000d
23468 out of 33816 program addresses used, program memory utilization is 69%
At any rate, the bug is indeed in my script. I'll think about this a bit more and post a fix in a day or two. |
|
#6
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
BTW, here's the proper output from the .map file you posted.
|
|
#7
|
||||
|
||||
|
Re: White Paper Discuss: Handy script to examine the size of your code
Quote:
This is the command I run in order to run your script: Code:
perl "..\codesize.pl" "FRCMapfile.map" EDIT: I tried running your script from within the plain old windows command line after copying the mapfile into the same directory as your script and the .lkr file (and run this command: perl codesize.pl FRCMapfile.map), but still get the same output. I'm using ActivePerl 5.87 Build 815 on Windows XP just for your info. Last edited by prograid : 06-01-2006 at 19:56. Reason: More Information |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| White Paper Discuss: 2003 Automated Dead Reckoning Test Code | CD47-Bot | Extra Discussion | 10 | 07-09-2005 11:25 |
| White Paper Discuss: FIRST Sponsorship = Excellent Corporate Strategy | Chris Fultz | Extra Discussion | 0 | 12-04-2005 20:23 |
| White Paper Discuss: Joystick Sensitivity Demystified - Version 2 | marccenter | Extra Discussion | 0 | 28-02-2005 16:54 |
| White Paper Discuss: Continuous Improvement Process for FIRST Teams | Chris Fultz | Team Organization | 2 | 05-01-2005 20:52 |
| White Paper Discuss: CopyCat Code v1.1 | CD47-Bot | Extra Discussion | 7 | 31-03-2003 12:37 |