Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find theprogram size in keil

Status
Not open for further replies.

thannara123

Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,580
Helped
122
Reputation
244
Reaction score
114
Trophy points
1,353
Location
India
Activity points
10,379
Hi experts , I want to know the size of the my program written Keil (8051 Compact able ) ,How can i find it,any simple way to understand it ?
 

while compiling the code, Keil will display, code size & data size in output window
 

thanks for reply ,
Build target 'Target 1'
compiling g.c...
linking...
Program Size: data=9.0 xdata=0 code=53
"k" - 0 Error(s), 0 Warning(s).

how to ,or how to understand in Kilobyte or bite ?
 

I only work with small programs and allways get only bytes (without "k")
:)
...but I think this is k=K=kilo (1024x) bytes..

p.s.
add some array:
unsigned char data arrayOfBytes[1000];
and you will see change in code size...
:)
 

all the files generated by compiler like object , hex, and other files can be seen in the directory where it creates hex file... you can check the properties of it to find the size...
 
Sir did you mean the Hex file's property ?
 

all the files generated by compiler like object , hex, and other files can be seen in the directory where it creates hex file... you can check the properties of it to find the size...

The filesize is not at all same as the code size, for example this is a 228 byte code which is written is a hex file of 664 bytes.
The hex file includes address info too and not just the code bytes.

Code:
:0400000012C0FECF5D
:10000400FDCFFCCFFBCFFACFF9CFF8CFF7CFF6CFA8
:10001400F5CFF4CFF3CFF2CF21C0F0CFEFCFEECFB7
:10002400EDCFF894EE27ECBBF1E0FBBFEBBFE5BFEF
:10003400F8E1F1BDE1BD8DE0A2E0BB27ED938A9527
:10004400E9F780E094E0A0E6ED930197E9F7EFE5A6
:10005400EDBFE4E0EEBFC0E6D1E01AC08A93AA93F4
:10006400EA93EFB7EA93E5B1E8BBA0E09099A1E089
:10007400E1E0EA2711F4909801C0909A8BE18A9507
:10008400F1F7369AE991EFBFE991A9918991189511
:10009400E0E0E8BBEFEFE7BBE0E0E5BBE4BBE2BBDD
:1000A400EFEFE1BBE0E0E3BFE2BFEFBDEEBDEDBDCE
:1000B400ECBDE7BDE6BDEBBDEABDE9BDE8BDE2BD13
:1000C400E5BDE4BDE3BDE5BFE9BFE0E8E8B9E0E0D4
:1000D400E0BFE0E6E7B9EEECE6B97894FFCFFFCFF6
:00000001FF

The correct sizes can only be viewed in the compiler report screen or maybe a compiler log file

Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top