This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
I am working with a custom board built around the CC1352R (Rev C. currently) part and utilizing both sub-GHz and 2.4 GHz functionality to combine our previously running custom sub-GHz protocol with BLE functionality.
I started with the DMM Simple Peripheral & WSN Node example (C:\ti\simplelink_cc13x2_sdk_2_30_00_45\examples\rtos\CC1352R1_LAUNCHXL\dmm\dmm_wsnnode_ble_sp\) and have successfully modified everything to run as desired.
In the project, the Startup/ directory contains a board.c file which includes the (original) board specific file:
#include "./cc1352r1lp/cc1352r1lp_board.c"
That file is pulled from C:\ti\simplelink_cc13x2_sdk_2_30_00_45\source\ti\ble5stack\target\, which next includes more specific files:
#include "../../boards/CC1352R1_LAUNCHXL/Board.h"
#include "../../boards/CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL.c"
#include "../../boards/CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL_fxns.c"
from C:\ti\simplelink_cc13x2_sdk_2_30_00_45\source\ti\ble5stack\. There is also a CC1352R1_LAUNCHXL.h file that is included by Board.h and CC1352R1_LAUNCHXL.c.
I can create copies of all this in the SDK, following the same path & naming conventions, for my custom board changes, but I would much rather have these files directly in the project so that other developers do not need to modify their SDK directories. I have seen other examples that do this.
To make it simple, I replaced the original board.c file with essentially the second one, but pull in the three files from the same (current) directory. I believe that this is all correctly compiling (I removed the files from the SDK directory to be certain it was not still using those), but the link stage reports a lot of "already been defined" errors. For example:
symbol "ADC_config" has already been defined null: symbol "ADC_config" has already been defined
ADC_config is defined in CC1352R1_LAUNCHXL.c:
const ADC_Config ADC_config[CC1352R1_LAUNCHXL_ADCCOUNT] = {
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC0], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC0]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC1], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC1]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC2], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC2]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC3], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC3]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC4], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC4]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC5], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC5]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADC6], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADC6]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADCDCOUPL], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADCDCOUPL]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADCVSS], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADCVSS]},
{&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC1352R1_LAUNCHXL_ADCVDDS], &adcCC26xxHWAttrs[CC1352R1_LAUNCHXL_ADCVDDS]},
};
I have cleaned the project before building as well as manually deleting everything in the FlashROM_Release directory and continue to get these errors (~90 of them).
Is there some other output file of which I am not aware to delete?
Or are the pre-built libraries in the SDK somehow causing this? (And since they are pre-built, I assume I cannot resolve the issue?)
Thanks!
.Tim
Tom -
Thank you for the response and the links. I had previously reviewed the first, but had not seen the second before.
Both of these expect that the board specific files are already in the project when it is created from a sample/example. My issue is that the DMM example I started with does not physically have these files in the project, instead pulls them in via #includes that point into the SDK.
.Tim
Tim,
I have checked SDK v2.30.00.45 and the only pre-built libs are driverlib(s).
Try this:
comment out the definition of the ADC_Config in a place you want to have it defined
build an out file and check the map file to find where the unwanted definition comes from.
Also, simple search should help: $ find . -iname '*.[ch]' -type f -exec grep -Hn 'ADC_config' {} \;
Tom -
Thanks for the additional ideas. The simple search did not turn up anything. I #if 0'd all of the items being reported as "already defined", but then got 15 "unresolved symbol" errors. I did not try to figure out a resolution that might help me continue down this path of inquiry so I never got a map file to investigate.
I guess I will just have to live with these files being in the SDK tree rather than the project tree.
.Tim
Tom -
Perhaps I should have been more complete in that comment, the "unresolved symbols" are items that I #if 0'd! If I cannot track down where they are "already defined" I have no idea where I can define them so they are no longer "unresolved".
.Tim