~杂记(3):los_dispatch.s和startup.s的作用分析

本文探讨了LiteOS中los_dispatch.s与startup.s文件的作用,los_dispatch.s为系统调度核心,startup.s负责硬件启动,LOS_StartToRun()启动系统,osSchedule()进行任务调度,irq_handler管理中断,Reset_Handler处理复位。

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

1、首先LiteOS中los_dispatch.s是系统的调度文件,而startup.s是与硬件相关的启动文件。

如下图所示。根据某芯片开发板工程中的文件内容,简单的勾勒出两者的关系。

其中:

1)LOS_StartToRun()会在main中被间接调用,用于启动系统。

2)osSchedule(); 此API用于调度任务。

3)irq_handler 是默认的中断函数,用户需根据芯片的中断向量表,将startup.s中__Vectors下方的列表替换成相应的函数入口(中断服务函数名)。

4)Reset_Handler是复位函数。

2、在该芯片的裸机(无操作系统)中,有startup.s和vectors.s管理芯片的启动和中断的调度。

有如下简要的示意图。

3、我自己其实也没有搞得很清楚,只是大概了解了上述两种情形下,几个文件的基本作用。等以后搞得清楚了再补充。

如果我有哪里说错了,请指正。

Running verify PaddlePaddle program ... I0310 22:04:50.223434 4229613632 program_interpreter.cc:212] New Executor is Running. I0310 22:04:50.319111 4229613632 interpreter_util.cc:624] Standalone Executor is Used. WARNING: Logging before InitGoogleLogging() is written to STDERR I0310 22:04:50.321961 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.322315 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.322837 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.322839 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.323275 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.323278 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.323727 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.324636 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.324638 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325079 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325081 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325083 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325500 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325501 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325503 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325779 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325822 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325845 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325860 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325870 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325892 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325909 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325920 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.325929 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326249 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326251 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326252 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326253 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326256 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326256 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326256 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326565 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326566 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326567 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326568 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326570 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326570 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor I0310 22:04:50.326571 4229613632 kernel_dispatch.h:102] Get BackendSet from tensor PaddlePaddle works well on 1 CPU. PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now. None
最新发布
03-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值