NUC200 IAR 과 연결하기

 

NUC200 기본 프로젝트를 이용해서 IAR에서 사용을 해보겠다.

중요한 것은 IAR에서 NUC200과 디버깅등을 연결하기 위해 먼저 이전 글에서 소개 한적 있는

NU-LINK Driver 를 설치 해야 한다.

Nu-Link Driver

Nu-Link Driver for Keil RVMDK V1.21.5905.zip
Revision History

This driver is to support Nu-Link recognized by Keil RVMDK Development Environment and support all NuMicro Family Devices selectable.

V1.21.5905

12-27-2012

Nu-Link Driver for IAR EWARM V1.21.5905.zip
Revision History

This driver is to support Nu-Link recognized by IAR EWARM Development Environment and support all NuMicro Family Devices selectable.

V1.21.5905

12-27-2012

 

이후 프로젝트를 읽어오면 아래처럼 된다.

 

여기서 몇가지 옵션을 변경해야 하는데 프로젝트 옵션에 들어가면

디버거에 Third-Party Driver 에 설정값을 내가 인스톨한 디렉토리로 변경하는 것이다.

 

 

그 외에 Linker 에 icf 파일을 살펴 보면 아래와 같이 되어 있는데 HEAP 사이즈가 0으로 되어 있다. 즉 malloc 등의 함수를 사용할 수 없다. 프로그램중에 에러가 나면 용량을 조절해야 한다.

 

/*###ICF### Section handled by ICF editor, don't touch! ****/

/*-Editor annotation file-*/

/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

/*-Specials-*/

define symbol __ICFEDIT_intvec_start__ = 0x00000000;

/*-Memory Regions-*/

define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;

define symbol __ICFEDIT_region_ROM_end__ = 0x00010000;

define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;

define symbol __ICFEDIT_region_RAM_end__ = 0x20000FFF;

/*-Sizes-*/

define symbol __ICFEDIT_size_cstack__ = 0x200;

define symbol __ICFEDIT_size_heap__ = 0x0;

/**** End of ICF editor section. ###ICF###*/

 

 

define memory mem with size = 4G;

define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];

define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];

 

define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };

define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };

 

initialize by copy { readwrite };

do not initialize { section .noinit };

 

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

 

place in ROM_region { readonly };

place in RAM_region { readwrite,

block CSTACK, block HEAP };

 

컴파일 해서 디버깅해보니 잘 된다.

아쉬운 것은 SWO 를 사용하지 못하기 때문에 Error 메시지등을 SWO를 이용해 볼수 없다는 점이다.

그래도 이 정도면 아주 쓸만한 것 같다.

 

'공부 > NUC200' 카테고리의 다른 글

NUC200의 ADC 문제점  (0) 2013.07.15
Nucoton NuMicro ICP Programming Tool 사용  (0) 2013.04.29
NUC200 기본 회로  (0) 2013.04.29
NUC200용 JTAG NULINK  (0) 2013.04.24
NUC200의 특징  (0) 2013.04.23

+ Recent posts