맥이든 윈도우든 리눅스든 arm 기반의 디바이스용 코드를 빌드하기 위해서는 arm toolchain 이 필요하다.
맥에서는 간단히 brew uninstall gcc-arm-none-eabi
이렇게 설치를 했는데 정작 어느 경로로 설치가 되었는지 알 수 가 없다
보통 cmake나 make 는 /usr/local/bin에 있는데
gcc-arm-none-eabi 파일은 찾을수가 없었다.
그래서 몇번 삽질을 하고 검색한 끝에 답을 찾을 수 있었다.
brew cask install gcc-arm-embedded
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3748, done.
remote: Compressing objects: 100% (3732/3732), done.
remote: Total 3748 (delta 34), reused 386 (delta 12), pack-reused 0
Receiving objects: 100% (3748/3748), 1.26 MiB | 25.00 KiB/s, done.
Resolving deltas: 100% (34/34), done.
Tapped 0 formulae (3,757 files, 4.0MB)
==> Creating Caskroom at /usr/local/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
==> Downloading https://developer.arm.com/-/media/Files/downloads/gnu-rm/6_1-201
######################################################################## 100.0%
==> Verifying checksum for Cask gcc-arm-embedded
==> Linking Binary 'arm-none-eabi-addr2line' to '/usr/local/bin/arm-none-eabi-ad
==> Linking Binary 'arm-none-eabi-ar' to '/usr/local/bin/arm-none-eabi-ar'.
==> Linking Binary 'arm-none-eabi-as' to '/usr/local/bin/arm-none-eabi-as'.
==> Linking Binary 'arm-none-eabi-c++' to '/usr/local/bin/arm-none-eabi-c++'.
==> Linking Binary 'arm-none-eabi-c++filt' to '/usr/local/bin/arm-none-eabi-c++f
==> Linking Binary 'arm-none-eabi-cpp' to '/usr/local/bin/arm-none-eabi-cpp'.
==> Linking Binary 'arm-none-eabi-elfedit' to '/usr/local/bin/arm-none-eabi-elfe
==> Linking Binary 'arm-none-eabi-g++' to '/usr/local/bin/arm-none-eabi-g++'.
==> Linking Binary 'arm-none-eabi-gcc' to '/usr/local/bin/arm-none-eabi-gcc'.
==> Linking Binary 'arm-none-eabi-gcc-ar' to '/usr/local/bin/arm-none-eabi-gcc-a
==> Linking Binary 'arm-none-eabi-gcc-nm' to '/usr/local/bin/arm-none-eabi-gcc-n
==> Linking Binary 'arm-none-eabi-gcc-ranlib' to '/usr/local/bin/arm-none-eabi-g
==> Linking Binary 'arm-none-eabi-gcov' to '/usr/local/bin/arm-none-eabi-gcov'.
==> Linking Binary 'arm-none-eabi-gcov-tool' to '/usr/local/bin/arm-none-eabi-gc
==> Linking Binary 'arm-none-eabi-gdb' to '/usr/local/bin/arm-none-eabi-gdb'.
==> Linking Binary 'arm-none-eabi-gdb-py' to '/usr/local/bin/arm-none-eabi-gdb-p
==> Linking Binary 'arm-none-eabi-gprof' to '/usr/local/bin/arm-none-eabi-gprof'
==> Linking Binary 'arm-none-eabi-ld' to '/usr/local/bin/arm-none-eabi-ld'.
==> Linking Binary 'arm-none-eabi-ld.bfd' to '/usr/local/bin/arm-none-eabi-ld.bf
==> Linking Binary 'arm-none-eabi-nm' to '/usr/local/bin/arm-none-eabi-nm'.
==> Linking Binary 'arm-none-eabi-objcopy' to '/usr/local/bin/arm-none-eabi-objc
==> Linking Binary 'arm-none-eabi-objdump' to '/usr/local/bin/arm-none-eabi-objd
==> Linking Binary 'arm-none-eabi-ranlib' to '/usr/local/bin/arm-none-eabi-ranli
==> Linking Binary 'arm-none-eabi-readelf' to '/usr/local/bin/arm-none-eabi-read
==> Linking Binary 'arm-none-eabi-size' to '/usr/local/bin/arm-none-eabi-size'.
==> Linking Binary 'arm-none-eabi-strings' to '/usr/local/bin/arm-none-eabi-stri
==> Linking Binary 'arm-none-eabi-strip' to '/usr/local/bin/arm-none-eabi-strip'
이렇게 하면 arm-none-eabi 파일들이 /usr/local/bin 에 설치가 된다.
이제 IDE에서 툴체인 경로를 설정하면 정상적으로 빌드가 된다.
참조: https://gist.github.com/joegoggins/7763637
'Computer > mac' 카테고리의 다른 글
mac 에서 git 언어 변경되는 문제 (1) | 2018.11.30 |
---|---|
OSX 에서 아이튠즈 IOS백업 위치 변경 (0) | 2018.05.31 |