Hi,
I use CLion to write my code, and uVision to compile and flash the device. I want to integrate the compiling and flashing process to CLion (CMake).
I integrated ARMclang successfully in CMake.
How can I link and create the binary .hex with fromELF.exe? Does anyone have already set up a full toolchain to replace uVision?
Hi, pdev
can you please share what you did to integrate ARMclang succesfully in CMake
I want to compile a zephyr example using the ARMclang toolchain but i don't seem to succeed
Yes, please provide working examples of building a Keil project using CMake. That means documenting how to configure CMake in the Keil project. Links that point to other links that point to other links is not a working example. And, yes, I can waste a few days figuring this out, but if someone has already done so, well, this is a *community* forum, and sharing that sort of information seems like the reason for its existence.
Thanks.
Hi devnewb B..,
unfortunately, I forfeited my vision to compile in a CMake environment using the Keil Toolchain.
Reason:
- no support from Keil side (no sample project providing a CMake File that compiles with ARMClang)
- limited time I wanted to investigate in this topic.
My compiling worked, but fixxing the linking was the start of the end.
My results:
You need to have a Toolchain.cmake file which you embedded in your CMake "-DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake"
*Toolchain.cmake*SET(CMAKE_SYSTEM_NAME Generic)SET(CMAKE_SYSTEM_PROCESSOR cortex-m4) # The name of the cpu #Compiler SetupSET(ARMCLANG_PATH "${KEIL_PATH}/ARM/ARMCLANG")SET(CMAKE_C_COMPILER "${ARMCLANG_PATH}/bin/armclang.exe")SET(CMAKE_CXX_COMPILER ${CMAKE_C_COMPILER})#CompilerSettingsSET(CXX_COMPILER_OPTIONS "<copyhere all options from Keil uVision5 -> options for target -> C/c++ -> compiler string control") SET(C_COMPILER_OPTIONS "-std=gnu99 ${CXX_COMPILER_OPTIONS}")SET(CMAKE_C_FLAGS ${C_COMPILER_OPTIONS})SET(CMAKE_CXX_FLAGS ${CXX_COMPILER_OPTIONS})SET(CMAKE_LINKER "${ARMCLANG_PATH}/bin/armlink.exe")SET(FROMELF "${ARMCLANG_PATH}/bin/fromelf.exe")
If you have any success with linking, please share it