Baremetal
latest

Contents:

  • Baremetal M3
    • 1、基础知识
    • 2、代码编译运行
    • 3、Makefile 和 链接脚本
    • 4、Main 函数
    • 5、Log输出
    • 6、完善链接脚本
    • 7、函数调用
    • 8、异常
  • Baremetal A15
Baremetal
  • Baremetal M3
  • Edit on GitHub

Baremetal M3¶

参考资料:

MPS2 平台:
https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps2
DAI0385D_cortex_m3_on_v2m_mps2.pdf
DDI0479D_m_class_processor_system_r1p1_trm.pdf
ARM m3 手册:

DUI0552A_cortex_m3_dgug.pdf

QEMU:

qemu-6.0.0

Toolchain:

gcc-arm-none-eabi-10-2020-q4-major

ARM 参考代码:

https://github.com/ARM-software/CMSIS_5/tree/develop/Device/ARM/ARMCM3

代码:

https://github.com/thomas-coding/baremetal

Contents:

  • 1、基础知识
    • 1.1 一行汇编
  • 2、代码编译运行
    • 2.1 代码准备
    • 2.2 运行
  • 3、Makefile 和 链接脚本
    • 3.1 Makefile
    • 3.2 链接脚本
  • 4、Main 函数
    • 4.1 代码修改
    • 4.2 C调用流程
    • 4.2 运行结果
  • 5、Log输出
    • 5.1 UART 硬件
    • 5.2 UART 软件实现
    • 5.3 Console 软件实现
    • 5.4 代码结构
    • 5.5 运行结果
  • 6、完善链接脚本
    • 6.1 链接脚本
    • 6.2 更新向量表
  • 7、函数调用
    • 7.1 函数调用代码
    • 7.2 传参和返回值
    • 7.3 栈的使用
  • 8、异常
    • 8.1 系统异常
    • 8.2 异常进入和退出
Previous Next

© Copyright 2021, Jinping Wu. Revision 7b49e5ce.

Built with Sphinx using a theme provided by Read the Docs.