I'm trying to compile a C C51 based program using Keil compiler, v 7.04. sscanf works properly using the emulator, but hangs when running the application on the C51 based processor. Is there any known bug there ? Thanks in advance, Ignasi Villagrasa.
"sscanf works properly using the emulator, but hangs when running the application on the C51 based processor." Do you really mean "emulator" here; ie, a hardware unit that plugs into your board in place of the 8051-based processor? If so, see here for some things that might cause it to run on an emulator, but not the real processor: http://www.keil.com/forum/docs/thread4114.asp Or are you talking about a software Simulator; ie, running your code purely on a PC without any need for target hardware at all? One of the key differences when running on a Simulator is that memory is cleared at the start of the program - which will very often mask problems due to uninitialised variables. If your code runs in the Simulator but not your target, this could indicate a hardware fault (either a design fault or something broken). Or it could be that the hardware is working correctly, but your understanding of it is flawed - so you are doing something invalid, or repying upon a false assumption. You will need to supply more details for us to be able to help you. eg, how do you know that it's sscanf that's hanging?