2012-02-09 11:15 AM
I'm using IAR EWSTM8 1.30.2 Kickstart to compile a STM8S003F project. USE_STDPERIPH_DRIVER is defined and I use the library. The software works fine, but I have seen in the output executable (HEX, binary, ELF...) some string constants with the library source code filenames. This is part of ''output.bin'':
(...)
â€�´Ã�Ÿ)Ã�΅Ã�‰î èÃ�Å’Ã�¾TTâ€œÂ® ¿ “Ã�â€�?®¿ ¾r° ¿“X\¿ ¾Ã�â€�?®¿® ¿ “Ã�â€�?®³%Å¸Â«Ã¾Ã‡Pñ̌ǐŸ«ÿÇPñÌŒÇD:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_adc1.c D:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_beep.c D:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_exti.c D:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_gpio.c D:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_tim1.c D:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\stm8s_tim4.c.c Ã�Å’8·E ='¶¡'®Z¿_¿ ®‘ìÃ�Ÿ)= '¶ ¡'®[¿_¿ ®‘ìÃ�Ÿ)ÆT¤Ã�ÇT= 'rT rT¶ÊTÇTÌŒË5 S 5 S5 S5 S5 S 5 S5 S 5 S5 S5 S 5 S5 S5 S5ÿS5ÿS5 S5 S5 S5 S5 S5 S5 SD:\Project\M11\power\software\STM8S_StdPeriph_Driver\src\
stm8s_awu.c D:\Project\M11\powe(...)(I have changed the path to preserve privacy)
In the map file, the sections located at the address where I have found the filename strings are ''.near.rodata const'':.near_func.text ro code 0x009167 0x85 stm8s_awu.o [1]
.near.rodata const 0x0091ec 0x59 stm8s_adc1.o [1].near.rodata const 0x009245 0x59 stm8s_beep.o [1]
.near.rodata const 0x00929e 0x59 stm8s_exti.o [1]
.near.rodata const 0x0092f7 0x59 stm8s_gpio.o [1] .near.rodata const 0x009350 0x59 stm8s_tim1.o [1]
.near.rodata const 0x0093a9 0x59 stm8s_tim4.o [1] .near_func.text ro code 0x009402 0x59 stm8s_adc1.o [1] .near_func.text ro code 0x00945b 0x59 stm8s_tim2.o [1] .near.rodata const 0x0094b4 0x58 stm8s_awu.o [1]
¿Am I doing something wrong?
¿Is there any problem with IAR STM8 compiler or linker?¿Could anybody check this with a dummy project with peripheral driver library?Thank you in advance2012-02-13 08:42 AM
I have found the cause of the problem:
#define USE_FULL_ASSERT (1)
in file ''stm8s_conf.h''. When commenting this line, the filename strings disappear.//#define USE_FULL_ASSERT (1)
The strings were created by this macro:#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))