I am a long-time assembler guy in 8051's and PICs, and just got my new Keil C51 IDE package. I am, not fluent in 'C' or Keil tools (yet). I have to look at someone else's existing code and compile it, but I get errors after loading their project and trying a build. Since I am new to the tool set, I am stumped on figuring out what is wrong. Is anyone out there who would take this set of files and help me figure out how ot get it to compile, or what is missing, for a fee? I could send the files and maybe you could help me understand what is wrong or missing? If I was more fluent with the tool set, I could get there myself, but time is critical. Can anyone help? (If this is posed in the wrong place, please forgive me!) Chris
In going through all this code and getting a few clues from folks who have been exposed to it, I found another folder with a version that does indeed compile without errors. So my problem may be mostly solved - albeit not by any great expertise on my part. At least if I have working code now (I think) then I can make small changes and see what happens! The goal we are working towards is getting control of the firmware that we have inherited, and then trying to fix some intermittent problems that it has. So my goal is to first be able to compile, load and run it, and then to duplicate the failure, and then start looking at what exactly is going on having had similar experiences (being dropped into a mess with no one knowing diddlysquat) I have a suggestion: under the assumption that this worked fully before if you find issues, with your build, that do not exist on the "production build" do a file compare between the files in your working build and the other files with the same/similar name/content. You will find the various changes/fixes the 'litterbug' that preceeded you made.
Erik
Thanks, Erik -
What I have right now (which I have not changed at all yet) does compile and I *think* it is the latest version. Today I have to try and load it into the hardware and see if it works. If it does, I am in a lot better place!
This would not be so hard for me except that I am unfamiliar with the tool set as well as this code.
There is a long jump in here to "?C_START" or "?C_C51STARTUP" but this label is not defined anywhere in any of the project files. Is this some "special" symbol? I did a search on the on-line help and found no reference to it, either. I can assume what it DOES of course, but I just can't understand it.
Is there something magic about these symbols that start with "?C_"? Am I missing something major here?
Chris "Too old to learn new tricks"
"Too old to learn new tricks" then why teach you one? :)
There is a long jump in here to "?C_START" or "?C_C51STARTUP" but this label is not defined anywhere in any of the project files. Is this some "special" symbol? I did a search on the on-line help and found no reference to it, either. I can assume what it DOES of course, but I just can't understand it. this indicates crummy code. someone is trying to 'reset' the uC by jumping to the startup vector. This method is prone with errors, since all SFRs and RAM will stay the same. anyhow, the two labels appear in the "secret code" Keil includes to make the compiled code work (startup.a51.asm)
http://www.keil.com/support/man/docs/c51/c51_ap_startup.htm
For doing File compares I recommend the Program "Beyond Compare". Free to try, cheap to buy.
A file compare utility is invaluable for sorting out what is different. In a sense you are stuck unless you can build the code and get the same checksum. Otherwise you can not be sure you have the latest code. Or if the latest code is not what you are shipping. the littlest thing can change the checksum, including not using the exact compiler version.
Plus many (D)VCS tools allow it to be configured as the (superior) visual diff tool.
Thanks everyone for their help. Miracle-of-miracles, today I was able to speak briefly the with original author of this mess! A few questions were answered.
I am having a lot of trouble understanding the Keil IDE when it comes to files that are referenced but I can't seem to be able to see anywhere. The files listed in the project are not all the files involved, but I can't find the ones that are! I suspect that deep inside there is a menu where one would include "other" references and I will trip over it soon.
This stuff uses SiLabs USBExpress module, but I can't find the module (source, object, either one) anywhere! Things seem to just magically appear and get linked-in. It is very frustrating for a newcomer to the tool set. I just wanted to upgrade it to the latest version and I am totally lost. I am sure it is all defined in there someplace, but I just can't see it yet.
I hate getting thrown into a complex project with a tool set I don't know.
Chris
I am having a lot of trouble understanding the Keil IDE when it comes to files that are referenced but I can't seem to be able to see anywhere
not the IDE, but the com piler and linker. If there is no startup in the build, it will be included automatically, the standard C library functions will be included, again automatically, if referenced, some functions (e.g. 'switch') will result in a load of "code to process the function".
anyhow, all that is totally uninteresting to you (except your curiousity)