ARM Applications


 
* Update history

- 2012.11.20 : Ãʱâ Release



 
3. S3C2440 °³¹ßº¸µå ¼Ò°³
   3.1 S3C2440 CPU
   3.2 S3C2440 Features
   3.3 S3C2440 HW IPs
   3.4 Memory Controller
   3.5 NAND Boot
4. °³¹ßȯ°æ ¼³Á¤
   4.1 IAR Workbench °³¹ßȯ°æ ¼³Á¤
   4.2 JTAG À» ÀÌ¿ëÇÑ ÇÁ·Î±×·¥ ´Ù¿î·Îµå


 
3Àå¿¡¼­´Â ¿ì¸®°¡ ½ÇÁ¦·Î ½Ç½À¿¡ »ç¿ëÇÒ S3C2440 ARM9 °³¹ßº¸µå¿¡ ´ëÇؼ­ ¼Ò°³ Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù. ARM Simulator ¿¡¼­´Â º°´Ù¸¥ ¼³Á¤ ¾øÀ̵µ ¾î¼Àºí¸®¾î ½Ç½ÀÀ» ÇÒ ¼ö ÀÖ¾úÀ¸³ª ½ÇÁ¦ Ÿ°ÙÀ» »ç¿ëÇÒ °æ¿ì¿¡´Â °³¹ßº¸µåÀÇ ¸Þ¸ð¸® ÄÁÆ®·Ñ·¯, ºÎÆðúÁ¤ µîÀ» Á¦´ë·Î ÀÌÇØÇÏ°í ÀÖ¾î¾ß ÄÚµå ÀÛ¼ºÀÌ °¡´É ÇÕ´Ï´Ù. ½ÇÁ¦ °³¹ßº¸µå¿¡¼­ ½Ç½ÀÀ» ÇϱâÀü¿¡ S3C2440 ¿¡ ´ëÇؼ­ ÀÌ·ÐÀûÀ¸·Î °øºÎÇØ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.

3. S3C2440 °³¹ßº¸µå ¼Ò°³

3.1 S3C2440 CPU

S3C2440 CPU´Â ÃÖ´ë 532MHz Clock À¸·Î µ¿ÀÛÇÏ°í ¸ð¹ÙÀÏ ÇÚµåÇÛµå ÂÊ¿¡ ¾Èµå·ÎÀ̵å OSµîÀÌ ³ª¿À±â Àü±îÁö¸¸ Çصµ S3C2440 ¿¡¼­ Linux(QT), Window CE 5.0, 6.0 µîÀ» ¿î¿µ Çß¾ú½À´Ï´Ù. ƯÈ÷³ª ±¹³»¿¡¼­´Â Windows CE OS¸¦ ÀÌ¿ëÇÑ Â÷·®¿ë ³×ÀÌ°ÔÀÌ¼Ç Á¦Ç°¿¡ ¸¹ÀÌ ÀÀ¿ëµÇ¾ú½À´Ï´Ù. ÇÏÁö¸¸ ÃÖ±Ù¿¡´Â 1Ghz ÀÌ»óÀÇ ¸ð¹ÙÀÏ CPU°¡ µîÀåÇÑ ÀÌÈÄ¿¡ ¸ÖƼÄÚ¾î CPUµéÀÌ ÁÖ¸¦ ÀÌ·ç°í ÀÖ½À´Ï´Ù. ¿äÁò Ãâ½ÃµÇ´Â ÃֽŠCPU»ç¾çº¸´Ù´Â ¼º´É¸é¿¡¼­ ¸¹ÀÌ ¶³¾î ÁöÁö¸¸ ARM ±âÃʸ¦ ´ÙÁö±â¿¡´Â Àû´çÇÑ°Í °°½À´Ï´Ù.

¼ÒÇÁÆ®¿þ¾î ±¸¼º

(1) Instruction Bus, (2) Data Bus °¡ º°µµ·Î Á¸ÀçÇϴ°ÍÀ¸·Î º¸¾Æ¼­ ÇÏ¹Ùµå ¾ÆÅ°ÅØÃÄ ÀÔ´Ï´Ù.
(3) MMU, (4) Cache °¡ ÀÖ½À´Ï´Ù.
(5) CP(Co-Processor)15 ¿¡ ÀÇÇؼ­ MMU, Cache ÇÁ·Î±×·¥ À¸·Î ÄÁÆ®·Ñ °¡´É ÇÕ´Ï´Ù.

3.2 S3C2440 Features

(1) Integrated system for hand-held device and general embedded applications
(2) Integrates ARM920T core
(3) MMU ÀåÄ¡°¡ ÀÖ¾î WinCE, Linux ¿Í °°Àº embedded OS ¸¦ ¿î¿µÇÒ ¼ö ÀÖ½À´Ï´Ù.
(4) Booting Mode
     - Nor Booting Mode (General Feature)
     - Supports NAND Flash Booting
(5) Maximum Operating Frequency of 532MHz @ 1.35V
(6) 8 memory banks of which 128M Bytes
     - 6 memory banks for ROM, SRAM
     - 2 memory banks for ROM, SDRAM, SRAM
(7) Power Mode
     - Normal, Slow, Idle, Sleep

3.3 S3C2440 HW IPs

(1) Interrupts : 60 interrupt sources
(2) LCD Controller
     - TFT (16-bit, 24-bit), VGA, QVGA
     - STN
(3) Timer with PWM - Buzzer, LED µîÀÇ ¹à±â Á¶Á¤µî¿¡ ÀÀ¿ë
(4) RTC - Calendar, ½Ã°èµî ±¸Çö
(5) General Purpose Input/Output Ports
(6) 4 channels of DMA Controller
(7) 3 channel UART
(8) A/D Converter & Touch Screen Interface
(9) Watchdog Timer
(10) IIC Bus - Camera interface, ÃÖ±Ù¿¡´Â ÀÚÀÌ·Î, °¡¼Óµµ ¼¾¼­µîÀÇ interface·Î ¸¹ÀÌ »ç¿ë
(11) IIS, AC97 - ÁÖ·Î Audio data Àü¼Ûµî¿¡ È°¿ë
(12) USB Host/Device
(13) SD Host Interface
(14) SPI Interface
(15) Camera Interface

¼ÒÇÁÆ®¿þ¾î ±¸¼º

3.4 Memory Controller

(1) S3C2440 Memory Controller
Operation Mode(OM[1:0]) ¿¡ µû¶ó¼­ Nand Boot or Nor Boot¸¦ ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù. nGCS0(0x0000 0000) ¿¡ ºÎÆ®¸Þ¸ð¸®(Nor) ¸¦ À§Ä¡ ½ÃÅ°°í nGCS6(0x3000 0000) ¿¡ SDRAMÀ» ¿¬°áÇÏ¿© RW ¿µ¿ªÀ¸·Î »ç¿ëÀ» ÇÕ´Ï´Ù.


¼ÒÇÁÆ®¿þ¾î ±¸¼º

(2) S3C2440 Mini °³¹ßº¸µå(¿ì¸®°¡ ½Ç½À¿ëÀ¸·Î »ç¿ëÇÏ´Â °³¹ßº¸µå) Memory Map
¿ì¸®°¡ ÀÚ¼¼È÷ ºÁ¾ßÇÒ °÷Àº 0x0000 0000¿¡ 1MB Å©±âÀÇ Nor Flash ¿µ¿ª ÀÔ´Ï´Ù. CPU¿¡ Àü¿øÀÌ Àΰ¡ µÇ¸é ÃÖÃÊ·Î ½ÇÇàµÇ´Â 0x0000 0000(Reset Handler) °¡ ÀÖ´Â RO ¿µ¿ªÀ¸·Î ½ÇÁ¦ ¾î¼Àºí¸® Äڵ尡 ½ÇÇàµÇ´Â ¿µ¿ª ÀÔ´Ï´Ù. ºÎÆÃÀ» À§Çؼ­ ¹Ýµå½Ã ÇÊ¿ä ÇÕ´Ï´Ù. ±×¸®°í 0x3000 0000 ¿¡¼­ ½ÃÀ۵Ǵ 64MBÅ©±âÀÇ SDRAMÀÌ ÀÖ½À´Ï´Ù. ¼Ò½ºÄڵ峻¿¡¼­ ¼±¾ðÇÑ RW Àü¿ªº¯¼öµîÀÌ ¹Ù·Î ÀÌ ¿µ¿ª¿¡ À§Ä¡ÇÏ°Ô µË´Ï´Ù.

¼ÒÇÁÆ®¿þ¾î ±¸¼º

(3) S3C2440 Operating Frequency
¾Æ·¡´Â S3C2440ÀÇ Operating Frequency ÀÔ´Ï´Ù. S3C2440Àº 533MHz·Î µ¿ÀÛÇϱâ À§Çؼ­ ¿ÜºÎ Crystal ÀÔ·ÂÀ» ¹Þ¾Æ¼­ ³»ºÎ PLL¿¡¼­ ºÐÁÖ¸¦ ÇÏ¿© »ç¿ëÀ» ÇÏ°Ô µË´Ï´Ù. ¾Æ·¡ Ç¥´Â S3C2440¿¡¼­ ÁÖ·Î »ç¿ëÇÏ´Â Operation Frequency ÀÔ´Ï´Ù.

¼ÒÇÁÆ®¿þ¾î ±¸¼º

À§ÀÇ 1 ~ 4 Áß¿¡¼­ ¾î¶»°Ô µ¿ÀÛ ÁÖÆļö¸¦ ¼³Á¤ÇÏ´Â °ÍÀÌ °¡Àå ºü¸¦±î¿ä ? ARM Core°¡ µ¿ÀÛÇÏ´Â ¼Óµµ´Â 1¹ø 400MHz°¡ °¡Àå ºü¸£Áö¸¸ ½ÇÁ¦·Î Memoryµî¿¡ Á¢±ÙÇÏ´Â AHB ¹ö½º¿¡ °ø±ÞµÇ´Â ClockÀº 2¹øÀÌ 133MHz ·Î °¡Àå ºü¸¨´Ï´Ù. ½ÇÁ¦·Î Mini2440 °³¹ßº¸µå¿¡¼­ »ç¿ëÇÏ´Â »ï¼ºÀÇ SDRAMÀº 133MHz ·Î µ¿ÀÛ ÇÕ´Ï´Ù. ±×·¯¹Ç·Î 2¹øó·³ PLL ¼³Á¤À» Çϴ°ÍÀÌ °¡Àå ºü¸£°Ô µ¿ÀÛÇÕ´Ï´Ù.

- Âü°í
FCLK : ARM Core °¡ »ç¿ëÇÏ´Â Clock
HCLK : AHB ¹ö½º°¡ »ç¿ëÇÏ´Â Clock ( ÁÖ·Î LCD, USB, Memory µîÀÇ °í¼Ó ÀåÄ¡µé¿¡ ¿¬°á )
PCLK : APB ¹ö½º°¡ »ç¿ëÇÏ´Â Clock ( UART, I2C, I2S, RTC µîÀÇ Àú¼Ó ÁÖº¯ÀåÄ¡ µé¿¡ ¿¬°á )

3.5 NAND Boot

¼ÒÇÁÆ®¿þ¾î ±¸¼º

NAND Boot ¿É¼ÇÀ» ¼±ÅÃÇÑ °æ¿ì¿¡´Â 0x0000 0000 ¹øÁö°¡ S3C2440 Internal Boot SRAM À¸·Î Remap µË´Ï´Ù.

¼ÒÇÁÆ®¿þ¾î ±¸¼º

(1) ºÎÆÃÀ» Çϸé Nand FlashÀÇ #0 ¹ø ºí·°ÀÇ 4KB ¿µ¿ªÀ» S3C2440ÀÇ ³»ºÎ SRAM(Steppingstone) ¿µ¿ªÀ¸·Î ÀÐ¾î ¿É´Ï´Ù. ÀÌ ºÎºÐÀº °³¹ßÀÚ°¡ ó¸®ÇÏ´Â ºÎºÐÀº ¾Æ´Ï°í S3C2440 ÀÇ OM(Operation Mode) ¿¡ µû¶ó¼­ CPU ³»ºÎ¿¡¼­ 󸮰¡ µË´Ï´Ù.
(2), (3) Internal SRAM ¿µ¿ª¿¡¼­ ½ÇÇàµÈ 1Â÷ ºÎÆ®·Î´õ°¡ ¿ÜºÎ SDRAM°ú Nand Flash ÄÁÆ®·Ñ·¯¸¦ ÃʱâÈ­ÇÏ°í Nand Flash¿¡ ÀÖ´Â User ApplicaitonÀ» SDRAM¿¡ ·ÎµùÇÏ°í PC(Program Count) ¸¦ SDRAMÀ¸·Î À̵¿ÇÏ¿© ½ÇÇàÀ» °è¼ÓÇÏ°Ô µË´Ï´Ù.

4. °³¹ßȯ°æ ¼³Á¤
4.1 IAR Workbench °³¹ßȯ°æ ¼³Á¤

ARM Simulator ±â¹ÝÀÇ ½Ç½À ÇÁ·ÎÁ§Æ®¿Í À¯»çÇÏÁö¸¸ µð¹ö°Å ¼³Á¤ ºÎºÐ°ú Pre-include directory ¼³Á¤µîÀÌ Ãß°¡ µË´Ï´Ù.

(1) Create New Project



(2) Empty project »ý¼º



(3) ÇÁ·ÎÁ§Æ® ÆÄÀÏÀ̸§ ÀÔ·Â - "mini2440_test"





(4) ±×·ì»ý¼º - "base", "testcode" ±×·ì »ý¼º





(5) ¼Ò½º ÆÄÀÏÃß°¡



- "base" ±×·ì : base Æú´õ¾ÈÀÇ *.s, *.c ÆÄÀϵé Ãß°¡
- "testcode" ±×·ì : testcode Æú´õ¾ÈÀÇ *.c ÆÄÀϵé Ãß°¡



(6) ÇÁ·ÎÁ§Æ® ¿É¼Ç ¼³Á¤



(6.1) Target Device ¼³Á¤ : Samsung S3C2440A ·Î ¼³Á¤ ÇÕ´Ï´Ù.





(7) Processor Mode ¼³Á¤ : "ARM" ¸ðµå·Î ¼³Á¤ ÇÕ´Ï´Ù.



(8) C/C++ Compiler Pre-include µð·ºÅ丮 ¼³Á¤



(9) Assembler Pre-include µð·ºÅ丮 ¼³Á¤



(10) Scattor Loading(Link Script) ÆÄÀÏ ¼³Á¤ : ÇÁ·ÎÁ§Æ® µð·ºÅ丮¿¡ "mini2440_lnk.icf" ÆÄÀÏÀ» ¼±Åà ÇÕ´Ï´Ù.



(11) Program Start Entry ¼³Á¤ : "__program_start" ¶ó°í ÀÔ·Â ÇÕ´Ï´Ù.



(12) µð¹ö±ë Á¤º¸¸¦ Æ÷ÇÔÇϵµ·Ï ¼³Á¤ ÇÕ´Ï´Ù.



(13) Map ÆÄÀÏÀ» »ý¼º Çϵµ·Ï ÇÕ´Ï´Ù.



(14) Debugger Á¤º¸ ¼³Á¤ : Dirver - Simulator, Run to main Àº ¹Ýµå½Ã ¼³Á¤ ÇØÁ¦ ÇÕ´Ï´Ù.



4.2 JTAG À» ÀÌ¿ëÇÑ ÇÁ·Î±×·¥ ´Ù¿î·Îµå
4.2.1 ARM-JTAGÀ» ÀÌ¿ëÇÑ ÇÁ·Î±×·¥ ´Ù¿î·Îµå

(1) ARM-JTAG Standard ¹öÁ¯ ÀÌ»óÀ» »ç¿ë ÇØ¾ß ÇÕ´Ï´Ù.
(2) IAR °³¹ßȯ°æ¿¡¼­ Debugger¸¦ ¼³Á¤ ÇÕ´Ï´Ù.



RDI Driver¸¦ JICE.dll ·Î ¼³Á¤ ÇÕ´Ï´Ù.



(3) Windows7 »ç¿ëÀÚÀÏ °æ¿ì IAR IDE ÇÁ·Î±×·¥°ú, JICE ServerÀÇ ½ÇÇà ȯ°æÀ» °ü¸®ÀÚ ±ÇÇÑÀ¸·Î ¼³Á¤ ÇÕ´Ï´Ù.





(4) JICE Server ¸¦ ½ÇÇàÇÑ ÈÄ Target Detect ¸¦ ÇÕ´Ï´Ù.



(5) IAR Workbench ¿¡¼­ "Download and Debugging" À» ½ÇÇà ÇÕ´Ï´Ù.



À§¿Í °°Àº È­¸éÀÌ ³ª¿ÔÀ¸¸é Á¤»óÀûÀ¸·Î ½ÇÇàÀÌ ¿Ï·áµÈ »óÅ ÀÔ´Ï´Ù. Âü°í·Î "mini2440_lnk.icf" ÆÄÀÏÀº S3C2440ÀÇ RAM(0x30000000)¿µ¿ª¿¡¼­ ½ÇÇàÀÌ µÇµµ·Ï µÇ¾î ÀÖ½À´Ï´Ù. NOR Ç÷¡½Ã¿¡ ´Ù¿î·ÎµåÇؼ­ ½ÇÇàÀ» ÇÒ¼öµµ ÀÖÁö¸¸ NORÇ÷¡½Ãµµ 10¸¸¹ø ÀÌ»ó EraseÇÏ°Ô µÇ¸é ¼ö¸íÀÌ ´ÙÇϱ⠶§¹®¿¡ Å×½ºÆ®¿ëÀ¸·Î´Â ÁÖ·Î RAM¿¡¼­ ½ÇÇàµÇµµ·Ï ÇÕ´Ï´Ù.

(6) NOR Ç÷¡½Ã¿¡ ÇÁ·Î±×·¥À» ´Ù¿î·Îµå ÇÏ´Â ¹æ¹ý

- "mini2440_lnk.icf" ÆÄÀÏ¿¡¼­ "define symbol EXECUTE_IN_SDRAM=1;" ºÎºÐÀ» "define symbol EXECUTE_IN_SDRAM=0;" À¸·Î ¼öÁ¤ ÇÕ´Ï´Ù.
- IAR ÇÁ·ÎÁ§Æ®¸¦ Rebuild ÇÕ´Ï´Ù.
- jcs ½ºÅ©¸³Æ® ÆÄÀÏ¿¡¼­ "mini2440_test.bin" ÆÄÀÏÀÇ À̸§°ú °æ·Î¸¦ ¼öÁ¤ÇÕ´Ï´Ù.
- JICE Commander¸¦ ½ÇÇà --> Script Run --> "S3C2440_NOR(SST39VF1601)_PROGRAM_WITH_FLASHAGENT.jcs" ¸¦ ½ÇÇà ÇÕ´Ï´Ù.