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?
The compiler, linker, etc are all command-line tools
See replies here:
https://community.arm.com/developer/tools-software/tools/f/keil-forum/44102/uvision-5-to-gnu-gcc
Hi Andy. Thanks for ur fast reply.
I solved the linking in the way u described.
One further Question:
on http://www.keil.com/support/man/docs/uv4/uv4_commandline.htm is described how to use the flashing/download manually on command line.
Examples:UV4 -f PROJECT1.uvprojx -t"MCB2100 Board"
When I use it uVision opens and downloads the image and closes itself afterwards. Is there a more smooth way? Like seeing the progress in command line or suppressing the opening of the keil uVision Window?
What programmer are you using?
Most have command-line utilities ...
Duplicate:
https://community.arm.com/developer/tools-software/tools/f/keil-forum/44211/loading-axf-image-to-target-without-open-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