您的位置:首页 > 其它

笔记--- Writing Code for ROM

2010-01-21 18:47 483 查看
Initializing the system

One of the main considerations with application code in ROM is the way in which the application initializes itself and starts executing. If there is an operating system present, this does not cause a problem because the application is entered automatically through the main() function.

No automatic initialization takes place on RESET, so the application entry point must perform some initialization before it can call any C code.

Typically, the initialization code should carry out some or all of the following tasks:
• defining the entry point
• setting up exception vectors
• initializing the memory system
• initializing the stack pointer registers
• initializing any critical I/O devices
• initializing any RAM variables required by the interrupt system
• enabling interrupts
• changing processor mode if necessary
• changing processor state if necessary
• initializing memory required by C
• entering C code.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: