# kernel_liteos_m_stm32f103_keil **Repository Path**: luodeb/kernel_liteos_m_stm32f103_keil ## Basic Information - **Project Name**: kernel_liteos_m_stm32f103_keil - **Description**: STM32F103使用鸿蒙liteos_m OS - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 7 - **Created**: 2021-10-30 - **Last Updated**: 2022-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # kernel_liteos_m_stm32f103_keil #### 介绍 记录STM32F103使用鸿蒙liteos_m OS的调试过程 本代码原始代码使用了[@rtos_lover的代码](https://gitee.com/rtos_lover/stm32f103_simulator_keil.git) **目前程序可以烧录在STM32F103RET6上面运行** keil工程位于路径kernel_liteos_m_stm32f103_keil\targets\stm32f103_keil\project下 #### 调试记录: 2021年6月24日: STM32F103代码只能在Keil上仿真运行,烧录到单片机里面运行失败 2021年6月25日: 1.修改分散加载文件和调整内核裁剪后可以在在单片机上运行,但是报错:Exception Information 调试打印信息如下: ![Exception Information](https://images.gitee.com/uploads/images/2021/0625/155200_a4bfcdae_9333511.png "屏幕截图.png") 2.通过仿真发现程序死在NVIC_ClearPendingIRQ(SysTick_IRQn);清除滴答定时器中断的挂起位函数,但是这是内核标准函数,不知道原因,初步怀疑跟内核接管中断管理有关,这个是在重载滴答定时器函数调用,把这个函数屏蔽后,程序可以跑起来,但是延时的时间不对。 ![屏蔽重载滴答定时器函数](https://images.gitee.com/uploads/images/2021/0625/155753_279f2940_9333511.png "屏幕截图.png") ![程序正常跟起来运行打印的信息](https://images.gitee.com/uploads/images/2021/0625/155906_b3ff2694_9333511.png "屏幕截图.png") 2021年6月25日下午: 目前已调试通过,程序死在清除滴答定时器中断的挂起位函数是因为core_cm3.h的问题,我替换了keil里面的core_cm3.h就没有报错了,时间不准是因为时钟配置的原因,程序已修正。 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request