When I compile the program I get the following warning.
#174-D external/internal linkage conflict with previous declaration
When I click on the error it goes to the following in socket.h. I have read about this . It has something to do about using external and static. In the UartUtils.c and UartUtils.h both are used, but these are uart not socket users. With this warning when I transfer data over UDP the first message goes through, but the second message fails because it says the host, which is this device closed the port.
Again I am using UDPEcho and Uart console virtually unchanged. I have removed the logging code. The UDPEcho used by itself doesn't give this warning and it works with no failures.
Any help would be appreciated. Also when I post a question I don't receive any mail notifications. I have set my email preferences in settings.
/*
* ======== close ========
*/
static inline int close(int sockfd)
{
return fdClose((SOCKET)sockfd);
}
My config file
/*
* ======== uartconsole.cfg ========
*/
/* ================ General configuration ================ */
var Defaults = xdc.useModule('xdc.runtime.Defaults');
//var Diags = xdc.useModule('xdc.runtime.Diags');
//var Error = xdc.useModule('xdc.runtime.Error');
//var Log = xdc.useModule('xdc.runtime.Log');
//var Main = xdc.useModule('xdc.runtime.Main');
//var Memory = xdc.useModule('xdc.runtime.Memory');
var System = xdc.useModule('xdc.runtime.System');
//var Text = xdc.useModule('xdc.runtime.Text');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
//var Load = xdc.useModule('ti.sysbios.utils.Load');
//var Ip = xdc.useModule('ti.ndk.config.Ip');
//var Udp = xdc.useModule('ti.ndk.config.Udp');
//var Global = xdc.useModule('ti.ndk.config.Global');
//var BIOS = xdc.useModule('ti.sysbios.BIOS');
//var Clock = xdc.useModule('ti.sysbios.knl.Clock');
//var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
//var Tcp = xdc.useModule('ti.ndk.config.Tcp');
/* ================ General configuration ================ */
//var Clock = xdc.useModule('ti.sysbios.knl.Clock');
/*
* Program.stack is ignored with IAR. Use the project options in
* IAR Embedded Workbench to alter the system stack size.
*/
if (!Program.build.target.$name.match(/iar/)) {
/*
* Reducing the system stack size (used by ISRs and Swis) to reduce
* RAM usage.
*/
Program.stack = 2048;
}
/*
* Comment this line to allow module names to be loaded on the target.
* The module name strings are placed in the .const section. Setting this
* parameter to false will save space in the .const section. Error and
* Assert messages will contain an "unknown module" prefix instead
* of the actual module name.
*/
Defaults.common$.namedModule = false;
/*
* Minimize exit handler array in System. The System module includes
* an array of functions that are registered with System_atexit() to be
* called by System_exit().
*/
//System.maxAtexitHandlers = 2;
/* ================ System configuration ================ */
/*
var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
SysCallback.abortFxn = "&UARTUtils_systemAbort";
SysCallback.putchFxn = "&UARTUtils_systemPutch";
SysCallback.readyFxn = "&UARTUtils_systemReady";
System.SupportProxy = SysCallback;
*/
/* ================ BIOS configuration ================ */
/*
* Disable unused BIOS features to minimize footprint.
* This example uses Tasks but not Swis or Clocks.
*/
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.libType = BIOS.LibType_Custom;
BIOS.swiEnabled = true;
BIOS.logsEnabled = false;
BIOS.assertsEnabled = false;
BIOS.heapSize = 0x800;
/* Reduce the number of task priorities */
Task.numPriorities =10;
/* ================ Task configuration ================ */
var taskParams = new Task.Params();
taskParams.instance.name = "console";
taskParams.stackSize = 1536;
Program.global.console = Task.create("&consoleFxn", taskParams)
/* ================ System configuration ================ */
var SysMin = xdc.useModule('xdc.runtime.SysMin');
System.SupportProxy = SysMin;
/* Runtime stack checking is performed */
Task.checkStackFlag = false;
Hwi.checkStackFlag = false;
/* Enable Semihosting for GNU targets to print to CCS console */
//if (Program.build.target.$name.match(/gnu/)) {
// var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
//};
/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Ip = xdc.useModule('ti.ndk.config.Ip');
var Udp = xdc.useModule('ti.ndk.config.Udp');
BIOS.heapSize = 20480;
Task.idleTaskStackSize = 768;
Global.IPv6 = false;
//Global.stackLibType = Global.MIN;
Global.networkOpenHook = "&netOpenHook";
/* automatically call fdOpen/CloseSession for our sockets Task */
Global.autoOpenCloseFD = true;
Global.pktSizeFrameBuf = 1536;
Global.pktNumFrameBufs = 10;
Global.memRawPageCount = 6;
Global.ndkThreadStackSize = 1536;
Global.lowTaskStackSize = 1024;
Global.normTaskStackSize = 1024;
Global.highTaskStackSize = 1024;
/* ================ Driver configuration ================ */
var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
TIRTOS.useGPIO = true;
TIRTOS.useEMAC = true;
TIRTOS.useUART = true;
Ip.autoIp = false;
Ip.address = "192.168.1.9";
Ip.mask = "255.255.255.0";