3/6/2017 Richard Kuo Assistant Professor

Slides:



Advertisements
Similar presentations
Cortex-M3 Implementation Overview. Chapter 6 in the reference book.
Advertisements

UNIT 04 Nuvoton MCU 로봇 SW 교육원 조용수.
LOGSYS Development Environment of Embedded Systems Tamás Raikovich Béla Fehér Péter Laczkó Budapest University of Technology and Economics Department of.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
IDE for ARM 7 board Tutorial 3 IDE of Keil4 V3.a 1.
Getting Started with a Cortex-M3 Board
Asst. Prof. Dr. Alper ŞİŞMAN
111 Target Hardware Debug ULINK2 and ULINK-ME Including Real-Time Agent.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
Keil Products in a Single Slide
Development Tools for ARM-Powered Devices
Cortex-M3 Debugging System
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Silicon Labs ToolStick Development Platform
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Holtek 32-bit MCU Promotion
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
W25 Software Update process
High Speed Data Converter University
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 3/7/2013 Richard.
NuMicro MCU Learning Board Introduction
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Debugging an Application Lab. Build/Debug Process A start Load Closest Sample “debug” into MULTI editor Cut and Paste Changes into Sample Build Modified.
ECS642U Embedded Systems Digital I/O William Marsh.
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 1/29/2015 Richard.
S&IP Consortium Course Material Standard I/O and Core Peripherals Speaker: Tian-Sheuan Chang July, 2004.
SOC Consortium Course Material Core Peripherals National Taiwan University Adopted from National Chiao-Tung University IP Core Design.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
ChibiOS/RT Demo A free embedded RTOS
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Embedded Systems Design with Qsys and Altera Monitor Program
HCS12 Technical Training Module 15 – Break Module Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
10- Lock Bits, Fuse Bits and Boot Loader. Boot Loader Support – Read-While-Write Self- Programming: The Boot Loader Support provides a real Read-While-Write.
2D-Graphic Accelerator
ENERGY METER TO INDICATE BILLING IN RUPEES FOR LOAD WISE OR DAY WISE
Introduction to the ARM mbed Platform– A Hands-on Course
Outline Introduction to NuMaker TRIO Programming environment setup
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
Fundamentals of Computer Engineering
Tutorial 2 IDE of Keil for the ARM 7 board(2)
PROPELLER DISPLAY OF MESSAGE BY VIRTUAL LEDS
Microcontrollers & GPIO
PRE-PROGRAMMED DIGITAL SCROLLING MESSAGE
Computer System Laboratory
Implementation of Embedded OS
Microcontroller Applications
PC Mouse operated Electrical Load Control Using VB Application
NuMicro MCU New Project Express Creation
PRU-ICSS Programming with CCS
CENG2400 Tutorial 1 Keil IDE CENG2400 tutorial 1 v.7a.
Introduction to Microprocessors and Microcontrollers
Future Designs, Inc. Your Development Partner
ریز پردازنده. ریز پردازنده مراجع درس میکروکنترلرهای AVR برنامه نویسی اسمبلی و C محمدعلی مزیدی، سپهر نعیمی و سرمد نعیمی مرجع کامل میکروکنترلرهای AVR.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Software Setup & Validation
Wireless Embedded Systems
JTAG, Multi-ICE and Angel
Introduction to arduino
Presentation transcript:

3/6/2017 Richard Kuo Assistant Professor NuMicro SDK & Keil MDK 3/6/2017 Richard Kuo Assistant Professor

Outline SDK Installation Open Keil Project Keil MDK Configuration SWD Interface Keil Debug Session ICP & ISP mode Programming

3rd Party Development Tools

SDK Installation Tools (Keil MDK, Nu-Link USB Driver, NuMicro BSP) IDE : ARM Keil MDK https://www.keil.com/demo/eval/arm.htm MDK522.exe (run to install) ICE : NuLink Driver Nu-Link_Keil_Driver_V1.30.6535.zip (unzip & run to install) BSP : MCU device driver & sample code NUC100_120_Series_BSP_CMSIS_Rev3.00.002 (original BSP) https://sourceforge.net/projects/numicroedu/files/Academic/Nu-LB-NUC140/SampleCode/ 2017/11/20

BSP – Basic Software Package libraries used by sample code sample code for reference 2017/11/20

SampleCode folder For NUC140 Learning Board NUC100_120_Series_BSP_CMSIS_Rev3.00.002 is the original basic software package 2017/11/20

Library folder For ARM CPU (Cortex-M0, M4, …) For MCU series (NCU100series.h) For NUC140 onboard device (7-seg, 3x3 keypad, …) For sensors (MPU6050, …) & peripherals (LCD) For MCU standard interface (I2C, SPI, UART, ADC, PWM, GPIO, …) 2017/11/20

sample code directory C:\Nuvoton\SW_Nu_LB_NUC140_v1.1\SampleCode\Nu-LB-NUC140 2017/11/20

Pick one sample code double click to enter the directory 2017/11/20

Sample Code Folder Double click to enter Keil directory 2017/11/20

Sample Code Folder Double click to start Keil project 2017/11/20

Keil IDE (Integrated Development Environment) Save File Debug Session Window View setting Build Download Tool Configuration Source Code View Rebuild File Hierarchy View 2017/11/20

Code Size Assuming Keil MDK compilation result is Program Size: Code=3696 RO-data=2256 RW-data=60 ZI-data=1348   Code : program code (程式碼) RO-data : Read-Only Data (唯讀資料) RW-data : Read/Write Data (讀寫資料) ZI-data : Zero Initialized Data (初始為0的資料) Then Total ROM size = Code + RO-data + RW-data = 3696 + 2256 + 60 = 6012 Bytes Total RAM size = RW-data + ZI-data = 60 + 1348 = 1408 Bytes * Nano102的 ROM size = 32K Bytes, RAM size = 16K Bytes * Evaluation License limit code size at 32KB

Keil Configuration Select Configure Flash Tools…

Click to add extra library path Keil Configuration Click to add extra library path Library path setting 2017/11/20

Debug Session main.c printf display message Select UART#1 to open message view main.c printf display message 2017/11/20

Flash > Configure Flash Tools

Flash > Configure Flash Tools>Device

Flash > Configure Flash Tools>Device Just to confirm device is correct Don’t change anything here ! ROM=128KB SRAM=16KB ROM base address SRAM base address

Flash > Configure Flash Tools>Device Just to confirm device is correct ROM=128KB SRAM=16KB ROM base address SRAM base address No change needed here !

Flash > Configure Flash Tools>Output No change needed here !

Flash > Configure Flash Tools>Listing No change needed here !

Flash > Configure Flash Tools>User No change needed here !

Flash > Configure Flash Tools>C/C++ SEMIHOST debug mode for using printf No change needed here !

Flash > Configure Flash Tools>Asm SEMIHOST debug mode for using printf No change needed here !

Flash > Configure Flash Tools>Linker No change needed here !

Flash > Configure Flash Tools>Debug must use Nu-Link Debugger If you see no Nu-Link Debugger here, then you need to reinstall Nu-Link ICE driver

Flash > Configure Flash Tools>Debug must select correct device series NUC100 is for NUC140, … Nano100 is for Nano102, 112

Flash > Configure Flash Tools>Utilities

Flash > Configure Flash Tools>Utilities

Flash > Configure Flash Tools>Utilities

ARM CoreSight Technology ARM Cortex-M processor-based devices use the ARM CoreSight technology which introduces powerful new debug and trace capabilities Debug Features: Run Control of the processor allowing you to start and stop programs Single Step one source or assembler line Set breakpoints while the processor is running Read/write memory contents and peripheral registers on-the-fly Program internal and external FLASH memory Trace Features: Serial Wire Viewer (SWV) provides program counter (PC) sampling, data trace, event trace, and instrumentation trace information Instruction (ETM) Trace streamed directly to your PC enabling debugging of historical sequences, software profiling, and code coverage analysis

CoreSight Block Diagram

SWD (Serial Wire Debug) The SWD interface pins can be overlaid with JTAG signals, allowing the standard target connectors to be used: TCLK - SWCLK (Serial Wire Clock) TMS - SWDIO (Serial Wire Data Input/Output) TDO - SWO (Serial Wire Output - required for SWV) JTAG and SWD modes are fully supported by ULINK2, ULINK-ME, and ULINKpro. Nu-Link ICE signals : VCC ICE_DAT ICE_CLK RST GND

Programming Mode : ISP vs ICP Item ISP ICP PC AP Software NuMicro ISP Programmer NuMicro ICP Programming Tools.exe Extra Hardware No NuLink CPU Run Code CPU runs on the LDROM What Region Can Be Updated APROM DataFlash Config LDROM Interface USB or UART SWD Support Off-Line Programming Yes

System Memory Map System Peripheral SRAM 16KB 4KB Code 32KB Application Program Memory (APROM) 0x0000_0000 0x0000_7FFF Reserved ISP Loader Program Memory (LDROM) 0x0010_0000 0x0010_0FFF APB peripherals 0x4000_0000 0x401F_FFFF AHB peripherals 0x5000_0000 0x501F_FFFF Cortex M0 System Register 0xE000_E000 0xE000_EFFF RAM 0x2000_0000 0x2000_3FFF Code SRAM Peripheral System 16KB 4KB 32KB

ICP (In Circuit Programming) NuMicro ICP AP USB SWD NuMicro MCU Vcc, Data, Clk, Rst, Gnd

ISP (In System Programming) NuMicro ISPAP USB-to-UART USB Cable UART I/F USB I/F Address M0-CPU Update Code ROMCODE LDROM APROM Nuvoton ISP LDROM firmware code Boot From LDROM USB interface only supports NUC120/NUC140 series

Setup ISP mode Step 1. use ICP tool to upload MCU’s LDROM code for ISP mode (ICP tool use Nu-Link to upload LDROM) Step 2. run Keil MDK to build a project for MCU binary file Step 3. connect USB-to-UART comm port to Nu-LB-NUC140 UART TX/RX pins (used by LDROM code) Step 4. run ISP tool to download binary into MCU 2017/11/20

1. use ICP tool to upload LDROM code for ISP mode Connect / Disconnect load code 2017/11/20

NuMicro ISP (In System Programming)