 | Discussion Forum |  |
|
|
Compiling with startup codeNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Thomas Looi Posted 16-May-2001 22:37 GMT Toolset C51 |  Compiling with startup code Thomas Looi Hello everyone
I am relatively new to the 8051. I am running in to problem creating a simple app with the ATMEL89C55.
I created a new project called test and insert 2 files, test.c and STARTUP.A51. It is my understanding that the STARTUP file is required to reset the memory of the microcontroller. In my test.c, all I have is a printf statement.
When I create the target I get 2 warnings: ***Warning L1: Unresolved external symbol symbol: ?B_SWITCH0 module: STARTUP.OBJ (?C_STARTUP) etc...
When I try to run it under the debug mode, it seems to be stuck in an endless loop on the statements:
IF IDATALEN <> 0 MOV R0,#IDATALEN - 1 CLR A IDATALOOP: MOV @R0,A DJNZ R0,IDATALOOP ENDIF
Any help would be greatly appreciated.
Much thanks in advance.
Thomas | | Read-Only Author Rodrigo Chacón Posted 17-May-2001 06:55 GMT Toolset C51 |  RE: Compiling with startup code Rodrigo Chacón The loop is because the code startup clear the memory address from (IDATALEN-1) to "0". You have actived watchdog timer??
You read In the C51 Guide (page 114 to ......) | | Read-Only Author Andrew Neil Posted 17-May-2001 09:54 GMT Toolset C51 |  RE: Compiling with startup code Andrew Neil When I create the target I get 2 warnings:
***Warning L1: Unresolved external symbol
symbol: ?B_SWITCH0
module: STARTUP.OBJ (?C_STARTUP) So what's the other warning? "Reference made to unresolved external" I'd guess?
The message means that startup.obj has made a reference to something (eg, a variable) called "switch0" but nowhere in your project actually defines anyhting called "switch0"
Do you recognise an identifier called "switch0?" What do you think it should do? Where do you think it should be defined?
Note that the linker converts everything to UPPERCASE; so your code might actually use "Switch0" or "sWiTcH0" or "SwitcH0" etc etc etc
| | Read-Only Author Thomas Looi Posted 18-May-2001 15:55 GMT Toolset C51 |  RE: Compiling with startup code Thomas Looi The warnings are the same. However, when I recompiled this morning, the warnings do not appear.
I have not changed anything from the original start up code provided by Keil. I assumed it is a standard code used to initialize the processor. May be this is my mistake.
I am using an ATMEL89C55 processor. Do you know if this is different from the startup?
Much thanks
| |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|