What is the startup code in Keil MicrovisionIDE?

Status
Not open for further replies.

Elimathew

Member level 5
Joined
Jun 21, 2011
Messages
88
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
India
Activity points
1,894
when I start the project in Keil microvisionIDE it asks for startup code.i wanted to know what is a startup code?
 

Re: Keil MicrovisionIDE

if you are working on 8 bit controller then you add or dont add does not make difference. but when you work with 32bit controllers then the startup code of the manufacturer and device specific should be mandatorily added, or else the compilation of program will not be done in advance programs.
 
Re: Keil MicrovisionIDE

It is written by manufacturer and specific to specific family of device. you have to select proper startup code for the device you are using.

hope this helps
 

Re: Keil MicrovisionIDE

• Startup code is an extra piece of software that executes prior to main(). The startup code is generally written in assembly language and linked with any
executable that you build.
• It prepares the way for the execution of programs written in a high-level language.
• Each such language has its own set of expectations about the run-time environment in which programs are executed.
• For example, many languages utilize a stack. Space for the stack must be allocated and some registers or data structures initialized before software written in the
high-level language can be properly executed.

Startup code for C/C++ usually performs the following actions:
• Disable interrupts
• Copy any initialized data from ROM to RAM
• Zero the un-initialized data area
• Allocate space for and initialize the stack
• Create and initialize the heap
• Execute the constructors and initializers for all global variables (C++ only)
• Enable interrupts
• Call main()
 
Re: Keil MicrovisionIDE

can this startup be modified? if yes then what are the possible changes we can do in that.
 
Reactions: ramina

    ramina

    Points: 2
    Helpful Answer Positive Rating
Re: Keil MicrovisionIDE

A startup code is adviced not to be modified unless you know the internal architecture and working of every component inside the controller.
things you can modify. the remapping of memory. SP and PC value, stack position and size, PLL clock, peripherals definition and address, ISR or 7 modes of operation. their control etc, clock input to peripherals etc...

if it is tampered without knowledge then it make the controller work or behave wrongly or give wrong output.... it can also cause other damages to the controller....

Once you make changes to the file you have to recompile the program / project and flash the hex file to the controller.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…