ARM cpu 는 아키텍쳐 버전과 해당 아키텍쳐에 해당하는 모델명으로 구분이 가능합니다. 


예를 들어, armv7-a, armv7-r, armv7-m 은 아키텍커 버전이고 cortex-a5, cortex-a7, cortex-a9, cortex-a11 은 armv7 에 속하는 모델로 볼 수 있습니다. 


각 아키텍쳐와 모델은 각각의 특징을 가지고 있습니다. 각각의 특징은 arm 홈페이지에 가서 확인해 보시면 됩니다. 


각 아키텍쳐는 하위 호환성을 가지고 있기 때문에 별다른 옵션을 주지 않고 컴파일해도 무방합니다. 


아키텍쳐를 정확히 지정하여 컴파일 할 경우 아래와 같이 차이가 나는 것을 확인 할 수 있다. 


 arm-none-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a5 -S test.c

 arm-none-linux-gnueabi-gcc -S test.c

  .arch armv7-a

  .fpu softvfp

  .eabi_attribute 20, 1

  .eabi_attribute 21, 1

  .eabi_attribute 23, 3

  .eabi_attribute 24, 1

  .eabi_attribute 25, 1

  .eabi_attribute 26, 2

  .eabi_attribute 30, 6

  .eabi_attribute 34, 1

  .eabi_attribute 18, 4

  .file "test.c"

  .section  .rodata

  .align  2

.LC0:

  .ascii  "babo\000"

  .text

  .align  2

  .global main

  .type main, %function

main:

  .fnstart

  @ args = 0, pretend = 0, frame = 8

  @ frame_needed = 1, uses_anonymous_args = 0

  stmfd sp!, {fp, lr}

  .save {fp, lr}

  .setfp fp, sp, #4

  add fp, sp, #4

  .pad #8

  sub sp, sp, #8

  str r0, [fp, #-8]

  str r1, [fp, #-12]

  movw  r0, #:lower16:.LC0

  movt  r0, #:upper16:.LC0

  bl  puts

  mov r3, #0

  mov r0, r3

  sub sp, fp, #4

  @ sp needed

  ldmfd sp!, {fp, pc}

  .fnend

  .size main, .-main

  .ident  "GCC: (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease)"

  .section  .note.GNU-stack,"",%progbits




  .arch armv5te

  .fpu softvfp

  .eabi_attribute 20, 1

  .eabi_attribute 21, 1

  .eabi_attribute 23, 3

  .eabi_attribute 24, 1

  .eabi_attribute 25, 1

  .eabi_attribute 26, 2

  .eabi_attribute 30, 6

  .eabi_attribute 34, 0

  .eabi_attribute 18, 4

  .file "test.c"

  .section  .rodata

  .align  2

.LC0:

  .ascii  "babo\000"

  .text

  .align  2

  .global main

  .type main, %function

main:

  .fnstart

  @ args = 0, pretend = 0, frame = 8 

  @ frame_needed = 1, uses_anonymous_args = 0

  stmfd sp!, {fp, lr}

  .save {fp, lr} 

  .setfp fp, sp, #4

  add fp, sp, #4

  .pad #8

  sub sp, sp, #8

  str r0, [fp, #-8]

  str r1, [fp, #-12]

  ldr r0, .L3

  bl  puts

  mov r3, #0

  mov r0, r3

  sub sp, fp, #4

  @ sp needed

  ldmfd sp!, {fp, pc}

.L4:

  .align  2

.L3:

  .word .LC0

  .fnend

  .size main, .-main

  .ident  "GCC: (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease)"

  .section  .note.GNU-stack,"",%progbits


'development' 카테고리의 다른 글

How to use serial console on Intel rangeley platform  (0) 2016.03.18
How to install ubuntu to rangeley  (1) 2016.01.21
[gcc] __attribute__((......)) 키워드  (0) 2016.01.06
openwrt  (0) 2015.02.24
[network] nat 설정법  (0) 2015.01.15
블로그 이미지

김유석0

,