10 years, 6 months ago.

Is the ST NUCLEO F401RE board unsupported? Am I doing something wrong?

I followed this tutorial very closely, with no success. First, I installed gcc-arm-none-eabi from here: https://launchpad.net/gcc-arm-embedded/4.7/4.7-2012-q4-major. Then, I did the following:

Initial setup:

$ git clone https://github.com/mbedmicro/mbed
$ cd mbed/workspace_tools
$ cp settings.py private_settings.py
$ vim private_settings.py

I only changed the ARM_PATH and GCC_ARM_PATH directories in the file, as shown in lines 7 and 18 below:

private_settings.py

# ARM
armcc = "standalone" # "keil", or "standalone", or "ds-5"

if armcc == "keil":
# [...]
elif armcc == "standalone":
    ARM_PATH = "/home/user/Downloads/gcc-arm-none-eabi-4_7-2012q4"
    ARM_BIN = join(ARM_PATH, "bin")
    ARM_INC = join(ARM_PATH, "include")
    ARM_LIB    = join(ARM_PATH, "lib")

elif armcc == "ds-5":
# [...]
ARM_CPPLIB = join(ARM_LIB, "cpplib")
MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")

# GCC ARM
GCC_ARM_PATH = "/home/user/Downloads/gcc-arm-none-eabi-4_7-2012q4"

Then I tried to build, but it failed.

$ python build.py -m NUCLEO_F401RE -t GCC_ARM | less

>>> BUILD LIBRARY CMSIS (NUCLEO_F401RE, GCC_ARM)
Copy: core_cmInstr.h
Copy: core_cm4.h
Copy: core_cm0plus.h
[...]
Copy: stm32f4xx_hal_pwr.h
Copy: stm32f4xx_hal.h
Copy: NUCLEO_F401RE.ld
Assemble: startup_STM32F40x.s
[Errno 2] No such file or directory
Completed in: (0.02)s

Build failures:

  * GCC_ARM::NUCLEO_F401RE

Since startup_STM32F40x.s wasn't found, I searched for it from the repository's root:

./libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/TOOLCHAIN_GCC_ARM/startup_STM32F40x.s
./libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4XX/TOOLCHAIN_ARM_STD/startup_STM32F40x.s
./libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4XX/TOOLCHAIN_GCC_ARM/startup_STM32F40x.s

Notice that the first result contains TARGET_NUCLEO_F401RE in the directory.

What can I do from here? I'm running Ubuntu 14.04 (64-bit) in case that matters. Thanks in advance.

Question relating to:

Hi Matt, your gcc path should be GCC_ARM_PATH = "/home/user/Downloads/gcc-arm-none-eabi-4_7-2012q4/bin"

posted by Abdessamad El Abbassi 15 Jun 2014

After changing the path, I got this output:

$ python build.py -m NUCLEO_F401RE -t GCC_ARM

>>> BUILD LIBRARY CMSIS (NUCLEO_F401RE, GCC_ARM)
Copy: core_cmInstr.h
[...]
Copy: NUCLEO_F401RE.ld
Assemble: startup_STM32F40x.s
Compile: stm32f4xx_hal_spi.c
[Warning] stm32f4xx_hal_spi.c@471: In function 'HAL_SPI_Receive': variable 'tmpreg' set but not used [-Wunused-but-set-variable]
Compile: stm32f4xx_hal_tim_ex.c
[...]
Compile: stm32f4xx_hal_rcc.c
[Warning] stm32f4xx_hal_rcc.c@272: In function 'HAL_RCC_OscConfig': comparison between signed and unsigned integer expressions [-Wsign-compare]
[...]

>>> BUILD LIBRARY MBED (NUCLEO_F401RE, GCC_ARM)
Copy: PortInOut.h
[...]
Compile: InterruptManager.cpp
/home/user/Repositories/mbed/libraries/mbed/common/InterruptManager.cpp:10:49: error: invalid conversion from 'void*' to 'mbed::InterruptManager*' [-fpermissive]
/home/user/Repositories/mbed/libraries/mbed/common/InterruptManager.cpp: In static member function 'static void mbed::InterruptManager::destroy()':
/home/user/Repositories/mbed/libraries/mbed/common/InterruptManager.cpp:28:21: error: invalid conversion from 'void*' to 'mbed::InterruptManager*' [-fpermissive]
/home/user/Repositories/mbed/libraries/mbed/common/InterruptManager.cpp: In member function 'bool mbed::InterruptManager::remove_handler(mbed::pFunctionPointer_t, IRQn_Type)':
/home/user/Repositories/mbed/libraries/mbed/common/InterruptManager.cpp:71:28: error: invalid conversion from 'void*' to 'mbed::CallChain*' [-fpermissive]

Completed in: (19.81)s

Build failures:

  * GCC_ARM::NUCLEO_F401RE

Please help?

posted by Matt McCarthy 16 Jun 2014

I'm having the same issue, did you find the solution?

posted by Nathan Stathis 02 Sep 2014

2 Answers

10 years ago.

I am using next

arm-none-eabi-gcc version arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641]

and everything is OK for this board.

Best regards Milan

10 years, 1 month ago.

Same problem here! Please help!