Tool/software: Code Composer Studio
Hi
I want to transmit data from TM4C123GH6PM to mobile phone using ZIGBEE Wi-Fi module. But compiling code in CCS, I am getting 3 errors (all are similar) function has already been defined.
cmd.c code
//*****************************************************************************
// Copyright (c) 2012-2013 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 1.0 of the EK-TM4C123GXL Firmware Package.
//
//*****************************************************************************
#include <stdint.h>
#include <stdbool.h>
#include "main.h"
#include "inc/hw_types.h"
#include "utils/ustdlib.h"
#include "utils/uartstdio.h"
#include "utils/cmdline.h"
#include "cmd.h"
//*****************************************************************************
//
// Table of valid command strings, callback functions and help messages. This
// is used by the cmdline module.
//
//*****************************************************************************
/*tCmdLineEntry g_psCmdTable[] =
{
{"Help", CMD_help, " : Display list of commands" },
{"SetAngle", CMD_SetServoAngle, " : Set servo angle" },
{"CloseConnection", CMD_QuitProcess, " : Close the Connection" },
{ 0, 0, 0 }
};
*/
//*****************************************************************************
//
// Command: help
//
// Print the help strings for all commands.
//
//*****************************************************************************
int CMD_help(int argc, char **argv)
{
int32_t i32Index;
(void)argc;
(void)argv;
i32Index = 0;
UARTprintf("List of Commands\n");
while(g_psCmdTable[i32Index].pcCmd)
{
UARTprintf("%17s %s\n", g_psCmdTable[i32Index].pcCmd,
g_psCmdTable[i32Index].pcHelp);
i32Index++;
}
UARTprintf("\n");
return (0);
}
int CMD_SetServoAngle(int argc, char **argv)
{
uint32_t ServoAngle;
if(argc == 2)
{
ServoAngle = ustrtoul(argv[1], 0, 10);
SetServoAngle(ServoAngle);
}
return 0;
}
int CMD_QuitProcess(int argc, char **argv)
{
QuitProcess();
return 0;
}
cmd.h file
//***************************************************************************** // Copyright (c) 2012-2013 Texas Instruments Incorporated. All rights reserved. // Software License Agreement // // Texas Instruments (TI) is supplying this software for use solely and // exclusively on TI's microcontroller products. The software is owned by // TI and/or its suppliers, and is protected under applicable copyright // laws. You may not combine this software with "viral" open-source // software in order to form a larger program. // // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL // DAMAGES, FOR ANY REASON WHATSOEVER. // // This is part of revision 1.0 of the EK-TM4C123GXL Firmware Package. // //***************************************************************************** #ifndef __RGB_COMMANDS_H__ #define __RGB_COMMANDS_H__ //***************************************************************************** // // Defines for the command line argument parser provided as a standard part of // TivaWare. qs-rgb application uses the command line parser to extend // functionality to the serial port. // //***************************************************************************** #define CMDLINE_MAX_ARGS 3 //***************************************************************************** // // Declaration for the callback functions that will implement the command line // functionality. These functions get called by the command line interpreter // when the corresponding command is typed into the command line. // //***************************************************************************** extern int CMD_help(int argc, char **argv); extern int CMD_SetServoAngle(int argc, char **argv); extern int CMD_QuitProcess(int argc, char **argv); #endif
Here i am attaching the screenshot of console window.
Any help will be highly appreciated.
