Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

C/C++ Compile Issues in TI Code

$
0
0

Hi TI:

 

Background

I began my project using the UART Console example for the Tiva TM4C123GH6PM.

I compiled it and ran it successfully against a putty program on my PC.

I added Board_initI2C() just to make sure that it would compile (and run) knowing that it would have no real affect on the program.  All was well.

Then begin porting my I2C C++ library over to it.   And this is where I ran into issues.

Setup

CodeComposer 5.4.0.00091

Example Program: uartconsole_TivaTM4C123GH6PM

TI-RTOS: 1.10.0.23

Board: TM4C123GH6PM

 

Issue

In order to get my C++ Library to compile, I had turn "on" the Compile Option... "Treat C Files as CPP Files (--cpp_default, -fg) 

My .cpp files started compiling fine; however, I noticed that some of the TI files would no longer compile.

This worries me.  The 2+ Issues that I am looking at are:

1. EK_TM4C123GXL.c  (Approximately Line #78)

//#pragma DATA_ALIGN(EK_TM4C123GXL_DMAControlTable, 1024) <- Original Code

#pragma DATA_ALIGN(1024) <- New Code

2. USBCDCD_LoggerIdle.c  (Line 85)

const tUSBBuffer txBuffer; <- Description Resource Path Location Type #865 const variable "txBuffer" requires an initializer -- class "tUSBBuffer" has no explicitly declared default constructor USBCDCD_LoggerIdle.c /uartconsole_TivaTM4C123GH6PM line 85 C/C++ Problem

 3. USBCDCD_LoggerIdle.c (Line 215)

const tUSBBuffer txBuffer =  <-Description Resource Path Location Type #249 variable "txBuffer" has already been defined USBCDCD_LoggerIdle.c /uartconsole_TivaTM4C123GH6PM line 215 C/C++ Problem  

Questions

#1 is the one that worries me.  I really do not know if changing this line will have an affects on the program.  To me, it seems like it will.

#2 I do not know what to do with this.  Any thoughts would be greatly appreciated.

I could yank all of the USBCDCD Code out of my program and make that issue go away.  But, I am not sure that I like that option.

Any help would be greatly appreciated.

Thanks

Rick

 

 

 

 

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>