Hello,
i got really odd problem with CCS. I made my functions in copied hello project and i got issue: Description Resource Path Location Type
#148 declaration is incompatible with "void ConfigureUART(void)" (declared at line 17 of "..\peripherial_config.h") hello.c /BOV3 line 49 C/C++ Problem
and also 2nd errorthis declaration has no storage or class specifier
here is main:
//deleted other headers - to many to post
#include "peripherial_config.h"
#ifdef DEBUG
void
__error__(char *pcFilename, uint32_t ui32Line)
{
}
#endif
int
main(void)
{
//
// Setup the system clock to run at 50 Mhz from PLL with crystal reference
//
SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|
SYSCTL_OSC_MAIN);
//
// Enable and configure the GPIO port for the LED operation.
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
//GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, RED_LED|BLUE_LED|GREEN_LED);
GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_6, GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);
ROM_GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_6, GPIO_DIR_MODE_OUT);
ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_6, 0);
ConfigureUART(); //<- here i got error in main file
while(1)
{
//
// Turn on the LED
//
ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_6, GPIO_PIN_6);
//
// Delay for a bit
//
SysCtlDelay(2000000);
//
// Turn on the LED
//
ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_6, 0);
//
// Delay for a bit
//
SysCtlDelay(2000000);
}
}
here is peripherial_config.c and header file
#include "peripherial_config.h"
unsigned int i;
void
ConfigureUART(void)
{
//
// Enable the GPIO Peripheral used by the UART.
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
//
// Enable UART0
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
//
// Configure GPIO Pins for UART mode.
//
ROM_GPIOPinConfigure(GPIO_PA0_U0RX);
ROM_GPIOPinConfigure(GPIO_PA1_U0TX);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
//
// Use the internal 16MHz oscillator as the UART clock source.
//
UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);
//
// Initialize the UART for console I/O.
//
UARTStdioConfig(0, 115200, 16000000);
}
and header file:
extern void ConfigureUART (void);