AnsweredAssumed Answered

text string in generated binary file

Question asked by guylejeune on Nov 26, 2015
Latest reply on Dec 3, 2015 by Patrick Wood

Dear all,

 

when compiling the same project from different place on the computer, we get different binaries.

 

Digging in the .elf file, it turns out some computer paths are included:

00002511 <__func__.8045>:     2511:       4e49 5f54 5953 5f53 6e45 6261 656c 5249     INT_SYS_EnableIR     2521:       0051 682f 6d6f 2f65 656c 656a 6e75 2f65     Q./home/lejeune/     2531:       694b 656e 6974 2f73 6554 7473 685f 6861     Kinetis/Test_hah     2541:       3361 532f 4b44 702f 616c 6674 726f 2f6d     a3/SDK/platform/     2551:       6168 2f6c 6e69 2f63 7366 5f6c 6f70 7472     hal/inc/fsl_port     2561:       685f 6c61 682e 7000 6e69 3c20 3320 5532     _hal.h.pin < 32U     2571:       2f00 6f68 656d 6c2f 6a65 7565 656e 4b2f     ./home/lejeune/K     2581:       6e69 7465 7369 542f 7365 5f74 6168 6168     inetis/Test_haha     2591:       2f33 4453 2f4b 6c70 7461 6f66 6d72 732f     3/SDK/platform/s     25a1:       7379 6574 2f6d 6e69 2f63 7366 5f6c 6e69     ystem/inc/fsl_in     25b1:       6574 7272 7075 5f74 616d 616e 6567 2e72     terrupt_manager.     25c1:       0068 2030 3d3c 6920 7172 754e 626d 7265     h.0 <= irqNumber     25d1:       6900 7172 754e 626d 7265 3c20 203d 5346     .irqNumber <= FS     25e1:       5f4c 4546 5441 5255 5f45 4e49 4554 5252     L_FEATURE_INTERR     25f1:       5055 5f54 5249 5f51 414d 0058 682f 6d6f     UPT_IRQ_MAX./hom     2601:       2f65 656c 656a 6e75 2f65 694b 656e 6974     e/lejeune/Kineti     2611:       2f73 6554 7473 685f 6861 3361 532f 4b44     s/Test_haha3/SDK     2621:       702f 616c 6674 726f 2f6d 6168 2f6c 6e69     /platform/hal/in     2631:       2f63 7366 5f6c 7067 6f69 685f 6c61 682e     c/fsl_gpio_hal.h

 

A bit further, we even get some clear text:

00002642 <__func__.6255>:     2642:       4f50 5452 485f 4c41 535f 7465 754d 4d78     PORT_HAL_SetMuxM     2652:       646f 0065 0000                              ode...  00002658 <gpio1_InpConfig0>:     2658:       020c 0000 0001 0101 0000 0000 ffff ffff     ................         ...  00002670 <gpio1_OutConfig0>:     2670:       0100 0000 0000 0000 0001 0001 ffff ffff     ................         ...     2688:       2e2e 472f 6e65 7265 7461 6465 435f 646f     ../Generated_Cod     2698:       2f65 736f 3161 632e 6400 7669 6469 7265     e/osa1.c.divider     26a8:       2120 203d 5530 4f00                               != 0U.  000026af <__func__.8420>:     26af:       534f 5f41 6954 656d 6e49 7469 2c00 6620     OSA_TimeInit., f     26bf:       6e75 7463 6f69 3a6e 0020 7361 6573 7472     unction: .assert     26cf:       6f69 206e 2522 2273 6620 6961 656c 3a64     ion "%s" failed:     26df:       6620 6c69 2065 2522 2273 202c 696c 656e      file "%s", line     26ef:       2520 2564 2573 0a73 4300 0000 0800                %d%s%s..C...  000026fc <_global_impure_ptr>:     26fc:       0408 1fff 2d23 2b30 0020 6c68 004c 6665     ....#-0+ .hlL.ef     270c:       4567 4746 3000 3231 3433 3635 3837 4139     gEFG.0123456789A     271c:       4342 4544 0046 3130 3332 3534 3736 3938     BCDEF.0123456789     272c:       6261 6463 6665 0000                         abcdef.. 

 

Step to reproduce:

- new Kinetis project, with Processor Expert

- our board: TWR-K60D100M

- compiler with size optimization (-Os)

- use of the fsl_gpio component

 

We use a KDS 3.0 & KDSK 1.3.0 for Linux (Centos 7).

 

We are beginning with KDS & Eclipse, so are we missing something (particular option somewhere, ... ) ?

Removing the default debugging option (going from default -g3 to none) doesn't bring any change.

 

 

The reason I don't want to leave it the way it is:

- same source produce different output ;

- we try to do size optimization.. and this doesn't help.

 

Thank you for your help !

Outcomes