@@ -38,23 +38,14 @@ install_clang_format() {
3838
3939install_cross_compiler () {
4040 file_name=aarch64-tbots-linux-gnu-for-aarch64
41- if is_darwin $1 ; then
42- full_file_name=$file_name .tar.xz
43- curl -L " https://raw.githubusercontent.com/UBC-Thunderbots/Software-External-Dependencies/refs/heads/main/toolchain/$full_file_name " \
44- -o /tmp/tbots_download_cache/$full_file_name
45- tar -xf /tmp/tbots_download_cache/$full_file_name -C /tmp/tbots_download_cache/
46- sudo mv /tmp/tbots_download_cache/aarch64-tbots-linux-gnu /opt/tbotspython
47- rm /tmp/tbots_download_cache/$full_file_name
48- else
49- if is_x86 $1 ; then
50- file_name=aarch64-tbots-linux-gnu-for-x86
51- fi
52- full_file_name=$file_name .tar.xz
53- wget https://raw.githubusercontent.com/UBC-Thunderbots/Software-External-Dependencies/refs/heads/main/toolchain/$full_file_name -O /tmp/tbots_download_cache/$full_file_name
54- tar -xf /tmp/tbots_download_cache/$full_file_name -C /tmp/tbots_download_cache/
55- sudo mv /tmp/tbots_download_cache/aarch64-tbots-linux-gnu /opt/tbotspython
56- rm /tmp/tbots_download_cache/$full_file_name
41+ if is_x86 $1 ; then
42+ file_name=aarch64-tbots-linux-gnu-for-x86
5743 fi
44+ full_file_name=$file_name .tar.xz
45+ wget https://raw.githubusercontent.com/UBC-Thunderbots/Software-External-Dependencies/refs/heads/main/toolchain/$full_file_name -O /tmp/tbots_download_cache/$full_file_name
46+ tar -xf /tmp/tbots_download_cache/$full_file_name -C /tmp/tbots_download_cache/
47+ sudo mv /tmp/tbots_download_cache/aarch64-tbots-linux-gnu /opt/tbotspython
48+ rm /tmp/tbots_download_cache/$full_file_name
5849}
5950
6051install_gamecontroller () {
@@ -127,14 +118,17 @@ install_python_dev_cross_compile_headers() {
127118
128119install_stm32_cross_compiler () {
129120 arch=" aarch64"
130- if is_x86 $1 ; then
121+ if is_darwin $1 ; then
122+ arch=" darwin-arm64"
123+ elif is_x86 $1 ; then
131124 arch=" x86_64"
132125 fi
133- download_link=https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-${arch} -arm-none-eabi.tar.xz
126+ toolchain_name=arm-gnu-toolchain-14.3.rel1-${arch} -arm-none-eabi
127+ download_link=https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/${toolchain_name} .tar.xz
134128
135129 wget -N $download_link -O /tmp/tbots_download_cache/arm-gnu-toolchain.tar.xz
136130 tar -xf /tmp/tbots_download_cache/arm-gnu-toolchain.tar.xz -C /tmp/tbots_download_cache/
137- sudo mv /tmp/tbots_download_cache/arm-gnu-toolchain-14.3.rel1- ${arch} -arm-none-eabi /opt/tbotspython/arm-none-eabi-gcc
131+ sudo mv /tmp/tbots_download_cache/${toolchain_name} /opt/tbotspython/arm-none-eabi-gcc
138132 rm /tmp/tbots_download_cache/arm-gnu-toolchain.tar.xz
139133}
140134
0 commit comments