Tool/software: TI C/C++ Compiler
Hi,
according to the compiler documentation, --opt_level=4 has to be applied to both, the compiler and the linker to enable link time optimizations. I receive error messages when passing the --opt_level=4 switch to the linker (formated):
/Applications/ti/ti-cgt-c2000_20.2.2.LTS/bin/cl2000 --run_linker --output_file=pfc.out --map_file=pfc.out.map --opt_level=4 --stack_size=0x3F8 --heap_size=0 --rom_model CMakeFiles/pfc.out.dir/device.c.obj CMakeFiles/pfc.out.dir/pfc.c.obj CMakeFiles/pfc.out.dir/can_adapter.c.obj CMakeFiles/pfc.out.dir/ring_buffer.c.obj CMakeFiles/pfc.out.dir/log.c.obj CMakeFiles/pfc.out.dir/timer.c.obj CMakeFiles/pfc.out.dir/main_thread.c.obj CMakeFiles/pfc.out.dir/parameters.c.obj CMakeFiles/pfc.out.dir/adc_pwm.c.obj CMakeFiles/pfc.out.dir/controller.c.obj --search_path=/Applications/ti/ti-cgt-c2000_20.2.2.LTS/lib --search_path=/Applications/ti/ti-cgt-c2000_20.2.2.LTS/include --search_path=/Applications/ti/c2000/C2000Ware_3_02_00_00/device_support/f2837xd/common/cmd --search_path=/Applications/ti/c2000/C2000Ware_3_02_00_00/device_support/f2837xd/headers/cmd libdriverlib.a libstartup_files.a --library=rts2800_fpu32.lib --library=2837xD_Flash_lnk_cpu1.cmd --library=F2837xD_Headers_nonBIOS_cpu1.cmd
results in:
<Linking> >> WARNING: more than one source file is specified; option --output_file is ignored [_level=4.] Fatal error: cannot open source file "_level=4" 1 catastrophic error detected in the compilation of "_level=4". Compilation terminated.
I see that the Eclipse examples do not use the --run_linker switch. Maybe there is a different name for that switch for the linker command line?
best regards,
Torsten