Hi,
I found some demo applications on the website of TI, but it seems that those aren't working in Keil uVision, or with the headerfile I can download from the Keil site located here: http://www.keil.com/dd/chip/4070.htm
I was wondering if I can find somewhere any demo codes, like GPIO, CAN and SPI for this microcontroller using Keil uVision. Does anyone here has some demo code/examples available?
Thanks a lot.
Please read the instructions on how to post source code! www.danlhenry.com/.../keil_code.png
"when I comment this code and try to compile it in Keil uVision I get the error..."
That should come as no surprise!
Of course you can't just comment it out!
IAR (most likely) didn't put it there just to be spiteful - they put it there because they know that the code relies upon some specific feature(s) of their implementation. Therefore, if you want to make it work with Keil, you are going to have to port it - that is, adapt it to the specifics of Keil.
That requires an understanding of both the IAR tools and the Keil tools - probably also the chip itself.
You can't simply comment-out the bit that is telling you that it won't work with another compiler!
"if I want to use these code examples I have to go with IAR"
If you want to use IAR's examples without modification then, yes; of course you will need to use IAR - just as if you wanted to use Keil's examples without modification you'd have to stick with Keil.
"I saw the Blinky example in Keil\ARM\Boards\TI\ folder and I can compile that one.."
Great - so now you have a working framework for a Keil application! Use this as the basis for future work...
"but I am more looking for code examples of SPI and CAN."
So, one step at a time, start bringing that functionality into your Keil application.
Use the IAR examples to guide you - just don't expect them to compile & run directly without modification under Keil!
Thanks so far. I did try some coding in the Blinky example and it seems to work. I guess I can code the CAN and SPI peripherals with it using the User Manual of TI.
Will try and see if I can use some of the examples available for IAR or else I will program it all by myself.
View all questions in Keil forum