CORTEX-M 单片机 文章总览

一般来说 我们学习单片机 是通过学习历程(外设) 来 学习单片机
在这里,换个角度
从 单片机 启动角度 调试下载角度  内存角度 工程角度 来 学习单片机

Cortex-M单片机

Cortex-M 软件接口标准 CMSIS


https://developer.arm.com/tools-and-software/embedded/cmsis

2.1.6 The Cortex Microcontroller Software Interface Standard

ARM provides the Cortex Microcontroller Software Interface Standard (CMSIS) for programming Cortex-M0 microcontrollers. 
The CMSIS is an integrated part of the device driver  library. 

The Cortex Microcontroller Software Interface Standard (CMSIS) simplifies software development by enabling the reuse of template code and the combination of CMSIS-compliant software components from various middleware vendors. 

Vendors can expand the CMSIS to include their peripheral definitions and access functions for those peripherals.


For a Cortex-M0 microcontroller system, CMSIS defines:
• a common way to:
— access peripheral registers
— define exception vectors
• the names of:
— the registers of the core peripherals
— the core exception vectors
• a device-independent interface for RTOS kernels.
The CMSIS includes address definitions and data structures for the core peripherals in a Cortex-M0 processor. It also includes optional interfaces for middleware components comprising a TCP/IP stack and a Flash file system.
The CMSIS simplifies software development by enabling the reuse of template code, and the combination of CMSIS-compliant software components from various middleware vendors. Software vendors can expand the CMSIS to include their peripheral definitions and access functions for those peripherals.

This document includes the register names defined by the CMSIS, and gives short descriptions of the CMSIS functions that address the processor core and the core peripherals.
Note
This document uses the register short names defined by the CMSIS. In a few cases these differ from the architectural short names that might be used in other documents.

The following sections give more information about the CMSIS:
• Power management programming hints on page 2-30
• Intrinsic functions on page 3-5
• Accessing the Cortex-M0 NVIC registers using CMSIS on page 4-3
• NVIC programming hints on page 4-9.

ARM单片机工程的编译链

单片机makefile工程

单片机的boot

单片机的内存


cortex-M 单片机 的调试接口

调试下载框架及工具总览

OpenOCD 支持调试 	 支持边界扫描   支持系统编程
JTAG	支持调试 	 支持边界扫描
SWD 	支持调试    不支持边检扫描

对于一些芯片,还有专门的编程下载器,这些下载器仅支持擦写FLASH的功能,不支持调试和边界扫描

为ARM芯片调试引出的管脚 JTAG & SWD

JTAG
SWD
diff in JTAG & SWD

ARM的调试框架coresight

调试下载工程实际案例

过程解析

DAPLink源码解析

  • 源码获取
// 获取渠道有很多

D:\ProgramFiles\ProgramFilesForSW\keil_v5\ARM\PACK\ARM\CMSIS\5.5.1\CMSIS\DAP\Firmware
https://github.com/ARMmbed/DAPLink
https://github.com/ARM-software/CMSIS_5

猜你喜欢

转载自blog.csdn.net/u011011827/article/details/117992269