笔记--- 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.
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.
相关文章推荐
- 阅读笔记(paper+code):Residual Attention Network for Image Classification
- 10 Tips for Writing Better Code (阅读理解)
- [置顶] C# 警告错误问题处理笔记整理(Code Analysis for Managed Code Warnings)
- Writing shellcode for Linux and *BSD
- Guidelines for Writing Secure Code(安全代码编写准则)
- ThinkAir: Dynamic resource allocation and parallel execution in the cloud for mobile code offloading阅读笔记
- Writing Efficient C Code for Embedded Systems
- 阅读笔记(paper+code):Residual Attention Network for Image Classification
- Writing Mobile Code : Essential Software Engineering for Building Mobile Applications
- What I Learned as a Junior Developer Writing Tests for Legacy Code(转载)
- 《Writing Clear Code---- Microsoft Techniques for Developing Bug-free C Programs 》摘录
- 行为识别阅读笔记(paper + parted code):Beyond Frame-level CNN Saliency-Aware 3-D CNN with LSTM for Video Acti
- Writing Code Suitable for Implementation with Conditional Moves
- Tips for writing efficient Python code
- Skype for Business边缘架构与设计课程笔记
- [AJAX Control] Sample Code for Accordion Control DataSource
- code for performance(STL)
- ioS开发-ld:报错 library not found for -l**** clang: error: linker command failed with exit code 1
- Educational Codeforces Round 36 (Rated for Div. 2) F. Imbalance Value of a Tree(并查集)
- there is no source code available for the current location的解决方法