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.

CC1310: Cannot build when configured to treat C files as C++ files.

Part Number: CC1310
Other Parts Discussed in Thread: SYSBIOS

Environment.

Code composer ver: 9.1

SDK: SimpleLinkTm CC13x0 SDK 4.20.02.07

Compiler version: TI v18.12.2.LTS

XDC Tools: 3.51.3.28_core

Step by step procedure:

  1. From the Resource Explorer, I downloaded an example project, gpiointerrupt with CSS compiler and no rtos. 
  2. Result: Can be able to build the software successfully.
  3. Change settings to treat C files as C++ files. (Because I am intending to add more code written in C++ when I have set-up the minimum environment.)
  4. Result: Compile Error and failed to build the software.

The log shows from the problems description are:

Regarding problem:  #2772 this constant expression has type "char *" instead of the required integral or enum type CC1310_LAUNCHXL.c /gpiointerrupt_CC1310_LAUNCHXL_nortos_ccs line 668 C/C++ Problem

The syntax for #pragma LOCATION and NOINIT for C++ is different from C, so, I modify the following to fix the compile error.

Filename: CC1310_LAUNCHXL.c

//#pragma LOCATION(flashBuf, NVS_REGIONS_BASE);  -->> comment out
//#pragma NOINIT(flashBuf);                                               -->> comment out

#pragma LOCATION(NVS_REGIONS_BASE);
#pragma NOINIT;

Regarding problem: #145 a value of type "const void *" cannot be used to initialize an entity of type "const UDMACC26XX_HWAttrs *"

Currently, I am not using any DMA stuff so I just comment out this for now.

__STATIC_INLINE void UDMACC26XX_channelDisable(UDMACC26XX_Handle handle, uint32_t channelBitMask)
{
//UDMACC26XX_HWAttrs const *hwAttrs = handle->hwAttrs; -->> comment out
//HWREG(hwAttrs->baseAddr + UDMA_O_CLEARCHANNELEN) = channelBitMask; -->> comment out
}

After all changes I made for those 2 issues, I still have issues. See compile error below.

Certainly, I am missing something here. Can anyone point me to the right direction.