Extensible Linking Format(ELF)
Extensible Linking Format(ELF) 확장가능한 링크 포맷
EABI(embedded ABI) : 실행파일 포멧
※ABI 와 EABI는 서로 호환되지 않습니다
arm-linux- : 리눅스용
arm-none- : 운영체제 없을때
arm-none-eabi
Bare-metal : "none"와 같은 의미인듯.
g++ : cpp파일
gcc : c파일
gcc나 g++이나 모두 C나 C++ 빌드 가능
ARMv7-A : Cortex-A8~15
ARMv7-R : Cortex-R4
ARMv7-M : Cortex-M3
툴체인 빌드 방법
http://kunen.org/uC/gnu_tool.html
디버그모드
armcc -c --diag_style=ide --arm_linux_paths
--debug --cpu=Cortex-A8 -O0 --arm_linux_config_file="../arm_linux_config.xml
-meabi는 어셈블러 옵션이라 -Wa와 함께
arm-none-linux-gnueabi-gcc -Wa,-meabi=5 ...
arm-non-linux-genueabi-gcc-03 ?march=armv7-a ?mtune=cortex-a8 ?mfpu=neon ftree-vectorize ?mfloat-abi=softfp
arm-non-linux-genueabi-gcc-03 ?march=armv7-a ?mtune=cortex-a8 ?mfpu=vfp ftree-vectorize ?mfloat-abi=softfp
ARM Workbench IDE에서 컴파일한 결과
===================================
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -oexceptions.o ..\exceptions.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -osvc.o ..\svc.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -otimer.o ..\timer.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -omain.o ..\main.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -DSTANDALONE -oretarget.o ..\retarget.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -oscs.o ..\scs.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -ouart.o ..\uart.c
armcc -c --diag_style=ide --depend_format=unix_escaped --no_depend_system_headers --debug --cpu=Cortex-M3 -opseudo_intrinsics.o ..\pseudo_intrinsics.c
armlink --diag_style=ide --scatter=../scatter.scat --info=unused --inline -oexample3.axf uart.o timer.o svc.o scs.o retarget.o pseudo_intrinsics.o main.o exceptions.o
==============================================================================
Removing Unused input sections from the image.
Removing retarget.o(.data), (4 bytes).
Removing pseudo_intrinsics.o(.emb_text), (24 bytes).
2 unused section(s) (total 28 bytes) removed from the image.
fromelf --bin --output=default example3.axf
Build complete for project Cortex-M3_Example3
Time consumed: 3923 ms.
리눅스에서 실행이미지 생성 과정
===============================
1) 소스파일 컴파일(*.c, *.cpp => *.o)
2) armlink( *.o => *.elf)
3) fromelf( *.elf => *.bin )
arm executable format(axf)
elf의 변종. .debug정보는 DWARF2.0규격을 따름.