redboot startup process

本文介绍了Redboot作为eCos包的一部分,在嵌入式系统中作为引导加载程序的应用。文章详细阐述了Redboot的启动流程,从reset_vector入口开始,经过MMU配置等初始化步骤,最终进入cyg_start函数,完成所有软硬件初始化,并加载应用程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Redboot is a choice for us if we need to implement our boot loader without do it all by ourselves.  It is a portion of eCos package and we get the whole eCos pacakge when we want to get redboot source code.  The cross-tool is also included in such a package.

We get all source code of eCos including its of redboot. In fact, we do not need so much more and we may lose in so much more code. We only need to care for hal, redboot and a few other subtrees, for example services which provided compress/uncompress algorithms.

The real entry of redboot is reset_vector in /ecos/packages/hal/xxx/arch/current/src/vector.S. After some simple iniitializations such as MMU configuraiton or memory controller initializaiton, then transmit the control to cyg_start which just likes the main entry for c program. The cyg_start is in /ecos/packages/redboot/current/src/main.c.

All jobs are dealt in cyg_start. Firstly, it will do some initializaitons such as memory size configuration,workspace configuration. And then executes all routines in __RedBoot_INIT_TAB__ section. At this point, all hardware and software initializations are completed.  The following job is its duty, loading application. If there has a script and auto loading script enabled, the script will be executed. After procedded the script, the command line loop is started and then we can key in these commands now.

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值