Kinetis calls CMSIS Function

Source: Internet
Author: User

For CMSIS function calls, ARM officially provides stm32 examples, and it seems that there is no problem when stm32 calls CMSIS. Problem Source: see iar technical article Using CoreSight Trace Techniques on Cortex-M3/M4, I feel good, one by one practices on kinetis, found Example 5: the functions described in Printf via SWO cannot be implemented. Problem Analysis: The function ITM_SendChar () cannot be called. The function is defined in the core_CM4.h Header File. In the ARM official CMSIS description, the Header File should be in the Device Header File <device. h>. h does not include this header file. I don't know why fiskar does not support cmsis. Solution: add the following code according to the description of CMSIS: [cpp] // cmsis # define _ CM4_REV 0x0001/* Core revision r0p1 */# define _ MPU_PRESENT 0/* MPU present or not */# define _ NVIC_PRIO_BITS 3/* Number of Bits used for Priority Levels */# define _ Vendor_SysTickConfig 0/* Set to 1 if different guest ick Config is used */# define _ FPU_PRESENT 0/* FPU present or not */typedef enum IRQn {/***** Cortex-M4 Processor Exceptions Numbers *************************************** * *********** // * ToDo: use this Cortex interrupt numbers if your device is a CORTEX-M3/Cortex-M4 device */NonMaskableInt_IRQn =-14 ,/*! <2 Non Maskable Interrupt */MemoryManagement_IRQn =-12 ,/*! <4 Memory Management Interrupt */BusFault_IRQn =-11 ,/*! <5 Bus Fault Interrupt */UsageFault_IRQn =-10 ,/*! <6 Usage Fault Interrupt */SVCall_IRQn =-5 ,/*! <11 SV Call Interrupt */DebugMonitor_IRQn =-4 ,/*! <12 Debug Monitor Interrupt */PendSV_IRQn =-2 ,/*! <14 Pend SV Interrupt */SysTick_IRQn =-1 ,/*! <15 System Tick Interrupt * // ******* Device Specific Interrupt Numbers ********************** * ToDo: add here your device specific external interrupt numbers according the interrupt handlers defined in startup_Device.s eg.: Interrupt for Timer #1 timereirqhandler-> timereirqn */} IRQn_Type;/* ToDo: include the correct core_cm #. h file core_cm0.h if your device is a CORTEX-M0 device core_cm3.h if your device is a CORTEX-M3 device core_cm4.h if your device is a CORTEX-M4 device */# include <core_cm4.h>/* Cortex-M # processor and core peripherals * // * ToDo: include your system _ <Device>. h file replace '<Device>' with your device name * // cmsis running effect:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.