Other Parts Discussed in Thread: TM4C123GH6PM,
Tool/software: Code Composer Studio
I wrote a program that uses the system call from "stdlib.h" and I get a linker error saying it cannot find the symbol "system". I looked at "software-dl.ti.com/.../sdto_cgt_tips_for_using_printf.html" and accordingly increased the heap size, but that didn't work. I also tried looking for "stdlib.lib" which might be a statically linked library for "stdlib.h", but I couldn't find any on my filesystem. All the libraries which I've included and linked so far are there in the build debug output below, along with the max heap and stack size I've used. I'm not sure what I'm missing here - I think I need to link a file, but I don't know which one. I thought "stdlib.h" was a pretty standard library so CCS would probably have done the linking itself or the linking process would be obvious and easy, but so far I've been proved wrong. How do I make the symbol 'system' defined?
Relevant piece of code:
#include <stdlib.h>
system("...")
Build of configuration Debug for project
"C:\\ti\\ccs1010\\ccs\\utils\\bin\\gmake" -k -j 4 all -O
Building target: "Interrupt.out"
Invoking: ARM Linker
"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --preinclude="C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include/stdlib.h" --define=ccs="ccs" --define=PART_TM4C123GH6PM -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"Interrupt.map" --heap_size=2000 --stack_size=512 -i"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/lib" -i"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include" -i"C:/ti/TivaWare_C_Series-2.2.0.295" -i"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="Interrupt_linkInfo.xml" --rom_model -o "Interrupt.out" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "C:/ti/TivaWare_C_Series-2.2.0.295/driverlib/ccs/Debug/driverlib.lib" "../tm4c123gh6pm.cmd" -llibc.a -l"C:/ti/TivaWare_C_Series-2.2.0.295/driverlib/rvmdk/driverlib.lib"
<Linking>
undefined first referenced
symbol in file
--------- ----------------
system ./main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "Interrupt.out" not built
>> Compilation failure
makefile:144: recipe for target 'Interrupt.out' failed
makefile:140: recipe for target 'all' failed
gmake[1]: * [Interrupt.out] Error 1
gmake: * [all] Error 2