I am using tiva c launch pad for my project.I have copied my startup file in my project and then wrote my code.When I start to debug my project the control remains in the start up file in reset handler section and never goes in my main program. Please help.
Which debugger are you using? Do you get any error messages at startup?
I am using the simulator that comes with the IDE
If the processor isn't fully supported by the simulator, then you can get stuck in loops because the simulator doesn't understand that some state bit is expected to change value.
An example is when the hardware initializes the PLL and then checks a bit to see when the PLL has properly synchronized - the simulator then must wait some arbitrary time before toggling this bit or you'll get stuck forever.
I am using tm4c123gh6pm processor is it supported.
http://www.keil.com/dd/
My device is supported.
Now you just need to read the manual and build your project properly, or review other examples.
I read the document that showed me how to create a new project it ask me to write this function in main void SystemInit(void) { // Grant coprocessor access // This is required since TM4C123G has // a floating point coprocessor SCB->CPACR |= 0x00F00000; }
but i don't refer the register like mentioned above i refer the register SCB_CPACR_R. I donot understand how to do it . Please help.
So do you refer to it differently to purposefully make it more difficult for yourself?
Why wouldn't you just bring in the right #include file in the CMSIS model so the SCB structure was suitably defined?
What's SCB_CPACR_R defined as? A pointer? An absolute address of the register?
Let's try a few standard C constructs :
SCB->CPACR |= 0x00F00000; // CMSIS Structure SCB_CPACR_R |= 0x00F00000; // Directly? *SCB_CPACR_R |= 0x00F00000; // A Pointer? *((unit32_t *)SCB_CPACR_R) |= 0x00F00000; // An Address ?
SCB_CPACR_R is referred as an absolute address.
SCB_CPACR_R is referred as an absolute address of the register.
Maybe this article helps you: http://www.keil.com/support/docs/3726.htm
So *((uint32_t *)SCB_CPACR_R) |= 0x00F00000; might provide you with an avenue to write the register as a 32-bit word
You could also perhaps tell the tools not to use FPU code, and then it wouldn't be needed.
Anyway the simulator support seems to have been overwhelmed with the number/variety of parts now available. Unless there's a very compelling reason not to use real hardware via a low cost break-out board, think about not depending on the simulator.