Hello,
I'm new to CCStudio and TMS470R1 microprocessor.
I'm learning how to use Code Compose Studio Version: 4.1.3.00038 to compile and debug a very simple C program. The microprocessor that I'm using is TMS470R1VF689.
I'm able to use IAR software to write a simple code to blink LEDs but having problem using the CCStudio.
Can anyone please explain to me what is wrong here?
--------------------------------------------------------------------------------------------------------------------------------
Software Tool: Code Compose Studio Version: 4.1.3.00038
Microprocessor: TMS470R1VF689.
Here, I'm trying to program a very simple code to blink a LED by toggling pin GIOA2, but I got the following code compilation error using the CCStudio.
The following is my main routine that contains a very simple code as below:
//
// TMS470R1VF689PZA
// -----------------
// /|\| |
// --|RST |
// | |
// LED1<--|GIOA4 |
// | |
// -----------------
//
//
// Hooi Miin Soo
// Oct 2010
// Built with Code Composer Studio Version: 4.1.3
//**************************************************
#include "gio/gio470.h"
#include "system.h"
#include "device.h"
SYSTEM_ST *SYS_Ptr = (SYSTEM_ST *) SYSTEM ;
void main(void)
{
// Init SYSCLK
SYS_Ptr->RCLKSRC_UN.RCLKSRC_ST.RTI1SRC_B4 = 8; //clock source 8 i.e VClk
SYS_Ptr->RCLKSRC_UN.RCLKSRC_ST.RTI1DIV_B2 = 0; //div the clk source 0 by 1
GIO_PortInit_V(0x000000FF, 0x000000FF, Port0); // Set GIOA to output direction
//*************************
// Loop forever.
for (;;)
{
volatile unsigned int i;
GIO_PinModify_V(Pin4, PortIoOutHigh, Port0) ; // Toggle GIOA4 high
i = 50000; // Delay
do (i--);
while (i != 0);
GIO_PinModify_V(Pin4, PortIoOutLow, Port0) ; // Toggle GIOA4 low
}
//*************************
}
Thanks & Regards,
Soo