SPMU373A March 2021 – August 2022 TM4C1230C3PM , TM4C1230D5PM , TM4C1230E6PM , TM4C1230H6PM , TM4C1231C3PM , TM4C1231D5PM , TM4C1231D5PZ , TM4C1231E6PM , TM4C1231E6PZ , TM4C1231H6PGE , TM4C1231H6PM , TM4C1231H6PZ , TM4C1232C3PM , TM4C1232D5PM , TM4C1232E6PM , TM4C1232H6PM , TM4C1233C3PM , TM4C1233D5PM , TM4C1233D5PZ , TM4C1233E6PM , TM4C1233E6PZ , TM4C1233H6PGE , TM4C1233H6PM , TM4C1233H6PZ , TM4C1236D5PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PZ , TM4C123AE6PM , TM4C123AH6PM , TM4C123BE6PM , TM4C123BE6PZ , TM4C123BH6PGE , TM4C123BH6PM , TM4C123BH6PZ , TM4C123BH6ZRB , TM4C123FE6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6ZRB , TM4C123GH6ZXR , TM4C1290NCPDT , TM4C1290NCZAD , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1297NCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C129CNCPDT , TM4C129CNCZAD , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XNCZAD
For this section, the single_ended peripheral examples under examples/peripherals/adc will be used as a reference.
Following the steps in Section 3.2, project0 for the EK-TM4C123GXL LaunchPad was used as the starter TivaWare project. The project name was renamed to 'single_ended', which allows project0 to be imported again in the future. After copying the source code into the project0.c file and trying to compile the project, the build errors seen in Figure 4-1 occur.
The ‘unresolved symbol’ error usually occurs when a function call is used without the proper .c source files added to the project. This usually occurs when a project uses files outside of a provided TivaWare library like DriverLib or UsbLib. If a header file is added with a #include from a TivaWare library directory then check to ensure the corresponding .lib file has been added to the project. If so, no further actions need to be taken. Section 4.2 will cover how to add a .lib file if it is missing from a project.
In this case, two UART related functions are causing the issue: UARTprintf and UARTStdioConfig. As this example is for an existing TivaWare example project, the quickest way to understand what file is missing would be to scroll up to the #include statements at the top of the code project. Upon doing so, the following lines related to UART can be found:
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
As mentioned before, since driverlib files are already included with the .lib file, the uartstdio.c file would be the next file to check to see if it is missing. Looking through the list of files in the project indicates that there is no uartstdio.c file included in the project (Figure 4-2). Searching the contents of the uartstdio.c file in the utils directory of the TivaWare install will reveal that the missing functions are both inside of that file.
Now that the file has been identified, it needs to be linked to the CCS project via the following steps:
The SW_ROOT definition can be found in the CCS Project Properties under Resources → Linked Resources → Path Variables tab view.
Now the uartstdio.c file should show up in the file list for the project (Figure 4-5) and attempting to re-build the project will now be successful!
Another method to check if the process has been done correctly would be to go to the CCS Project Properties, navigate to the Resource → Linked Resources page and select the "Linked Resources" tab. Once there, look for the Variable Relative Location to be listed as seen in Figure 4-6.