yotta build stm32f411-nucleo-gcc error

18 Mar 2016

I can't post questions to the site (if anybody knows why, please let me know). Might as well try making a forum discussion.

Why does yotta prefer board targets as opposed to chip targets ? I can't build STM32F411-nucleo-gcc target with yotta. This is the output Is there some incompatibility ?

yotta target outputt

(workspace) C:\Proj\temp\blinky_rev2>yotta target
stm32f411re-nucleo-gcc 0.1.1
mbed-gcc 0.1.4

yotta build output

(workspace) C:\Proj\temp\blinky_rev2> yotta build
info: generate for target: stm32f411re-nucleo-gcc 0.1.1 at C:\Proj\temp\blinky_r
ev2\yotta_targets\stm32f411re-nucleo-gcc
warning: subdirectory "test" of blinky-rev2 0.0.0 at C:\Proj\temp\blinky_rev2 wa
s ignored because it doesn't appear to contain any source files
GCC version is: 4.9.3
CMake Warning at C:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib/source/CMakeL
ists.txt:60 (message):


           *********************************************************************

           * WARNING (uvisor-lib): unsupported platform; your code will still  *

           *                       work but no security feature is provided;   *

           *                       UVISOR_DISABLED is set by default           *

           *********************************************************************



suppressing warnings from mbed-hal-st-stm32cubef4
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Proj/temp/blinky_rev2/build/stm32f411re-
nucleo-gcc
[1/149] Building CXX object ym/uvisor-...Files/uvisor-lib.dir/unsupported.cpp.o
FAILED: C:\yotta\gcc\bin\arm-none-eabi-g++.exe  -DYOTTA_MODULE_NAME=uvisor-lib -
Igenerated/include -IC:/Proj/temp/blinky_rev2 -IC:/Proj/temp/blinky_rev2/yotta_m
odules/mbed-drivers -IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal-st-stm32cu
bef4 -IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal -IC:/Proj/temp/blinky_rev
2/yotta_modules/cmsis-core -IC:/Proj/temp/blinky_rev2/yotta_modules/ualloc -IC:/
Proj/temp/blinky_rev2/yotta_modules/minar -IC:/Proj/temp/blinky_rev2/yotta_modul
es/core-util -IC:/Proj/temp/blinky_rev2/yotta_modules/compiler-polyfill -IC:/Pro
j/temp/blinky_rev2/yotta_modules/greentea-client -IC:/Proj/temp/blinky_rev2/yott
a_modules/mbed-hal-st -IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal-st-stm32
f4 -IC:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib -IC:/Proj/temp/blinky_rev
2/yotta_modules/cmsis-core-st -IC:/Proj/temp/blinky_rev2/yotta_modules/cmsis-cor
e-stm32f4 -IC:/Proj/temp/blinky_rev2/yotta_modules/dlmalloc -IC:/Proj/temp/blink
y_rev2/yotta_modules/minar-platform -IC:/Proj/temp/blinky_rev2/yotta_modules/min
ar-platform-mbed -IC:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core/cmsis-core
-IC:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core-stm32f4/cmsis-core-stm32f4 -
IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal-st-stm32f4/mbed-hal-st-stm32f4
-IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal-st-stm32cubef4/mbed-hal-st-stm
32cubef4 -IC:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal/mbed-hal -IC:/Proj/te
mp/blinky_rev2/yotta_modules/mbed-drivers/mbed -fno-exceptions -fno-unwind-table
s -ffunction-sections -fdata-sections -Wall -Wextra -fno-rtti -fno-threadsafe-st
atics -mcpu=cortex-m4 -mthumb -D__thumb2__ -Os -g -gdwarf-3 -DNDEBUG   -DTOOLCHA
IN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_OPERATORS -DTARGET_STM32F411RE_NUCLEO -DTARGET
_STM32F411RE -DTARGET_STM32F4 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -include "C:/P
roj/temp/blinky_rev2/build/stm32f411re-nucleo-gcc/yotta_config.h" -MMD -MT ym/uv
isor-lib/source/CMakeFiles/uvisor-lib.dir/unsupported.cpp.o -MF ym/uvisor-lib/so
urce/CMakeFiles/uvisor-lib.dir/unsupported.cpp.o.d -o ym/uvisor-lib/source/CMake
Files/uvisor-lib.dir/unsupported.cpp.o -c C:/Proj/temp/blinky_rev2/yotta_modules
/uvisor-lib/source/unsupported.cpp
In file included from C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core-stm32f4/
cmsis-core-stm32f4/cmsis.h:35:0,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core/cmsis-co
re/cmsis_nvic.h:35,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib/uvisor-l
ib/uvisor-lib.h:23,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib/source/u
nsupported.cpp:17:
C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core-stm32f4/cmsis-core-stm32f4/stm
32f4xx.h:154:3: error: #error "Please select first the target STM32F4xx device u
sed in your application (in stm32f4xx.h file)"
  #error "Please select first the target STM32F4xx device used in your applicati
on (in stm32f4xx.h file)"
   ^
In file included from C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core-stm32f4/
cmsis-core-stm32f4/stm32f4xx.h:213:0,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core-stm32f4/
cmsis-core-stm32f4/cmsis.h:35,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/cmsis-core/cmsis-co
re/cmsis_nvic.h:35,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib/uvisor-l
ib/uvisor-lib.h:23,
                 from C:/Proj/temp/blinky_rev2/yotta_modules/uvisor-lib/source/u
nsupported.cpp:17:
C:/Proj/temp/blinky_rev2/yotta_modules/mbed-hal-st-stm32cubef4/mbed-hal-st-stm32
cubef4/stm32f4xx_hal.h:48:32: fatal error: stm32f4xx_hal_conf.h: No such file or
 directory
 #include "stm32f4xx_hal_conf.h"
                                ^
compilation terminated.
ninja: build stopped: subcommand failed.
error: command ['ninja'] failed

(workspace) C:\Proj\temp\blinky_rev2>


01 Apr 2016

This fits better at http://forums.mbed.com/ where the mbed OS engineers are reading as well, but you'll need to specify the board revision in stm32f4xx.h; so it can load the right peripheral config.

01 May 2016

Hi, I am having a similar problem

I cannot establish a target on the PC...

(yotta-venv) C:\Users\nickm\yotta-venv\blinky_1>yotta target disco-f429zi info: get versions for disco-f429zi error: could not install target disco-f429zi at * for disco-f429zi error: disco-f429zi does not exist in the targets registry. Check that the name is correct, and that it has been published. error: NOTE: use "yotta link-target" to test a locally modified target prior to publishing.