This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Minimum CMakeLists.txt file to use with ARMClang v6 with CLion

I would like to use ARMClang 6 series toolchain (compiler and linker) to build and compile or debug for STM32F103RB board Evaluation board.
I want to use CLion instead of Keil IDE for compiling/flashing and debugging the EVAL board.

Currently CLion has a plugin that supports for arm-gcc but nothing for ARMClang yet.

Since the build backbone of the CLion is CMake which is a way different from Keil build system all my efforts to create a successful build system in Cmake has failed.

I want to replicate following flags in CMake (Both for Release and Debug) setting if  possible with .hex file as an output too

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
Compiler Flags>
-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -flto -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -Ofast -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -I ../../Core/Inc -I C:/Users/TS/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.0/Drivers/STM32F1xx_HAL_Driver/Inc -I C:/Users/TS/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.0/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I C:/Users/TS/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.0/Drivers/CMSIS/Device/ST/STM32F1xx/Include -I C:/Users/TS/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.0/Drivers/CMSIS/Include
-I./RTE/_stm32f103rbt6-LCD-CubeMX
-IC:/Users/TS/AppData/Local/Arm/Packs/ARM/CMSIS/5.5.1/CMSIS/Core/Include
-IC:/Users/TS/AppData/Local/Arm/Packs/Keil/STM32F1xx_DFP/2.3.0/Device/Include
-D__UVISION_VERSION="528" -D_RTE_ -DSTM32F10X_MD -DUSE_HAL_DRIVER -DSTM32F103xB
-o stm32f103rbt6-LCD-CubeMX/*.o -MD
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ASM> armasm
--cpu Cortex-M3 -g
-I.\RTE\_stm32f103rbt6-LCD-CubeMX
-IC:\Users\TS\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\TS\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
--pd "__UVISION_VERSION SETA 528"
--pd "_RTE_ SETA 1"
--pd "STM32F10X_MD SETA 1"
--list *.lst
--xref -o stm32f103rbt6-LCD-CubeMX\*.o
--depend stm32f103rbt6-LCD-CubeMX\*.d
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
Linker armlink>
--cpu Cortex-M3 --lto *.o
--strict --scatter "stm32f103rbt6-LCD-CubeMX\stm32f103rbt6-LCD-CubeMX.sct"
--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list "stm32f103rbt6-LCD-CubeMX.map"
-o stm32f103rbt6-LCD-CubeMX\stm32f103rbt6-LCD-CubeMX.axf
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Any help with creating CMakeLists.txt file is really appreciated.

0