This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help with Keil C51

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

  • I doubt Andy's car could make it that far!

  • No - but I've heard about this "interweb" thingy that lets people work together "remotely"...

  • Christopher;

    May I suggest PCE-Dallas at http://www.planocad.com. They are located in Plano, not far from the Keil offices. Being that close something might have rubbed off from Keil. Not sure about that:).

    I have worked with PCE-Dallas in the past. I am not part of their company for full disclosure.

    You know that you are not far from Silicon Labs. I'm sure their support might have a name for you.

    You might ask that Keil Support forward your email address to me or my email address to you. I'm not sure if they can take that kind of time but if they can, we will not be flooded with spamalot by publishing our email on this forum. They should have our correct email from our registering on the forum.

    No, I am not registered on the Keil consultant list. Like Erik, I'm just too long experienced (read old) and my client base now exceeds my desire to work.

    Al Bradford

  • You'd better do that Please read the manual thingy PDQ then so you can learn how to use it.

  • Al -

    Thanks so much for your response!

    I have made a temporary email address at CFoxTemp@shepoa.com that will forward to me. Once I hear from you I will shut that address down. If you can send me your email address, perhaps I can use your help.

    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.

    I may be able to muddle through, but I would gladly pay for occasional brief bits of advice when I get stuck! :-)

    Thanks to everyone for their advice!

    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)

    Erik

  • 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)

    Erik