Compiler SPEC Highlights in EW430 Version 4.20 MISRA C:2004 support Multiple inheritance Improved hardware multiplier support Advanced cycle counter f

Similar documents
EWAVR 5.1x 프로젝트 옵션 설정(1_2) 2. Project -> > Option -> > General Option -> > Output / Library Configuration Library Configuration 은 사용하게 될 Library file을

1-1) 1) Derivative Information < CPU 의선택 > 사용하고자하는 8051 MCU 를폴더별로분리되어있습니다. 해당되는 Device 의 *.i51 파일을불러옵니다. 다양한 8051 Core 의메모리를지원하기위하만들어놓은 Memory Mapping

Microsoft PowerPoint - Getting Started with IAR C for ARM _.ppt

MAX+plus II Getting Started - 무작정따라하기

Microsoft Word - Armjtag_문서1.doc

MPLAB C18 C

슬라이드 1

강의10

DE1-SoC Board

ISP and CodeVisionAVR C Compiler.hwp

슬라이드 1

Orcad Capture 9.x

Install stm32cubemx and st-link utility

Remote UI Guide

APOGEE Insight_KR_Base_3P11

초보자를 위한 C++

chapter4

PRO1_09E [읽기 전용]

PRO1_04E [읽기 전용]

CD-RW_Advanced.PDF

<4D F736F F F696E74202D C61645FB3EDB8AEC7D5BCBA20B9D720C5F8BBE7BFEBB9FD2E BC8A3C8AF20B8F0B5E55D>

Mentor_PCB설계입문

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx

C. KHU-EE xmega Board 에서는 Button 을 2 개만사용하기때문에 GPIO_PUSH_BUTTON_2 과 GPIO_PUSH_BUTTON_3 define 을 Comment 처리 한다. D. AT45DBX 도사용하지않기때문에 Comment 처리한다. E.

Chapter 1

PRO1_02E [읽기 전용]


인켈(국문)pdf.pdf

Deok9_Exploit Technique

PCServerMgmt7

Microsoft Word - USB복사기.doc

PowerPoint 프레젠테이션

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

C# Programming Guide - Types

untitled

Voice Portal using Oracle 9i AS Wireless

Microsoft PowerPoint - o8.pptx

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation

목차 1. 제품 소개 특징 개요 Function table 기능 소개 Copy Compare Copy & Compare Erase

Microsoft Word - Automap3

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

(SW3704) Gingerbread Source Build & Working Guide

<BBEABEF7B5BFC7E22DA5B12E687770>

목차 1. 개요 USB 드라이버 설치 (FTDI DRIVER) FTDI DRIVER 실행파일 USB 드라이버 확인방법 DEVICE-PROGRAMMER 설치 DEVICE-PROGRAMMER

untitled

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

No Slide Title

목차 제 1 장 inexio Touch Driver소개 소개 및 주요 기능 제품사양... 4 제 2 장 설치 및 실행 설치 시 주의사항 설치 권고 사양 프로그램 설치 하드웨

IDA 5.x Manual hwp

SRC PLUS 제어기 MANUAL

K7VT2_QIG_v3

1217 WebTrafMon II

Dialog Box 실행파일을 Web에 포함시키는 방법

IAR_IDE_LM3S8962_Config_v3.doc

28 THE ASIAN JOURNAL OF TEX [2] ko.tex [5]

LXR 설치 및 사용법.doc

歯CRM개괄_허순영.PDF

,,,,,, (41) ( e f f e c t ), ( c u r r e n t ) ( p o t e n t i a l difference),, ( r e s i s t a n c e ) 2,,,,,,,, (41), (42) (42) ( 41) (Ohm s law),

LCD Display

MCM, PCB (mentor) : da& librarian jakup & package jakup & layout jakup & fablink jakup & Summary 2 / 66

FMX M JPG 15MB 320x240 30fps, 160Kbps 11MB View operation,, seek seek Random Access Average Read Sequential Read 12 FMX () 2

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

슬라이드 1

소개 TeraStation 을 구입해 주셔서 감사합니다! 이 사용 설명서는 TeraStation 구성 정보를 제공합니다. 제품은 계속 업데이트되므로, 이 설명서의 이미지 및 텍스트는 사용자가 보유 중인 TeraStation 에 표시 된 이미지 및 텍스트와 약간 다를 수

Mango220 Android How to compile and Transfer image to Target

The_IDA_Pro_Book

K_R9000PRO_101.pdf

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다.

김기남_ATDC2016_160620_[키노트].key

00 SPH-V6900_....

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

DocsPin_Korean.pages

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

T100MD+

Solaris Express Developer Edition

금오공대 컴퓨터공학전공 강의자료

6주차.key

4S 1차년도 평가 발표자료

슬라이드 1

10X56_NWG_KOR.indd

API 매뉴얼

기존에 Windchill Program 이 설치된 Home Directory 를 선택해준다. 프로그램설치후설치내역을확인해보면 Adobe Acrobat 6.0 Support 내역을확인할수 있다.

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

Interstage5 SOAP서비스 설정 가이드

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Microsoft PowerPoint APUE(Intro).ppt

서현수

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

Microsoft Word - Installation and User Manual_CMD V2.2_.doc


<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

PowerPoint 프레젠테이션

IoT FND8 7-SEGMENT api

s SINUMERIK 840C Service and User Manual DATA SAVING & LOADING & & /

untitled

CANTUS Evaluation Board Ap. Note

PRO1_16E [읽기 전용]

Transcription:

IAR Compiler IAR Embedded Workbench 소개 EW Compiler Series 는전세계적으로임베디드시스템개발자들이가장많이사용하는 C/C++ Compiler 및 Debugging Tool 입니다. 8/ 16/ 32 bit Microprocessor 와 DSP 등 30 가지이상의 Compiler 시리즈를지원하며, 세계적인기업인 컴파일러개발전문회사 IAR 사 ( www.iar.com ) 제품으로써, 안정된 Tool 과최적의개발자환경은, 이미미국 / 유럽 / 아시아각지의 Microcontroller Vender (ATMEL, Hitachi, TI, SAMSUNG 등 ) 들을통해서인정을받고있습니다. 국내기업 SAMSUNG 에서의뢰되어만들어진 SAM8 compiler (SAM8 : Samsung 8 bit Microprocessor ) 또한, IAR 사 의 EW Series 중에하나이며, 현재까지도계속적인 Upgrade 와지원으로삼성을포함한국내외많은사용자들에의해서 꾸준히사용되고있습니다. ( 제품명, EWSAM8 Compiler ) EW430 컴파일러는 TI 의 MSP430 전시리즈를지원하고있으며, USB 방식의 H/W Debugger Tool (FET430-USB) 와 빠른 Debugging 환경을제공하고있습니다. 뿐만아니라, 각종 Evaluation boards 를위한별도의 Example Project Source 와 IAR Compiler 를활용하여기본적인주변 Peripheral 간단하게제어할수있는예제소스를제공하여, 사용자편의를도모한다. - IAR Compiler Series 와지원 Vander EWARM, EWAVR, (New) EWAVR32,, EWMSP430, EWSAM8, EW8051, EWx96, EWH8/300H & H8S, EWCRCP3000/CR16C & SC14, EWZ80, EWeZ80, EWPIC12/16/17, EWPIC18, (New) EWdsPIC, EW68HC11, EWM16C/10-60, EWM32C & M16C/80, EW68HC12 & HCS12, (NEW) EWHCS12, EW78K0/78K0S/78K0R, EWV850, EWMK5, EWR8C/Tiny, EW65C02, EWMAXQ 등. ( 2009. 2 월현재 ) Analog Devices, ARM architecture, Atmel, Cirrus Logic, Cypress, Freescale Semiconductor, Infineon, Luminary Maxim/Dallas, Microchip, NEC, OKI Semiconductor, NXP Semiconductors, Renesas Technology, Samsung, Sharp, Silicon Laboratories, STMicroelectronics, Texas Instruments, Toshiba, WDC, ZiLOG 등.. ( 2009. 2 월현재 )

Compiler SPEC Highlights in EW430 Version 4.20 MISRA C:2004 support Multiple inheritance Improved hardware multiplier support Advanced cycle counter for MSP430F5xx Evaluation version of IAR PowerPac for MSP430 Symbols window Start the debugger without download Updated user guide Highlights in EW430 Version 4.20 CC430F5133, CC430F5135, CC430F5137, CC430F6125, CC430F6126, CC430F6127, CC430F6135, CC430F6137, MSP430x1xx MSP430x2xx MSP430x3xx MSP430x4xx MSP430x5xx Highlights in EW430 Version 4.21 New devices support Information Center Debugging multiple images New extended keyword ramfunc Auto refresh in the debugger memory window New cspybat features New C-SPY macro delay(milliseconds) New icons in Project Manager window Code templates Devices with extended memory: CC430F6125, CC430F6126, CC430F6135, CC430F6137, CC430F5133, CC430F5135, CC430F5137, MSP430F2416, MSP430F2417, MSP430F2418, MSP430F2419, MSP430F2616, MSP430F2617, MSP430F2618

Compiler Download EW430 Demo : 1. Evaluation Version ( Time limited for 30 Days ) 2. KickStart Version ( Code limited for 4/8KByte ) * 데모버전을사용하기위해서는반드시등록과정을거쳐야하며, 등록과동시에등록된고객의 e-mail 주소를통하여 발급된 License Key 와 License Number 가있어야지만, Install 이가능하므로반드시기재해야만합니다. ( 다운로드시간 : 약 2~3 분 ) EWARM package 종류 1. EW430-Full : EWARM C Compiler/Assembler + C-SPY + SUA 2. EW430-LE : EWARM C Compiler/Assembler + SUA 3. EW430-BL : EWARM C Compiler/Assembler ( 16KB Code Limited ) 4. EW430 DEMO : EWARM C Compiler/Assembler ( 4 / 8 (extended device) KB or 30Days) + C-SPY * LE : Limited Edition * SUA : Support and Upgrade Agreement - EW430 Download - 마이크로비젼 : http://www.microvision.co.kr - Products > Compiler > IAR Embedded Workbench > Embedded Workbech 제품종류 > 430 Demo (30days) Download IAR : http://www.iar.com - Products > Compilers and debuggers > 430 > Download > 30 days Evaluation edition OR 4/8KB KickStart edition

Ver 4.20 Patch (2~7)

EW 환경소개 < IAR Embedded Workbench IDE > Book Mark Build All Debug Menu Tool Bar Project1 Sources Output Project2 Project3. Workspace windows Source Windows Messages Windows Message Windows

C-SPY 환경소개 < IAR Embedded Workbench IDE CSPY > Book Mark Build All Build and Debug Menu Tool Bar Debugging Icon < Windows > Break points Disassembly Memory Register Watch Locals Auto Live Watch Quick Watch Call Stack Terminal I/O Code Coverage Profiling Workspace windows Debugging Windows

IAR Information Center Getting Started 프로젝트생성부터, 소스링크, 컴파일, 링킹, 디버깅등 IAR 툴사용법에소개합니다. User Guides 컴파일러관련매뉴얼과각종관련자료를소개합니다. Example Projects 프로세서별 Example 을제공합니다. Tutorials 간단한테스트용예제소스를제공합니다. Support 기술지원요청시활용할수있습니다. Release Notes 최신버전에관한 Release 자료를확인해볼수있습니다.

새프로젝트만들기 < IAR Embedded Workbench 새프로젝트만들기 > Create New Project 창이뜨면, Empty Project 를선택한후에, OK 를누르면 New project 가생성되어 Workspace 에추가 됩니다. ( Project name.ewp 생성 ) Note) 생성되는파일들. *.EWW *.EWP *.EWD *.ESDT Setting Folder 등

새소스파일등록하기 (1) < IAR Embedded Workbench 새소스파일프로젝트에링크시키기 > File -> > New -> > File 를선택하면새로운텍스트문서창이열리며 Untitled1, Untitled2 등으로기본파일이생성됩니다. 생성된텍스트문서를어떤파일로사용할지결정한후에 File -> Save As 를눌러원하는 source-name.c 를입력하고저장합니다. 이렇게생성된파일은 Project 에추가 ( Add ) 가되야, 비로서컴파일하기위한기본틀이완성이되는것이다.

새소스파일등록하기 (2) Project -> > Add Files 을누르면아래의창이뜨며, 원하는소스를선택하여열기버튼을누르면, 현재커서가위치해있는프로젝트에소스가등록이된다. (Active Project 가기준이아님을명심하자.) Output, Document.... 등임의의 Group 으로관리하고싶은파일이따로있다면, 그룹을만든뒤 [ Project Add Group ], 커서를그룹에위치시키고같은방식으로파일을추가시키면된다. Project Windows 에원하는소스파일과기본 Group 들이자동등록된것을확인할수있다. ( 우측그림 ) 마지막으로, File Save Workspace 를실행해야지만, 지금까지의모든작업이 *.EWW 파일로저장이된다.

프로젝트옵션설정 (1_1) 1. Project -> > Option -> > General option -> Target Target 은사용하는 CPU 에맞게컴파일러시스템을맞추는가장기본적이고도중요한작업이다. Processor variant : 시리즈별로구분되어있는 Device 의선택합니다.. Hardware Multiplier : Hardware Multiplier 가지원되는 Device 의경우,, [ Allow direct access ] 와 [ Use only library calls ] 로구분하여선택지원하고있습니다.. Position Independent code : * VFP :: Vector Floating pointing MSP430 에서만지원된는옵션으로써,, 고정적으로위치되는 Application 메모리의번지를임의적으로지정할수있도록한다.. This is is useful, for example, when developing modules that should be loaded dynamically at at runtime. The drawback of position-independent code is is that the size of the code will be somewhat larger, and that interrupt vectors cannot be specified directly. Also note that global data is is not positionindependent. Note: Position-independent code is is not supported for the MSP430X architecture. Assembler-only project : asm 프로젝트전용으로사용시

프로젝트옵션설정 (1_2) 2. Project -> > Option -> > General Option -> Output / Library Configuration Output 은컴파일후에실행될혹은참조하게될파일들이생성되는 Output files 이저장되는폴더를명시한다. Output files : Executable type 과 Library type 중선택 Output Directories : [ Executable / Libraries ] *.hex, *.dbgg, *.bin, *.r43 등과같은실행파일, 혹은라이브러리와같은최종파일이생성되다. [ Object ] 각각의소스별 Object 파일이생성된다. [ List files ] 각각의소스별 List 파일, Map 파일을생성한다.

프로젝트옵션설정 (1_2) 2_1. Project -> > Option -> > General Option -> Library Configuration Library Configuration 은사용하게될 Library 를결정한다. 이미, 기본적으로참조하게될 Library file 은 Target 외에도아래의여러설정에의해서임의적으로지정된다. - Library (Normal or Full ) - Hardware Multiplier - Position-Independent Code - Optimize Setting - Data Model - Floating Point None : Do not link with a runtime library. Normal DLIB : Use the normal configuration of the C/EC++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod. Full DLIB : Use the full configuration of the C/EC++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod. Custom DLIB : Use a customized C/EC++ runtime library. CLIB : Use the legacy C runtime library. Custom CLIB : Use a customized legacy C runtime library.

프로젝트옵션설정 (1_3) 3. Project -> > Option -> > General Option -> > Library Options Library Options 은 printf /scanf formatter 의 Level 을설정할수있다. Printf formatter ( 4 단계 ) : Full (default) / Large/ Small/ Tiny Level Scanf formatter ( 3 단계 ) : Full (default) / Large/ Small Level * : Library Configuration 설정에따라 ON/OFF ( Normal - No/ Full Yes )

EW430 4.2x 프로젝트옵션설정 (1_4) 4. Project -> > Option -> > General Option -> > Stack/Heap Stack / Heap size 조절기본적으로 Stack size 는 50h ( 0x32), Data16/20 용 Heap Size 가각각 0h/80h 가설정이된다. Override default 를 check 함으로써, 임의적으로값변경이가능하다. * Data20 의경우,, 지원프로세서에한해서사용할수있다.. Read from linker command file : GUI 환경내에설정이아닌 Liker command file 로직접변경하고자할경우, 사용한다.

프로젝트옵션설정 (1_4) 4. Project -> > Option -> > General option -> > MISRA C MISRA C 는자동차산업용으로개발된추가 Option 팁유틸이다. What is MISRA C? The Motor Industry Software Reliability Association (MISRA) is an organization in the UK that promotes safety in automotive software. In 1998, MISRA published its Guidelines for the Use of the C Language in Vehicle Based Software. The guidelines address the ambiguities of the C language and establish coding rules for the automotive industry. MISRA C includes 127 rules. 93 of these are required and the remaining 34 are advisory. All rules apply to the source code and not to the object code generated by the compiler. How does it work? The IAR MISRA C Checker is completely integrated with the IAR C Compiler. From IAR Embedded Workbench, you can control which MISRA C rules are checked; the settings will be used for both the compiler and the linker. Who should use MISRA C? Compliance with the MISRA C guidelines is a requirement in many automotive companies but could be beneficial in any development organization. The guidelines enforce sound coding practices and address the ambiguities of C; they help developers write code in a consistent manner and avoid confusing constructions.

MiSRA-C 4_1. Project -> > Option -> > General Option / C/C++ Compiler -> > MISRA-C C 2004 Enable MISRA-C : MISRA-C 적용 Log MISRA-C C-Setting : MISRA-C 설정상태를 Build 시 Log Message 로출력해준다.. MISRA-C 2004 & 1998 : MISRA-C Rule 을연도별로구분하여적용한다.. None, Required, All : MISRA-C 는 default Rule 적용을받지만,, 경우에따라서는임의적으로조절이가능하도록구성되었다.. General Option & C/C++ Compiler MISRA-C 구분일반적으로는 Compile 과 Link 시에는 General Option 의 MISRA-C 를기준하도록되어있지만,, 경우에따라서는 Compile 과 Link 시의 MISRA-C Rule 을달리적용할수가있다.. Required & Advisory :.. MISRA-C 는필수사항과권고사항으로 Rule 로구분되어있는데,, 대부분의 Rule 이필수사항으로반드시검증을거치도록 Default enable 되어있고,, 권고사항은 Disable 되어있다..

MiSRA-C 4_2. 주의사항및 MISRA-C C Source 예제 MISRA C 2004 rule 1.1 compiler is configured to allow extensions - all code shall conform to ISO 9899 standard C, with no extensions permitted C/C++ Compiler Language Conformance Relaxed ISO/ANSI & Strict ISO/ANSI 중선택해야만한다. Rule 2.2 (required) Source code shall only use /*... */ style comments. The compiler will generate an error, indicating a violation of this rule, if C++ style comments (//) are used in your source code. Rule 8.1 (required) Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call. (x) void func(); /* Not a prototype */ (o) void func(void); (o) void func(void) { }

프로젝트옵션설정 (2_1) 5. Project -> > Option -> > C/C++ Compiler -> > Language C/C++ 컴파일러에관련된기본적인옵션을설정한다. Language : [C] 사용하게될 Language 의종류에대해서결정한다.. IAR 은 C 뿐만아니라,, Embedded C++ 을동시에지원이가능하다.. Require prototypes : [Disable] 아래의프로토타입에대해서 Error 메시지를발생시킴으로써, 소스를추가검증할수있다. 1) 선언되어있지않은함수호출시 2)Kernighan & Ritchie C 표준 Rule 적용 3) 프로토타입선언없이사용된 Public 함수선언시 4) 프로토타입이선언되어있지않은상태에서,, 함수포인터를이용한간접함수호출시 * EW430_User Guide Require prototypes 참조 Language conformance : [ Allow IAR extensions ] Enable Multi-byte Support : [ Disable ] Multibyte charter 의사용유무를결정할수있다. Enable IAR migration preprocessor extensions: [ Disable ] 확장된키워드와관련하여, 소스변환을하지않고이전버전과의호환성을갖기위한옵션이다. 현재설정된 language 의상태를가장기본적인 Strict ISO/ANSI Type 으로할지,, 혹은 Core 와컴파일러에의해서확장된 language 로할지설정한다.. * Compiler Reference Guide IAR language extension 참조 Plain char is : [Unsigned] (Unsigned) Char 변수타입을변경할수있다..

6. Project -> > Option -> > C/C++ Compiler -> > Code 사용자를위한몇가지 Tip 을소개한다. R4/R5 Utilization [ Normal use ] : R4/R5 를본래의기본레지스터로활용하게된다.. [ regvar variables ] : regvar 키워드를활용하여글로벌레지스터변수와같이사용할수있게된다.. [ Not used ] : 레지스터로의목적이아닌 ( Locked ), ), 사용자임의의용도로활용할수가있다.. * EW430 compiler Guide compiler option 참조 417/540 page Reduce Stack usage : Optimization 기능의종류로써,, 스택의사용공간을최소화할수있도록돕는다.. 20-bit context save on interrupt : 모든레지스터의활용을 20-bits 로사용하도록변경한다.. 기본적으로 Small data Model 로설정될경우,, 모든레지스터가 16bit 로설정되어사용되어지고,, save_reg20 등과같은특정레지스터를사용하여 20bit 까지사용이가능하다.. 단,, Stack 의여유공간이필요하며,, 시스템이느려질수있다는단점이있을수있다..

프로젝트옵션설정 (2_2) 6. Project -> > Option -> > C/C++ Compiler -> > Optimization C/C++ 컴파일러에관련된기본적인옵션을설정한다. Multi-file Compilation : [ Disable ] Linking 시에 Optimize 를한번더실행을함으로써,, 컴파일시에만수행된 Optimize 기능을획기적으로보강하였다.. - Common sub-expression : 중복되는함수,, 계산식삭제하여실행시간및코드사이즈단축 - Function inline : 간단한함수를 inline 화하여,, 시행시간을단축시켜준다.. - Code Motion : 고정적인반복루프를삭제하여실행시간및사이즈단축 Discard Unused Publics : [ Disable ] Multi-file Compilation 을활용한 Optimization 작업시 Public Function 들과변수들은범위에서제외시킬수있다.. Optimization : [ Size ] ARM IAR C/C++ 컴파일러에서는기본적으로 2 가지의 Optimization model ( Size / Speed / Balanced ) 에따라서,, 각각의 4 가지 Optimization Level 을선택할수있다.. Optimization Level : -None [ Best debug support ] - Low - Medium - High [ Maximum optimization ] Enabled transformation : - Common Sub-expression elimination - Loop unrolling - Function in-lining - Code motion - Type-based alias analysis - Static variable clustering - Instruction scheduling * EW430 compiler Guide Efficient coding for 참조 IAR Optimization TIP. 1)#pragrma 를활용한함수직접지정 Optimize 2) 프로젝트단위가아닌소스별직접지정 Optimize * EW430 Compiler reference Guide

프로젝트옵션설정 (2_3) 7. Project -> > Option -> > C/C++ Compiler -> > Output / List Debugging 시에는 Compile 된소스의정보를필요로합니다.. [ Generate debug information ] Debug Mode 시,, Default 로 Enable 되어있는그기능을수행합니다.. Code section name 을사용함으로써,, 사용자 Application Source 와다른소스혹은 Library 와의영역을분리하여 확인할수있게도와준다.. Note :: The included debug information increases the size of the object files. * EW430 User Guide compiler option 494/629 참조 Output list file 은컴파일된소스에관련된컴파일정보를볼수있는 list 파일 (*.lst) 을만들어주는기능입니다.. 각각의 list file 생성과동시에 Assembler mnemonics 와 diagnostics 가포함이된파일생성등부가적인기능을수행합니다.. Output assembler file 은유저의 C 소스를 ASM source (*.s79) 를만들어주는기능입니다.. Source include 와 Compiler call frame information 포함이가능해진다.. (Demo 제한 ) * EW430 User guide compiler list 참조

프로젝트옵션설정 (2_4) 8. Project -> > Option -> > C/C++ Compiler -> > Preprocessor Preprocessor 는컴파일러의고유기능중하나인전처리기능이다. Ignore standard include directories : [ Disable ] 기본설치디렉토리인 C:\ arm\inc 폴더를 ( $TOOLKIT_DIR&\INC\ ) 를 Header file 기본참조로폴더로설정한다. Additional include directories : (one per line) 설정된기본디렉토리이외의 include 디렉토리에대해서추가입력할수있다. Ex) $PROJ_DIR$\srciar\ $PROJ_DIR$\..\..\ Defined symbols : (one per line) Source 내에서사용이될 Define symbol 을입력해넣는다.. Preprocessor output to file 을통하여파일로저장 / 출력도가능하다.. Ex) TESTVER = 1 Pre-include : include 파일을전처리기처럼컴파일러옵션상에서지정할수있다. Ex) test_source.h test_asm.s79 * EW430 User Guide compiler option 497/629 참조

프로젝트옵션설정 (2_5) 9. Project -> > Option -> > C/C++ Compiler -> > Diagnostics/ Extra Options Diagnostics 는컴파일과정에서발생되는 Remark/ Warning/ Error Message 에대한처리를돕는다. 경우에따라서는, 발생되는 Error 를무시할수도있다. * EW430 User guide diagnostics 참조 * EW430 Compiler guide diagnostics 참조 Extra Options 는 GUI 환경에서구현할수없는컴파일러의여러가지다른 Option 들에대해서사용자에의해서임의적으로설정할수있도록마련해둔 Option 설정창이다.. Ex ) aeabi EABI 기능을들자면,, GUI 환경내에서는설정이불가능하기때문에 Command Line options 에 라고설정해야만한다.. * GUI :: Graphic User Interface

프로젝트옵션설정 (3,4) 11. Project -> > Option -> > Customer Build Customer Build 기능은최근에추가된 Option 으로써, IAR 사에서제공되는 S/W 이외의다른 S/W Tool 에대해서, Tool chain 을사용해컴파일환경을제공하는기능이다. Ex) Lex, YACC * EW430 User guide Extending the tool chain 참조 * EW430 Compiler guide diagnostics 참조 12. Project -> > Option -> > Build Actions Build Actions 는필요에의해서 build 전후에 pre-build / post-build 하기위해서설정하는 옵션이다. * EW430 User guide building 참조

프로젝트옵션설정 (3,4) Project -> > Option -> > C/C++ Compiler -> > Diagnostics/ Extra Options Output 은실행파일의 Format 형태와 Output file 타입을설정할수있다.. Output files : [ Disable ] 임의로설정된 Format 에따라서실행파일의형태가선택되며,, 기본적으로실행파일명은최초프로젝트명을따르도록되어있다.. Ex) project.d43 ( For Debugging format ), ), project.a43 (For Intel-Standard/Extended) project.txt ( For MSP430-txt ) Format : Debug information for C-SPY : [ Disable ] 디버깅정보를 C-SPY 용 Format 으로변경 Output : [Disable] C-SPY 용 Format 외에다른 Format 이필요할경우사용한다.. Output format : - MSP430-txt :: TI MSP430 전용 text Format Image - intel-standard :: HEX format 의 file 이필요할경우 ( 64KB 이하 ) - intel-extended :: HEX format 의 file 이필요할경우 ( 64KB 이상 ) Module-local local : Symbol 호출시제한할수있는 Option. With runtime control modules : [ Enable ] Program abort, exit, assertions etc. With I/O emulation modules : [ Enable ] Terminal I/O handling 설정 ( stdin stdout ) Buffered terminal output : [ Disable ] Terminal 이용시 Buffer 역할을해준다.. Allow C-SPY-specific extra output file:[enable] Extra Output page enable Option

프로젝트옵션설정 (3,4) Project -> > Option -> > Linker -> > Extra Options /.// List Extra Output 은 Output 에서설정된 Format 의실행파일이외에다른실행파일을얻고자할경우사용한다. 즉, 한번컴파일후에 2 가지의파일을얻을수있다. [ Generate additional output ] 을 Enable 활성화시킨후에, Output format 을설정해준다. 앞서설명되어있는 Ouput 과동일한 Format 을지원하게된다. [ Override Default ] 를체크함으로써, 출력파일명과확장명을임의적으로조정이가능하다. List 는 MAP 파일 (*.map) 수있도록만들어주는설정이다.. C/C++ Compiler 에 List 파일생성옵션과는틀리다.. Linking 이끝난상태에서만생성되며,, Symbol Option 설정에따라서 global / local symbol 포함여부를결정할수있다.. Module summary : module 별메모리사용량표시 Include suppressed entries : 일반 List 파일에서생략된 segment 에관련된모든정보를확인해볼수있다.. Static overlay map : Static overlay system 정보추가

프로젝트옵션설정 (5_4) Project -> > Option -> > Linker -> > Processing Processing 은컴파일후사용하지않는 Code Memory 영역의처리를위해사용된다. Fill unused code Memory : [ Disable ] Fill pattern : 사용하지않는공간에채워넣을패턴을넣는다. Ex) 0xFF Generate checksum : [ Disable ] Size : [ 1/2/4 bytes ] Arithmetic sum 정해진사이즈에따라연속적으로더한결과값저장 ( 자지올림없음 ) CRC16 ( 0x11021 ) CRC 다항식을사용한확인 CRC32 ( 0x4C11DB7 ) CRC 다항식을사용한확인 Crc polynomial : CRC 다항식 ( 직접입력 ) 을사용한확인 Complement : 1 과 2 의보수선택사용 Bit Order : 상위 (MSB)/ 하위 (LSB) 비트의순서설정.

프로젝트옵션설정 (5_3) Project -> > Option -> > Linker -> Config Config 는 icf 파일과 Startup code 의 entry point 등의설정을도와준다. Linker command file : Core 에의해서임의적으로설정되는 Linker Configuration file [ *.xcl ] 기본적으로,, Interrupt Vector 영역설정과 ROM/Flash 와 RAM/Data 의어드레스번지설정,, Stack / Heap 사이즈설정등의 내용을포함하고있다.. Edit.. Linker Conguration file editor : 수정이필요하다면,, 직접 icf 파일을열어보는불필요함이없이 UI 환경을이용해서편리하게수정할수있다.. UI 환경과 Linker Command file 내에는정의되어있지않은임의의 Symbol 을정의할때사용할수가있다.. // Code -Z(CODE)CSTART,ISR_CODE=FC00-FFDF -P(CODE)CODE=FC00-FFDF // Interrupt vectors -Z(CODE)INTVEC=FFE0-FFFF -Z(CODE)RESET=FFFE-FFFF -Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP +_DATA16_HEAP_SIZE=0200-027F

프로젝트옵션설정 (6_1) Project -> Option -> Debugger -> Setup Debugger Setup 은디버깅하기위한 H/W tool을설정하기위한옵션이다. Driver : [ Simulator ] 시뮬레이터이외에 FET Debugger 가유일하게제공되며,, 목록상에나열된 Driver 들은기본적으로각각의 *.dll 파일을갖는다.. 사용하게될드라이버로설정하도록한다.. Run to : [ Enable ] 임으로시작지점을설정할수있도록한다.. Ex) Main 혹은 PC = 0xXXXX Setup macros : C-SPY 를초기화하기위한작업으로,, Debugger 선택으로기본적인 Macro file 은제공된다.. Device description file : Target 으로설정된 Device 나 core 의 DDF 파일을지정해준다..

프로젝트옵션설정 (6_2) Project -> > Option -> > Debugger -> Plugins Plugins 는 Debugger 를보다효율적으로활용할수있도록여러가지기능들을제공한다. [ LCD Display ] 7/14 Segment 가상 LCD Display 선택가능하다.. [ Profiling ] Function-Level 프로그램분석툴.. 함수를최소단위로하여동작되는시간대별로분류한다.. 프로그램의효율성및 Optimze 시,, 효율적인소스부분을찾아줄수도있다.. [ Code Coverage ] Profiling 기능과같은프로그램분석툴이지만,, 사용빈도수만표시한다.. * 시뮬레이션에서만지원.. [ Stack ] 할당되어있는 Stack 의값을 MAX 로 STACk 의현재값및최고값을보여주는유용한기능이다.. [ Symbols ] IAR Optimization TIP. 이기능들은기능들은편리한기능이기는하지만, 경우에따라서 Breakpoint 를소비한다던가, Stack 등리소스소비, 디버깅속도저하등의문제가발생될수있다. 항시사용하는것이아니라, 일시적분석및혹은필요시만활용하는것을바람직하다. [ RTOS ] 아래와같은 middleos 와의연동이가능하다.. Segger embos / PowerPAC RTOS / uc/osii / Code Coverage / ORTI RTOS

프로젝트옵션설정 (6_2) Project -> > Option -> > Debugger -> > FET Debugger H/W debugger Connection [ Verify download ] Use this option to verify that the downloaded code image can be read back from target memory with the correct contents. [ Allow erase/write access to locked flash memory ] Enables erase/write access to Info Segment A. This option can only be used with an MSP430F2xx device. [ Allow erase/write access to BSL flash memory ] Enables erase/write access to BSL flash memory. This option can only be used with an MSP430F5xx device. [ Flash Erase ] Main 과 Information memory 를구분하여 Erase 하며, 신구데이터를구분하여 Erase 혹은 Download 한다.

Debug windows Code Coverage / Profiling 빨간색다이아몬드 0% 는한번도실행된적없음.. 녹색다이아몬드 100% 는현재함수내 Code 전부가실행된적됐음.. 빨간색과녹색다이아몬드 xx% 만큼현함수내 code 가부분실행되었음.. 노란색다이아몬드는각함수에서한번도실행되지않은소스를의미하는데,, < column start >-<column > end>:<row> 의형태로현재소스의위치까지표시해준다.. [ Function ] 각각의함수명을의미한다.. Outside main 은현재리스트상에존재하지않는함수즉,, Start-up / exit code 혹은라이브러리등을의미하게된다.. [ Calls ] 각각의함수가호출된총횟수를의미한다.. [ Flat Time ] 함수가실행된총시간 (Cycle) 표기와전체시간중실행시간을표기하되,, 함수의호출에따른누적은피한다.. * 각각의함수사용빈도수 (( Cycle / %) %) 를추정할수있다.. 소스효율성극대화.. [ Accumulated Time ] 함수가실행된총시간 (Cycle) 표기와전체시간중실행시간을표기하며,, 함수의호출에따른누적도포함한다.. * 각각의함수호출빈도수 (( Cycle / %) %) 를추정할수있다.. 소스효율성극대화

EW430 4.xx 기타 IAR C 구입문의 - 마이크로비젼 TEL : 02-3283-0101 FAX : 02-3283-0160 Web : http:// 기타질문사항은저희홈페이지 Q/A 를통하여질문주시거나, E-mail 부탁드립니다. tech@mvtool.co.kr