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

Having trouble starting a project

I start uVision3 and clicked 'New uVision Project' from the Project Menu. A 'Create New Project' window appears. I enter the name of the project (LEDTest) and clicked save. Then a "Select device for Target 1' window appeared. I then double-clicked on Atmel and chose the AT89C55WD as the device and I clicked OK. Then a window saying 'Copy Standard 8051 Startup Code to Project Folder and Add File To Project' appeared and I clicked yes. As soon as I did that, the Project Window displayed. On the 'Target 1' folder are 3 red dots which I know means there's something wrong. I haven't even written code yet and I'm having problems. Does anyone knows how to correct this problem?

Parents Reply Children
  • Andy thank you for that link. So those red dots represent a group of specific options. The color red usually represents a warning. So I assumed that 's what it was. Also I only purchased the A51 kit. So I can't use the 'Hello' project which is written in c language. I still can't see anything wrong with the code I wrote. It's just too simple not to work. I must be lousy at programming since I can't even get an LED to blink. Did you find out what is wrong with the code I wrote?

  • I changed the label 'b' to an 'f' and the error mesages are gone. But 3 warnings poped up. here is the contents of the output window:

    assebling LEDTest.a...
    linking...
    *** WARNING L5: CODE MEMORY SPACE OVERLAP FROM: 0000H TO: 0002H
    *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP)
    *** WARNING L2: REFERRENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) ADDRESS: 001DH
    Program Size: data=9.0 xdata=0 code=34
    :LEDTest" - 0 Error(s), 3 Warning(s)

  • That's the trouble: don't assume - find out for sure!

    Writing software requires that you play precisely by the rules: the tools won't give you any leeway at all.
    They will do precisely what you say in your source code - they will not attempt to work out what you meant

    Therefore the first thing you must do is to study the manuals carefully - so that you know what the rules are!

    "It's just too simple not to work"

    No that is not true at all, I'm afraid.

    Writing a "simple" program requires just as much care, attention, and precision as writing a complex one!

    Speaking of care & attention, did you not notice the instructions on how to post source code?
    They are clearly stated immediately above the window where you types your message...

    www.danlhenry.com/.../keil_code.png

    " Did you find out what is wrong with the code I wrote?"

    The Assembler told you two things that are wrong with it - so fix those first!

    Your first step should be to look-up those error messages in the manual:
    http://www.keil.com/support/man/docs/a51/a51_a8.htm
    http://www.keil.com/support/man/docs/a51/a51_a46.htm

    and be sure to see the linked knowledgebase articles...

  • You need to understand why - follow the links for the descriptions of the original error messages...

  • I read the contents of the link file (LEDTest.lnk) and it shows zero errors and zero warnings. This is confusing. I compiled this program using an 8051 homemade compiler that I made using Visual Basic. I compared the Link file with HEX code and 2 addresses in the Link file had wrong data. I guess those are the addresses that are causing the problems.

  • I finally found the problem. I tried removing the file STARTUP.A51 and the program compiled perfectly. I don't know why but there is something about that file that was causing the problem.

  • " I don't know why "

    Because this is the startup code for a 'C' program; so it expects to have a 'C' program to jump into - but you haven't provided one!

  • That explains it. I'm such an idiot. I thought that since it had an A51 extension that it was assembly. Are there any other files that I could add to group 1 that would give me other features that I don't know about? Do I have to put an INCLUDE file at the beginning of my code or does uVision3 do it automatically since I selected a device when setting up the project? I have a lot to learn.

  • "I thought that since it had an A51 extension that it was assembly."

    Yes, it is assembly - you can open it and look it at - and that is why it has the A51 extension.

    But its specific function is to prepare the system to run a 'C' program, and then to call that 'C' program.

    "Are there any other files that I could add to group 1 that would give me other features that I don't know about?"

    If you add any random file to any group you will most probably get features that you don't know about!

    "Do I have to put an INCLUDE file at the beginning of my code"

    No, you don't have to - but it is usually a good way to proceed.

    "does uVision3 do it automatically"

    Not automatically - but it does give a menu item to make manually adding the "standard" processor include file a one-click operation!

    "I selected a device when setting up the project"

    That's how it knows which include file to offer in the menu option.
    (also how it knew which startup file to offer).

    "I have a lot to learn."

    Indeed. And it would probably be a lot more effective if you were to take some time to sit down and do some study rather than just stumbling from error to error.