Transcription of Getting Started with MDK Version 5 - .NET Framework
1 ARM Cortex -M . MDK 5 .. 2 .. 1 .. Copyright 1997-2015 ARM Germany GmbH. All rights reserved. Keil Vision Cortex CoreSight ULINK ARM Germany Gmb H ARM Ltd.. Microsoft Windows Microsoft . PC IBM .. Microsoft Windows Cortex -M .. MDK 5 3.. ARM Keil MDK 5 . Cortex-M .. ARM ULINK . / . MDK .. MDK .. MDK MDK .. CMSIS Cortex-M .. Compiler I. /O I/O . CMSIS .. MDK-Professional .. 4 . Middleware MDK-Professional .. MDK 5 5.. 3. MDK .. 8. MDK .. 8.. 9. MDK .. 9.. 10.. 10. MDK .. 10.. 11. MDK-Professional .. 13.. 14.. 20.. 27.. 28.. 28.. 29. CMSIS .. 29. CMSIS-CORE .. 30. CMSIS-CORE .. 31. CMSIS-RTOS RTX .. 35.. 36. CMSIS-RTOS RTX .. 37. CMSIS-RTOS .. 48. CMSIS-DSP .. 49. CMSIS .. 52.. 53.. 55.. 56. Compiler .. 56. Board Support.
2 59. 6 .. 60. CMSIS-RTOS RTX Blinky .. 61. Blinky .. 72.. 74. DAVE Infineon XMC1000 .. 74. 78.. 83.. 83.. 84.. 85. Command .. 86. Disassembly .. 87.. 88. Watch .. 89. Call Stack and Locals 8. 9. Register .. 91. Memory .. 91.. 92.. 93.. 95.. 97. Event Viewer .. 98. Logic Analyzer .. 99. (printf) .. 100. Event Counters .. 102. 4 .. 104.. 104.. 105.. 107.. 109. USB .. 110.. 112. 7 .. 113. FTP .. 115. MDK 5 7.. 117. USB HID .. 119.. 120.. 122.. 124.. 125.. 128.. 131.. 132.. 134. 8 MDK . MDK . Keil MDK ARM Cortex-M .. MDK . MDK 5 MDK .. MDK 5 . MDK 4 . ARM7 ARM9 Cortex-R .. MDK . MDK Cortex-M .. MDK . Pack Installer .. MDK 5 9.. CMSIS .. MDK . MDK C/C++ .. Vision IDE . CMSIS. -RTOS RTX . MDK-Professional . MDK-Standard.
3 MDK-Standard Cortex-M Cortex-R ARM7 ARM9 .. MDK-Cortex-M Cortex-M .. MDK-Lite 32 KB .. 10 MDK .. MDK-Lite MDK .. 1 . 2 . FlexLM .. 7 MDK-Professional .. /docs/license .. MDK . Microsoft Windows 32 64 . PC. 4 GB RAM 8 GB . 1280 x 800 .. MDK . MDK 5 Product Downloads .. MDK . ARM CMSIS MDK-Professional Middleware .. MDK 5 11. MDK Pack Installer .. Pack Installer .. Pack Installer Vision Project Manage Pack Inst aller .. Pack Installer www.. 12 MDK . Pack Installer .. Pack Installer www.. File Import . *.PACK .. MDK 5 13. MDK-Professional . MDK MDK-Professional 7 .. Vision . 1. Vision File License Management .. Evaluate MDK Professional MDK P. rofessional . 14 MDK . 2. Start MDK Professional Evaluation for 7 Days MDK.
4 Professional 7 .. FlexLM 7 MDK Professional FlexLM License FlexLM . Use Flex Server Flex .. 1 .. LED Blinky .. MDK 5 15.. Pack Installer Examples .. Copy Destination Fold er .. 16 MDK . Launch Vision Vision . IDE . Use Pack Folder Structure .. Use Pack Folder Structure .. OK . Vision . Vision .. Flash ROM .. MDK 5 17.. Vision .. Abstract. txt . 18 MDK .. Rebuild .. Build Output .. USB .. MDK 5 19. Options for Target . Debug .. CMSIS-DAP Debugger CMSIS-DAP .. Load Application at Startup .. Vision . Run to main() main() main() .. Settings .. Help .. 20 MDK . Download .. Build Output .. Start/Stop Debug Session . / .. Run . LED .. MDK 5 21. Vision Project New Vision Pr oject Vision .. Pack Installer .. 22 MDK.
5 Manage Run-Time Environment .. Description .. ::< >:< >: < > ::CMSIS:CORE . CMSIS-CORE . MDK 5 23.. Manage Run-Time Environment .. Board Support 59.. CMSIS CORE DSP CMSIS-RTOS CMSIS 29.. CMSIS Driver 52. CMSIS . Compiler I/O printf 52. ARM .. Device 62.. File System 109.. Graphics 112.. Network TC 107. P/IP .. USB USB USB 110. USB .. MDK .. PLM . 24 MDK . MDK 5 25. PLM 4 .. Select Software Packs .. 26 MDK . Use latest Version of all installed Soft ware Packs . Selection .. latest .. fixed .. excluded .. SVCS . Vision SVCS . GIT SVN CVS .. 279 Using Git for Project Management with V. ision Vision Git com/appnotes/ .. MDK 5 27.. MDK . Vision Help Vision .. Help .. F1 RTOS .. Output F1 .. Books .. Project Manage Components, Environment, Books.
6 Books Books . Manage Run-Time Environment . Description . Project .. Vision .. 28 MDK .. rt .. Vision Help About .. ARM Cortex . Web . Web .. MDK 5 29.. MDK .. CMSIS. Cortex CMSIS . Cortex-M . CMSIS.. 60 . CMSIS .. CMSIS .. 30 CMSIS. CMSIS . CMSIS-CORE Cortex-M API .. ::CMSIS:CORE ::Device:Startup . CMSIS-RTOS RTX A. PI RTOS .. CMSIS-RTOS RTX .. CMSIS-DSP q7 q15 q31 . 32 60 . DSP . CMSIS . API . CMSIS API RTOS .. CMSIS-CORE. Cortex-M . CMSIS-CORE .. MDK 5 31. CMSIS-CORE . CMSIS Cortex-M . ::CMSIS:CORE . ::Device:Startup .. < > .. star tup_< >.s .. BUS system _< >.c .. < >.h .. < >.h C .. NVIC .. 32 CMSIS. Systick . SYSTICK . CoreSight printf I/O ITM .. ::CMSIS:CORE ::Device:Startup . Vision Manage Run-Time Environment.
7 Vision . MDK 5 33.. CMSIS-CORE . CMSIS-CORE . #include " " // File name depends on device used uint32_t volatile msTicks; // Counter for millisecond Interval uint32_t volatile frequency; // Frequency for timer void SysTick_Handler (void) { // SysTick Interrupt Handler msTicks++; // Increment Counter }. void WaitForTick (void) {. uint32_t curTicks;. curTicks = msTicks; // Save Current SysTick Value while (msTicks == curTicks) { // Wait for next SysTick Interrupt __WFE (); // Power-Down until next Event }. }. void TIM1_UP_IRQH andler (void) { // Timer Interrupt Handler ; // Add user code here }. void timer1_init(int frequency) { // Set up Timer (device specific). NVIC_SetPriority (TIM1_UP_IRQn, 1); // Set Timer priority NVIC_EnableIRQ (TIM1_UP_IRQn); // Enable Timer Interrupt }.
8 // Configure & Initialize the MCU. void Device_Initialization (void) {. if (SysTick_Config (SystemCoreClock / 1000)) { // SysTick 1ms : // Handle Error }. timer1_init (frequency); // Setup device-specific timer }. // The processor clock is initialized by CMSIS startup + system file int main (void) { // User application starts here Device_Initialization (); // Configure & Initialize MCU. while (1) { // Endless Loop (the Super-Loop). __disable_irq (); // Disable all interrupts // Get_InputValues ();. __enable_irq (); // Enable all interrupts // Process_Values ();. WaitForTick (); // Synchronize to SysTick Timer 34 CMSIS. }. }. MDK 5 35. Project CMSIS . Open Documentation . CMSIS-CORE .. CMSIS-RTOS RTX. CMSIS-RTOS RTX.
9 RTOS .. MDK RTOS . CMSIS-RTOS RTX MDK .. 36 CMSIS.. 2 .. ISR .. RTOS RTOS . RTOS . RTOS .. ISR .. RTOS . RTOS CMSIS-RTOS RTX .. RTOS .. RTOS . RTOS . MDK 5 37.. RTOS .. CPU .. RTOS . IRQ . / .. CMSIS-RTOS RTX . CMSIS-RTOS RTX cmsis . CMSIS-RTOS RTX main() .. main RTOS .. CMSIS-RTOS RTX . ::CMSIS:RTOS:Keil RTX ::CMSIS:CORE . ::Device:Startup . CMSIS-RTO. S RTX .. < > .. < > . 38 CMSIS. RTX_< >.lib . RTOS .. RTX . RTX_Conf_.. cmsis_o RTX .. main() .. CMSIS-RTOS. RTX CMSI. S-RTOS RTX . CMSIS-RTOS RTX . #include " " // CMSIS RTOS header file void job1 (void const *argument) { // Function 'job1'. // execute some code osDelay (10); // Delay execution for 10ms }. osThreadDef(job1, osPriorityLow, 1, 0); // Define job1 as thread int main (void) {.}
10 OsKernelInitialize (); // Initialize RTOS kernel // setup and initialize peripherals osThreadCreate (osThread(job1), NULL); // Create the thread osKernelStart (); // Start kernel & job1 thread }. MDK 5 39. CMSIS-RTOS RTX .. CMSIS-RTOS API .. CMSIS-RTOS API .. CMSIS-RTOS . os os_ .. osThread .. #define osObjectsExternal .. #include " " // CMSIS RTOS header extern void thread_1 (void const *argument); // Function prototype osThreadDef (thread_1, osPriorityLow, 1, 100); // Thread definition osPoolDef (MyPool, 10, long); // Pool definition C/C++ .. #define osObjectsExternal . 1 .. 40 CMSIS. C . #define osObjectExternal // Objects defined as external symbols #include " " // Reference to the CMSIS-RTOS objects H.