Closed jancotipsarevic closed 1 year ago
I am not really maintaining this project anymore, the successor is mbed-ce/mbed-os which I'm actively working on. However, it sounds like you pretty much did what I'd do. What's the error you're getting?
Hello, this is what a get (target NUCLEO-F401RE, generator MinGW Makefiles, built by mingw32-make).
[ 11%] Building C object mbed-cmake/mbed-src/CMakeFiles/mbed-os-static.dir/events/source/equeue_posix.c.obj
[ 11%] Building C object mbed-cmake/mbed-src/CMakeFiles/mbed-os-static.dir/events/tests/unit/prof.c.obj
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c: In function 'baseline_prof':
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:46:5: error: impossible constraint in 'asm'
46 | asm volatile ("rdtsc" : "=a" (a), "=d" (b)); \
| ^~~
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:56:24: note: in expansion of macro 'prof_cycle'
56 | prof_start_cycle = prof_cycle(); \
| ^~~~~~
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:126:9: note: in expansion of macro 'prof_start'
126 | prof_start();
| ^~~~~~
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:46:5: error: impossible constraint in 'asm'
46 | asm volatile ("rdtsc" : "=a" (a), "=d" (b)); \
| ^~~
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:60:23: note: in expansion of macro 'prof_cycle'
60 | prof_stop_cycle = prof_cycle(); \
| ^~~~~~
C:\Mbed-Cmake\mbed_ws\mbed-cmake-example-project\mbed-cmake\mbed-src\events\tests\unit\prof.c:128:9: note: in expansion of macro 'prof_stop'
128 | prof_stop();
| ^~~~~
mingw32-make[2]: [mbed-cmake/mbed-src/CMakeFiles/mbed-os-static.dir/events/tests/unit/prof.c.obj] Error 1
mingw32-make[1]: [mbed-cmake/mbed-src/CMakeFiles/mbed-os-static.dir/all] Error 2
mingw32-make: *** [all] Error 2
Thank you very much
Also, feel free to submit a PR to upgrade to Mbed 6.16!
Hello Jamie, applying the modification you mentioned it works fine, thank you very much. I´ve tryed using custom_targets and I see this behaviour:
If I use this file tree the compilation fails complaining about missing PinNames.h using this command: python3 mbed-cmake/configure_for_target.py -a mbed_app.json -i .mbedignore -x C:\mbed-cmake-example-project\ MY_NUCLEO_F401RE
mbed-cmake-example-project\ ---build ---cmake ---mbed-cmake ---mbed-cmake-config ---TARGET_MY_NUCLEO_F401RE -------PeripheralPins -------PinNames ---.gitignore ---.gitmodules ---.mbedignore ---CMakeLists ---custom_targets.json ---HelloWorld ---mbed_app ---README
If I use this other tree it works fine using this commnand: python3 mbed-cmake/configure_for_target.py -a mbed_app.json -i .mbedignore -x C:\mbed-cmake-example-project\mbed-cmake\mbed-src\custom_targets\TARGET_MY_NUCLEO_F401RE MY_NUCLEO_F401RE
mbed-cmake-example-project\
---build
---cmake
---mbed-cmake
-------mbed-src
-----------custom_targets
---------------TARGET_MY_NUCLEO_F401RE
-------------------custom_targets.json
-------------------PheripheralPins.c
-------------------PinNames.h
---------------TARGET_MY_BOARD
-------------------custom_targets.json
-------------------PheripheralPins.c
-------------------PinNames.h
---mbed-cmake-config
---.gitignore
---.gitmodules
---.mbedignore
---CMakeLists
---HelloWorld
---mbed_app
---README
To me the second option is not a problem and I like to have all my different targets in the same directory, but I think to have it in the project root look more appropiated.
Hi all, is there any plan to upgrade mbed-cmake to mbed-os 6.16? , I would like to use it with the recently added stm32 series STM32F103xD and STM32F103xG. I`ve tryed to copy mbed-os 6.16 into mbed-src (maintainig tools directory and CMakeLists.txt as noted in the doc) but it is plenty of errors.
Thank you.