Hi
In this project i have ~30 source files, and would like to use "-O4". But changing -O3 to -O4 gives a (incorrect?) error message.
The compiler is called like this:
"C:/ti/ccsv5/tools/compiler/msp430_4.2.3/bin/cl430" -vmspx --abi=eabi --code_model=large --data_model=restricted --near_data=none -O4 --opt_for_speed=0 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.3/include" --advice:power="all,-5.2,-5.3" -g --float_operations_allowed=all --define=__MSP430F6659__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --large_memory_model --single_inline --remove_hooks_when_inlining --printf_support=full --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
And gives this output:
error: symbol "MainInt" redeclared with incompatible type:
"MainInt_t[struct $$fake54 ]"
in "../main.c" at line 30 and:
"MainInt_t[struct $$fake91 ]"
in "..\main.h" at line 21)
Which I believe is wrong. Changing to to -O3, removes the error.
Finally this leads to:
fatal error #10192: Failed linktime optimization
gmake: *** [msp430Mockup_F6659.out] Error 1
In main.h the structure is declared:
#ifndef MAIN_H_
#define MAIN_H_
#include <stdint.h>
typedef struct
{
uint8_t CodeNumber[20];
uint8_t SerialNumber[20];
uint32_t FirmwareVersion; // Firmware version id
} MainInt_t;
extern MainInt_t MainInt;
#endif /* MAIN_H_ */
In main.c it is declared global, like this:
#include......
MainInt_t MainInt;
int main(void)
{
....
Hope that You can help me to get "-O4" working in this project.
Best Regards,
Henrik Bork Steffensen