Is it always important to include the file "startup.a51"? Should anything else be included for it to work properly? Thanks
Hi, http://www.keil.com/support/docs/1296.htm Rgds Raj Shetgar
Yes it is primary init for 51.
Is there some detailed explanation of startup.a51? I read the user's guide but it wasn't much help. I would appreciate it if I can find an example of a startup.a51 modified for custom use. (I am new to Keil) Thanks
Is there some detailed explanation of startup.a51? WHY?. I used Keil for years and hardly knew it existed. Do you have a SPECIFIC reason for your inquiry? Erik
*Does this mean that iit is not important to use startup.a51? If so, then in what cases should it be used? *Or does it mean that it is not important to know its details? thanks
Hi Mohammad, I always include startup.a51 in my project. The reasons are: 1. I am using winbond 78E516, and it has an AUX-RAM on the chip. I have to modify the startup.a51 to init this memory area. 2. I want to have a full control of my source code. Even if I don't have to change the startup.a51, I'd prefer to have it included in my project, then I can step through the code before it jump to main. It's useful especially when you have a hardware problem (I mean bad mem W/R). As to the detail explaination, I think you can read the source code of startup.a51, It's kind of self-explained to me. Have a nice day! Frank
1)Does this mean that iit is not important to use startup.a51? 2)Or does it mean that it is not important to know its details? 1) it is not "important" it is REQUIRED if you have any C code. 2) I did not know the details for years, never looked. Erik
Thanks Frank.. The problem with the file is that i am not that good at assembly. I can understand the codes that clear memory, but other parts seem rather ambigous
Thanks...
I can understand the codes that clear memory, but other parts seem rather ambigous As a public service, here are the parts of the standard Keil-supplied STARTUP.A51 that do not involve clearing memory.
CSEG AT 0 ?C_STARTUP: LJMP STARTUP1
MOV SP,#?STACK-1
; This code is required if you use L51_BANK.A51 with Banking Mode 4 ; EXTRN CODE (?B_SWITCH0) ; CALL ?B_SWITCH0 ; init bank mechanism to code bank 0
LJMP ?C_START
END
LJMP ?C_STARTThis code jumps to the start of your C code -- that is, main(). Not quite. C_START is the start of Keil's 'C' runtime startup: this includes, among other things, the code to setup all the values of initialised variables. Once this code has completed, it then jumps to main(). As someone else mentioned earlier, you can step through all this if you want...