First , I downloaded the four modlue zip files and unzip to the yotta_module folder , download and unzip
the target-st-stm32f4-disco-gcc-master.zip to the yotta_target folder.
Then , I run these cmds as below :
# make a new directory
mkdir test-stm32f4-disco
cd test-stm32f4-disco/
# clone the target
git clone git@github.com:maxpeng/target-st-stm32f4-disco-gcc.git
cd target-st-stm32f4-disco-gcc/
sudo yt link-target
# clone the dependencies
cd ..
git clone git@github.com:maxpeng/mbed-hal-st-stm32f407vg.git
cd mbed-hal-st-stm32f407vg/
sudo yt link
cd ..
git clone git@github.com:maxpeng/cmsis-core-stm32f407xg.git
cd cmsis-core-stm32f407xg/
sudo yt link
cd ..
git clone git@github.com:maxpeng/cmsis-core-stm32f4.git
cd cmsis-core-stm32f4
sudo yt link
cd ..
git clone git@github.com:maxpeng/mbed-hal-st-stm32f4.git
cd mbed-hal-st-stm32f4
sudo yt link
# clone blinky
cd ..
git clone git@github.com:ARMmbed/example-mbedos-blinky.git
cd example-mbedos-blinky/
yt link-target stm32f4-disco-gcc
yt link mbed-hal-st-stm32f407vg
yt link cmsis-core-stm32f407xg
yt link mbed-hal-st-stm32f407vg
yt link cmsis-core-stm32f4
yt link mbed-hal-st-stm32f4
# for some reason need to install this one...
yt install mbed-hal-st-stm32f407vg
yt target stm32f4-disco-gcc
# get some files from mbedmicro for this target...
cd ..
git clone git@github.com:mbedmicro/mbed.git
cp mbed/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407VG/*.h example-mbedos-blinky/yotta_modules/mbed-hal-st-stm32cubef4/mbed-hal-st-stm32cubef4/
cp mbed/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407VG/*.c example-mbedos-blinky/yotta_modules/mbed-hal-st-stm32cubef4/mbed-hal-st-stm32cubef4/
# some include thing goes wrong, copy some .h files a folder up
cd example-mbedos-blinky/
cp ./yotta_modules/mbed-hal-st-stm32f407vg/mbed-hal-st-stm32f407vg/* ./yotta_modules/mbed-hal-st-stm32f407vg
# and build
yt build
However…
ym/mbed-hal-st-stm32f407vg/source/mbed-hal-st-stm32f407vg.a(startup_stm32f407xx.s.obj): In function `LoopFillZerobss':
/Users/janjon01/repos/test-stm32f4-2/mbed-hal-st-stm32f407vg/source/bootstrap_gcc/startup_stm32f407xx.s:112: undefined reference to `SystemInitPre'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Which might be because I copied some files over from mbed Classic, might be that we need newer versions of these.