Kinetis系列——KSDK V1.3系统架构

1. GettingStarted with Kinetis SDK (KSDK) v.1.3

在大概了解了KSDK下的文件夹和文件,接下来就Getting Started吧。

步骤:

l   阅读文档Getting Started with Kinetis SDK;
l   建立SI工程SI_Prj_platform,暂时只包含platform下的hal和drivers。有五六百个文件;
l   阅读SI_Prj_platform下代码。

1.2     KSDK概述

KSDK是一个为Freescale的Kinetis系列MCU提供全面软件技术支持的软件开发工具包。KSDK包括每个外设的硬件抽象层(HAL)和建立在HAL层之上的驱动层(Driver)。

1.2.1  KSDK demo and exampleapplications

KSDK提供两类软件例程

Demos Applications:全功能的范例旨在突出MCU的主要功能,着重特定用例。

Driver Examples:简单的范例旨在简明的阐述如何使用KSDK外设驱动。

<install_dir>/examples/<board_name>在每个板文件夹的顶层是一些演示和驱动都将用到的公共文件集,当改变复用器配置时这些文件可以被修改。

board.c/h:The header file contains board-specific configuration macros forthings such as debug terminal configuration, push buttons, LEDs, and other board-specificitems. The C file contains clock and oscillator initialization functions.

gpio_pins.c/h:Definitions used by the KSDK GPIO driver for the platform’s GPIOpins. These include push buttons and LEDs, but can include other items such asinterrupt pins for external sensors, for example.

pin_mux.c/h:Contains peripheral-specific pin mux configurations. These functionscan be called by the hardware_init() function or individually by the demoapplication.

进入demo_apps,一个典型的示例如下:

1.3     定位示例源文件

有两大主要区域提供每个例程的全部源文件:

<install_dir>/platform: Containsshared, SoC-specific linker files, startup code and source for KSDK HAL,peripheral drivers, and system services.

<install_dir>/lib: Contains thecompiled library files of the KSDK platform components such as HAL, peripheral drivers,startup code, and system services.

1.4     KSDK platform folder

platform是KSDK最重要的文件夹,它是KSDK的根基,并且包含主要的(primary)组件的源码,如CMSIS头文件、外设驱动(peripheral drivers)、硬件层(HAL)、操作系统抽象(OS abstraction)、启动文件(startup)、系统服务(system services)和链接文件,成功编译例程需要其大量组件。

当编译一个利用KSDK组件的例程时,有两种方法:

l  包含每一块需要的源文件;

l  链接一个库,这个库包含platform所有或相关的组件。

所有KSDK示例采用后一种方法。

1.5     KSDK lib folder

Each library configuration inthe lib folder contains a folder for each supported toolchain. Each toolchaincontains a folder for the supported SoC families. The ksdk_platform_lib must bebuilt for the specific SoC being used in the demo. This is discussed in detailin the subsequent toolchain-specific sections.

1.6     Run a demo using Keil

l   Install CMSIS device pack
l   Build the platform library
l   Build a demo application

2. Kinetis SDKv.1.3 API Reference Manual

通过上面,对KSDK已经有了大致的了解,现在初步看看它的API吧, 《Kinetis SDK v.1.3 API Reference Manual》+SI工程。

2.1     Introduction

Kinetis软件开发套件是一个扩展套件,它具有可靠地硬件接口和硬件抽象层、外设驱动、RTOS抽象、协议栈和中间件,以简化和加速Freescale Kinetis系列MCU的应用开发。额外添加的处理器专家技术(Expert technology)对于软甲开发和板级配置提供了无与伦比的易用性和灵活性。

KSDK

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值