Why does my library compiled size change when switching the librarian from EWL to C9x?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why does my library compiled size change when switching the librarian from EWL to C9x?

3,689 Views
leonmcnutt
Contributor I


I am evaluating CW 10.4 and with the same project and Librarian change from C9xC++ to EWLC++ I goe from 640K to 3.2M. I have debug symboles off.

Labels (1)
0 Kudos
12 Replies

3,450 Views
trytohelp
NXP Employee
NXP Employee

Hi Leon,

Following the info I found the EWL lib should be more compact than C99 lib.

Based on my MCU V10.4, I've created a project example for Coldfire MCF52259.

I've built the project with EWL_C++ and C99_C++ libs.

Extract of MAP file with C99_c++:

# Memory map:

  v_addr   p_addr   size     name

  20000000 20000000 00000000 .vectorram vectorram

  20000500 20000500 00000000 .code      code

  20000500 20000500 00000400 .vectors   code

  20000900 20000900 00000738 .text      code

  20009100 20009100 00000000 .userram   userram

  20009100 20001038 000000AC .data      userram

  200091AC 200091AC 0000000C .bss       userram

  200091B8 200091B8 00000000 .custom    userram

  200091B8 200010E4 00000018 .romp      userram

Extract of map file with EWL_C++:

 

# Memory map:

v_addr p_addr size name

20000000 20000000 00000000 .vectorram vectorram

20000500 20000500 00000000 .code code

20000500 20000500 00000400 .vectors code

20000900 20000900 00000718 .text code

20009100 20009100 00000000 .userram userram

20009100 20001018 000000AC .data userram

200091AC 200091AC 00000004 .bss userram

200091B0 200091B0 00000000 .custom userram

200091B0 200010C4 00000018 .romp userram

Both are using same memory excepted for the  .bss

If you've an example showing the behavior, please can you share it ?

Regards

Pascal

0 Kudos

3,450 Views
leonmcnutt
Contributor I

What I have found is that EWL, C++ and C99, C++ produce same XXX.a file size; however when I enable Automatic Library configurations I get a Huge XXX.a file. Why is this?

Leon

0 Kudos

3,450 Views
trytohelp
NXP Employee
NXP Employee

Hi Leon,

What is the processor ?

Pascal

0 Kudos

3,450 Views
leonmcnutt
Contributor I

MCF5373..

0 Kudos

3,450 Views
trytohelp
NXP Employee
NXP Employee

Hum.

if the option is not selected, no library is added to the project.

In this case you must add it manually in your project.

when the option is enable you can select the type of library: model, Print formats, Scan formats and IO mode.

If the Enable automatic library Configurations option is not checked, you need to add right library file to your project.

is it the process you followed ?

On my example, with I un-check the option, the linker will generate some error due to undefined functions.

Regards

Pascal

0 Kudos

3,450 Views
leonmcnutt
Contributor I

Ok, here is what I found…..

I am attempting to rebuild projects and libraries from V6.3, Todays tool works with libraries differently.

Therefore, how can I rebuild C_4i_CF_StdABI_MSL.a from the libraries I have today in V10.4???

0 Kudos

3,450 Views
leonmcnutt
Contributor I

It took some time to duplicate; however here is the order..

I build with Enabled Automatic Library configurations and get my Library build size of 3400Kb.

I change process setting Automatic Library configurations not selected and Build without Cleaning Project and get Library build size of 640Kb.

If I clean Project I get errors for undefined variables…

Leon

0 Kudos

3,450 Views
JimDon
Senior Contributor III

The size of the lib file it self does not mean it would make programs that size. If they do not link to code that is in there, it is not included.

If the code in other libs required (as indicated by the errors) , then you have no choice but to include it.

0 Kudos

3,450 Views
leonmcnutt
Contributor I

Understood.. Code size and library size are not the same.

It was just an attempt to compare outputs from V6.3 and V10.4 tool sets…

The sizes are 3.4M with V10.4 verses 0.68M for V6.3… Can this be explained?

Thanks for the continued support.

0 Kudos

3,450 Views
trytohelp
NXP Employee
NXP Employee

Hi Leon,

You refer to CodeWarrior for Coldfire V6.3 which was released middle of 2006.

What are the files you compared ?

Only the size of Srecord files are really important.

You can check the memory size used by your application with the map file.

The map file has a section at the end of file resuming the memory size.

Example:

Memory map:

                       Starting   Size     File       S-Record

                       address           Offset     Line

                 .init 40005800 000000b0 00000200         33

             .init_vle 400058b0 00000208 000002b0         42

  .ivor_branch_table_p0 40006000 00000100 00000800         68

  .__exception_handlers_p0 40006100 000000a8 00000900         81

  .ivor_branch_table_p1 40007000 00000000 00001000          0

  .__exception_handlers_p1 40007000 00000000 000009a8          0

                 .text 40000000 00000000 00001000          0

             .text_vle 40000000 000001a0 00001000          2

               .rodata 400001a0 0000000c 000011a0         23

                .ctors 400001ac 00000008 000011ac         24

                .dtors 400001b4 00000008 000011b4         25

                 extab 400001bc 00000018 000011bc         26

            extabindex 400001d4 00000054 000011d4         28

  .__uninitialized_intc_handlertable 40008000 000004d0 00001230          0

                 .data 400084d0 00000000 00001230          0

                .sdata 400084d0 00000004 00001230         90

                 .sbss 400084d8 00000004 00001238          0

               .sdata2 400084dc 00000000 00001238          0

                .sbss2 400084dc 00000000 00001238          0

                  .bss 400084e0 0000000c 00001238          0

      .PPC.EMB.apuinfo 00004208 00000000 00005440          0

         .debug_abbrev          00000167 00001238

           .debug_info          000012c7 0000139f

           .debug_line          00001a0a 00002666

            .debug_loc          000003ba 00004070

       .debug_pubnames          0000039a 0000442a

regards

Pascal

0 Kudos

3,450 Views
leonmcnutt
Contributor I

Yes, I understand the S record size issue.

See latest on Old libraries verse New… We need to recreate V6.3 C and C++ libraries from V10.3 Libraries. Any ideas?

0 Kudos

3,450 Views
trytohelp
NXP Employee
NXP Employee

Leon,

since the version V7.2, we introduced new library type: EWL.

this library replaces the MSL.

We've a Technical Note explaining that.

Please have a look to doc attached.

Now you want to use the old libraries delivered on V6.3 under MCU V10.3 project.

Am I right ?

Don't know if this can be done.

By default if you don't check the option, no library is included in the project.

Then you must select it manually.

the project lib were delivered under old installation.

Have a look to \E68K_Support\msl folder, you should have several .mcp file under sub-folder.

for instance:

      \E68K_Support\msl\MSL_C\MSL_E68k\Project

Unfortunately the old project can not be opened on MCU v10.3 or 10.4.

The importer has been removed.

this feature was available on MCU V10.2 whcih can be downloaded on the web site.

I don't recommend you to use the MSL lib from V6.3 under MCU v10.3.

This will be very very difficult.

Regards

Pascal

0 Kudos