neptune操作系统代码启动流程

neptune操作系统代码启动流程

https://mp.weixin.qq.com/s/KhHdEUifmYFn13a5FvlMxw

neptune开发板启动运行串口打印的原始log如下:
[09:44:52.097]收←◆entering kernel init…

[09:44:52.176]收←◆Begin to run the OHOS SYSTEM
start test task …Begin to run the user main

user task:20:35:09:May 14 2021
NVS operation failed, can’t retrieve the bonding info
hiview init success.00 00:00:00 0 132 D 0/HIVIEW: log limit init success.
00 00:00:00 0 132 I 1/SAMGR: Bootstrap core services(count:3).
00 00:00:00 0 132 I 1/SAMGR: Init service:0x817cd34 TaskPool:0x2003a6a4
00 00:00:00 0 132 I 1/SAMGR: Init service:0x817cf1b TaskPool:0x2003a6bc
00 00:00:00 0 132 I 1/SAMGR: Init service:0x817cf25 TaskPool:0x2003a6d4
00 00:00:00 0 84 I 1/SAMGR: Init service 0x817cf25 <time: 28ms> success!
00 00:00:00 0 252 I 1/SAMGR: Init service 0x817cf1b <time: 34ms> success!
00 00:00:00 0 164 I 1/SAMGR: Init service 0x817cd34 <time: 36ms> success!
00 00:00:00 0 164 I 1/SAMGR: Initialized all core system services!
00 00:00:00 0 252 I 1/SAMGR: Bootstrap system and application services(count:0).
00 00:00:00 0 252 I 1/SAMGR: Initialized all system and application services!
00 00:00:00 0 252 I 1/SAMGR: Bootstrap dynamic registered services(count:0).
通过查看wm800芯片文档,neptune中包括rom固件,板子上电后从rom开始执行,然后过渡到flash中得boot,然后在从boot跳转到os。

我们把生成的img文件写到flash中后,运行打印如下:
[09:45:05.249]收←◆Begin to run the OHOS SYSTEM
GpioIsr entry
Begin to run the user main

user task:11:17:57:Sep 8 2021
ble_npl_eventq_init:bigger queue 64

[09:45:05.285]收←◆ LED_OFF!
00 00:00:00 0 92 D 0/HIVIEW: hilog init success.
00 00:00:00 0 92 D 0/HIVIEW: log limit init success.
00 00:00:00 0 92 I 1/SAMGR: Bootstrap core services(count:3).
00 00:00:00 0 92 I 1/SAMGR: Init service:0x81775a3 TaskPool:0x200121f4
00 00:00:00 0 92 I 1/SAMGR: Init service:0x81775c5 TaskPool:0x20012864
00 00:00:00 0 92 I 1/SAMGR: Init service:0x8177739 TaskPool:0x20012a24
00 00:00:00 0 244 I 1/SAMGR: Init service 0x81775c5 <time: 26ms> success!
00 00:00:00 0 160 I 1/SAMGR: Init service 0x81775a3 <time: 36ms> success!
00 00:00:00 0 72 D 0/HIVIEW: hiview init success.
00 00:00:00 0 72 I 1/SAMGR: Init service 0x8177739 <time: 36ms> success!
00 00:00:00 0 72 I 1/SAMGR: Initialized all core system services!
00 00:00:00 0 160 I 1/SAMGR: Bootstrap system and application services(count:0).
00 00:00:00 0 160 I 1/SAMGR: Initialized all system and application services!
00 00:00:00 0 160 I 1/SAMGR: Bootstrap dynamic registered services(count:0).

[09:45:06.286]收←◆ LED_OFF!
代码工程和开发板初始的程序串口输出有点不一样,我们既然已经烧录了新代码,就按我们新代码分析启动吧。
最先运行的代码是startup.S,这是个汇编代码,是和处理器紧密相关的代码,其中一个跳转语句跳转到了c程序的main函数。

 

posted @   txwtech  阅读(173)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示