-
Cross compileembedded system 2015. 1. 30. 11:47
나가주거야지 할줄아는게 없음..
reference : http://layright.blogspot.kr/2012/05/open-source-arm-sw-3.html
위성쪽에 계시는 분 블로그같은데 감사합니다 ㅠ_ㅠ..
가장 많이 상용되는 tool chain
ARM : ARM Development Studio 5 (DS-5), 상용
IAR : Embedded Workbench for ARM, 상용
KEIL : MDK-ARM Microcontroller Development Kit, 상용
Mentor Graphics : Sourcery CodeBench, 상용 (Lite Edition의 경우 free)
GNU ARM Cross Compiler : Open Source
설치가 상당히 간편한 Mentor Graphics를 사용.
Toolchain 규칙
그냥 관례상?
[컴파일 결과로 수행되는 프로세스명]-[운영체제명]-[기타]-[컴파일러 구분]
컴파일 결과로 수행되는 프로세스명 : arm, mips, x86...
운영체제명 : linux, none(bare metal)
ABI : eabi, gnueabi, gnueabihf.. (defalut값은 abi이다. abi와 eabi는 호환X)
컴파일러 구분 : gcc, elf..
reference : http://forum.falinux.com/zbxe/index.php?document_srl=575666&mid=lecture_tip
http://stackoverflow.com/questions/13797693/what-is-the-difference-between-arm-linux-gcc-and-arm-none-linux-gnueabi
bare metal Cross Compiler
arm-none-eabi-
OS를 필요로 하지않을때 사용하는 컴파일러이다.
start-up code와 Linker script등을 함께 생성해야한다.
안그러면 아래와 같은 에러메시지가 뜬다.
error message
...
lseekr.c:(.text+0x20): undefined reference to `_lseek'
/home/hong/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x20): undefined reference to `_read'
collect2: error: ld returned 1 exit status
ARM GNU/linux 컴파일러
arm-none-linux-gnueabi-
arm-linux-gnueabi-
linux용 실행파일을 생성한다.
linux에서 돌리는 프로그램을 만들기때문에 메모리 관리를 운영체제에서 해준다. Linker Script등이 필요 없다.
'embedded system' 카테고리의 다른 글
nvidia JETSON TK1 (0) 2015.02.06 network protocol supported by u-boot (0) 2015.02.02 u-boot 분석 (1) 2015.01.19 u-boot 컴파일,부팅 (1) 2015.01.16 ADB, Fastboot (0) 2015.01.15