Can anyone else verify that the Hello example fails to output to the serial#1 window when the reg515a.h is included. Single stepping through the program I can see the characters being written to SBUF but nothing is displayed in serial#1. Just by replacing the statement "#include <reg515a.h>" with say "#include <reg552.h>" the program works just fine.
Have you issued the appropriate ASSIGN command? See the µVision2 Debug Commands helpfile
I tried the HELLO WORLD example program and selected the C515A-L. It works fine with one exception -- the watchdog timer is set by default for the C515A-L. This resets the simulated chip every so often and MAY be the cause of your problems. Take a look at the following knowledgebase article for information on how to disable it. http://www.keil.com/support/docs/1966.htm Note that once a character is written into SBUF, it does not instantly appear in the serial window. The serial port (on the real hardware and under simulation) takes some time to transmit a character. So, you will not see the character written to SBUF appear for 10 BAUD bit times. In other words, if your baud rate is 1200, it will take 1/120 seconds before a character written into SBUF appears in the serial window. An exception to this rule! If you set the STIME VTREG to a value of 0, accurate serial port timing is thrown out the window and characters written to the serial port are immediately output to the serial window. Refer to the following knowledgebase article for more information: http://www.keil.com/support/docs/1943.htm Jon
Thank you both for the replies. Jon, yes I figured out early that I had to add code to reset the watchdog but that doesn't appear to be the problem. For some reason ANY example using the reg515a.h header file doesnt allow me to print to the output. I still don't see what I'm doing wrong. Andrew, I've used the assign statement to no avail. Why would I need to use the assign statement for the 515a and not have to use it for the 552? All I've changed in the Hello World program is the include file, added 2 lines of code to reset the watchdog. The Peripherals/Serial dialog box shows the serial port as being configured correctly. I step over the entire printf statement many times but no output to the screen. In fact I have just downloaded the Infineon C515A/B/C A/D Example project and that also doesn't print to the output.
What version of the tools are you using? Have you tried V6.20? Jon
Have you tried turning on all the compiler listing options - preprocessor output, #included files, assembler, etc - and all the Linker listing options, and then doing a side-by-side text compare on the listings using the 2 different #include files? That might reveal a clue? we recommend Araxis Merge as a text comparison tool (and musch more): http://www.araxis.com/
Thanks for all your help. I just created a new project and brought over my .c and .h files. It occured to me that it could have been a corrupted include file, so I copied over a new reg515a.h from the keil web site. It works now.
Do you know if it was a corruption in your file, or was there an error which Keil have fixed in the latest version?