# How to find theprogram size in keil

Status
Not open for further replies.

#### thannara123

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 ?

#### nandhu015

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

#### thannara123

Build target 'Target 1'
compiling g.c...
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 ?

#### js

##### Full Member level 5
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.
unsigned char data arrayOfBytes[1000];
and you will see change in code size...

#### nandhu015

Keil will show in bytes

your code size is 53 bytes

thannara123

### thannara123

Points: 2

#### ckshivaram

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...

thannara123

### thannara123

Points: 2

#### thannara123

Sir did you mean the Hex file's property ?

#### alexan_e

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.

Replies
0
Views
1K
Replies
31
Views
9K
Replies
8
Views
14K
Replies
6
Views
16K
Replies
2
Views
2K