Sample Header Ad - 728x90

ARM cross-compiler not recognized in MX Linux during STM32 development

0 votes
1 answer
2805 views
I am using MX Linux OS and trying to work with the STM32F103C8T6 MCU. Following the user manual *Beginning STM32* by Warren Gay, I successfully installed the Git clone of stm32f103c8t6, libopencm3, and FreeRTOS as per the manual. When I downloaded and unzipped the ARM cross-compiler, the files were saved under the /opt/gcc-arm folder. Upon typing arm-none-eabi-gcc --version, I encountered a "command not found" error. Upon further investigation, I typed:
$ ls -l /opt/gcc-arm/bin
It listed arm-none-eabi-gcc in the following format (in green):
-rwxr-xr-x 2 1001 1001  1296976 Nov 24  2020 arm-none-eabi-gcc
Similarly, the type gcc command gives the output:
gcc is /usr/bin/gcc
Instead of:
arm-none-eabi-gcc is hashed (/opt/gcc-arm/bin/gcc)
as mentioned in the user manual. The type arm-none-eabi-gcc command outputs:
not found
As I understand, the green color of the file means it is executable, but I am unable to determine why the computer is not recognizing the command. Finally, when running the make command, I received the following response:
user@mx:~/stm32f103c8t6
$ make
make -C libopencm3 TARGETS=stm32/f1
make: Entering directory '/home/user/stm32f103c8t6/libopencm3'
  BUILD   lib/stm32/f1
  CC      adc.c
make: arm-none-eabi-gcc: Command not found
make: *** [../../Makefile.include:41: adc.o] Error 127
Failure building: lib/stm32/f1: code: 2
make: *** [Makefile:79: lib] Error 1
make: Leaving directory '/home/user/stm32f103c8t6/libopencm3'
make: *** [Makefile:38: libopencm3/lib/libopencm3_stm32f1.a] Error 2
Asked by Deepak Kumar (1 rep)
Jul 23, 2021, 10:52 AM
Last activity: Jun 13, 2025, 12:01 PM