Presentation is loading. Please wait.

Presentation is loading. Please wait.

준비물 Linux (including CrossGCC for ARM) SMDK2400 and Trace32 USB ICD

Similar presentations


Presentation on theme: "준비물 Linux (including CrossGCC for ARM) SMDK2400 and Trace32 USB ICD"— Presentation transcript:

1 준비물 Linux (including CrossGCC for ARM) SMDK2400 and Trace32 USB ICD 공부할 내용 ARM Architecture ARM Instruction with Examples ARM Boot code with Monitor program 보충 자료 nnARM core with FPGA board

2 ARM Architecture

3 간단한 C 프로그래밍 ARM1 Architecture Steve Furber Roger Wilson Robert Heaton
Father of ARM

4 The History of ARM

5 ARM7TDMI Pipeline ARM7 ARM9 Fetch Decode Execute Fetch Decode Execute
Data/Buffer Write Back

6

7

8

9

10 ARM Instruction with Examples

11 간단한 Assembly 프로그래밍 Dan Dobberpuhl Father of Alpha, StrongARM

12 How To Cross Compile

13 ftp://ftp.netwinder.org/users/c/chagas/arm-linux-cross/RPMS/
CrossGCC for ARM RPM Binaries ftp://ftp.netwinder.org/users/c/chagas/arm-linux-cross/RPMS/ arm-linux-binutils i386.rpm arm-linux-glibc i386.rpm arm-linux-gcc i386.rpm RPM Install #rpm -i arm-linux-binutils i386.rpm #rpm -i arm-linux-glibc i386.rpm #rpm -i arm-linux-gcc i386.rpm

14 CrossGCC for ARM ARM GCC environment % which arm-linux-gcc
/usr/local/arm/bin/arm-linux-gcc % ls -l total 28 drwxr-xr-x 6 root root May 30 12:12 arm-linux/ drwxr-xr-x 2 root root May 30 12:17 bin/ drwxr-xr-x 3 root root May 30 11:37 glibc/ drwxr-xr-x 3 root root May 30 11:31 include/ drwxr-xr-x 2 root root May 30 12:17 info/ drwxr-xr-x 3 root root May 30 12:17 lib/ drwxr-xr-x 3 root root May 30 11:22 man/ %

15 CrossGCC for ARM /* * File : scopy.s * Author : Benjamin Jung
* Date : May 8, 2000 * */ .data @ section declaration .text @ section declaration @ we must export the entry point to the ELF linker or .global _start @ loader. They conventionally recognize _start as their @ entry point. Use ld -e foo to override the default. _start: ldrb r2, [r1],#1 @ load byte and update address strb r2, [r0],#1 @ store byte and update address; cmp r2, # @ check for zero terminator bne _start @ keep going if not mov pc,lr @ Return

16 How to Compile Compiling with the ARM Assembler
% arm-linux-as -o scopy.o scopy.S ELF file by the ARM Linker % arm-linux-ld -o scopy scopy.o Binary file by the ARM Binary Utilities % arm-linux-objcopy input-format=elf32-arm output-format=binary scopy scopy.bin

17

18

19 Branch Instruction

20 Data Processing Instruction

21 ARM Shift Operations

22 ARM Boot code with Monitor program

23 간단한 Inline 프로그래밍 John Hennessy Father of MIPS

24 GDB로 디버깅하기 David Patterson Father of SPARC

25

26

27

28

29 monitor.lds /* * (C) Copyright 2002 * Benjamin Jung *
* */ OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS { . = 0x ; . = ALIGN(4); .text : boot.o (.text) *(.text) } .rodata : { *(.rodata) } . = 0x043f0000; .data : { *(.data) } .got : { *(.got) } .bss : { *(.bss) } monitor.lds

30 /* * * File : boot.S * Author : Benjamin Jung * Date : May 8, 2000 */ .text /* extern function to blink the LED */ .extern blink_led /* Jump vector table as in table 3.1 in [1] */ .globl _start _start: b reset b undefined_instruction b software_interrupt b abort_prefetch b abort_data b not_used b irq b fiq reset: /* Switch the SA-1110 to 206 MHz */ /* First, mask **ALL** interrupts */ /*way that the LED is on an output port */ /* load the GPIO base in r2 */ never_ending: /* Bit 10,11 is the LED, according to JDB */ /* infinite loop for led brinking */ nop b never_ending undefined_instruction: b undefined_instruction software_interrupt: b software_interrupt abort_prefetch: b abort_prefetch abort_data: b abort_data not_used: b not_used irq: b irq fiq: b fiq

31 How to Compile Compiling with the ARM Assembler
% arm-linux-as -x assembler-with-cpp -o boot.o boot.S ELF file by the ARM Linker % arm-linux-ld -T monitor.lds -o boot.elf boot.o Binary file by the ARM Binary Utilities % arm-linux-objcopy input-format=elf32-arm output-format=binary boot.elf boot.bin

32

33

34 Appendix : nnARM core with FPGA board

35 Father of OpenCores.org
nnARM By ShengYu Shen Verilog HDL ARMv4 FPGA Board Xilinx Vertex100 PCB Design with Protel EDA Damjan Lampert Father of OpenCores.org

36 nnARM 4 stage Pipeline IF : IF.v ID : Decode_ARM.v ALU : ALUShell.v MEM : mem.v

37

38


Download ppt "준비물 Linux (including CrossGCC for ARM) SMDK2400 and Trace32 USB ICD"

Similar presentations


Ads by Google