Is it posiible to integrate the framework with armcc?
Hi @Neutree ,
I'm glad to find this project on github. I wonder to know does this project supports armcc compiler (also named as arm compiler 5). Arm compiler dosent support conventional gcc name. For example the c compiler is named as armcc while the linker is armlink. I think it is not just a simple way to create the project by typing:
python project.py --toolchain /opt/toolchain/bin --toolchain-prefix arm config
Can i specify a specific compiler name when config the project?
Thanks a lot!
Best Regards, Edxian
https://github.com/Neutree/c_cpp_project_framework/blob/435427099998a90fa61e27af48a6565da82a29fe/tools/cmake/compile.cmake#L348-L384
so,you can write your own toolchain config cmake file, and set --toolchain arg with your .cmake config file, or just edit this cmake file.
Let me try it!
Hi @Neutree , Thank you for your help. I finally built the project with armcc successfully by the following modification:
- cd example/demo
- create an
armcc.cmakein example/demo
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER armcc)
set(CMAKE_ASM_COMPILER armasm)
set(CMAKE_LINKER armlink)
set(CMAKE_OBJCOPY fromelf)
set(CMAKE_C_COMPILER_WORKS 1)
- try to type the script
python project.py config --toolchain armcc.cmake -G "Ninja" --verbose python project.py menuconfigpython project.py build
But I still want to ask a question. Why the framework tries to pass ADD_DEFINITIONS to both compile option and link option instead of seperating the definition into different flags? For example ADD_COMPILE_DEFINITION is for target_compile_options while ADD_LINK_DEFINITION is for target_link_options
Best Regards, edxian
ADD_DEFINITIONS add for both compile and link, I think it will reduce some bug like forget to add link flag, but it may not totally correct way, you can add ADD_COMPILE_DEFINITION and ADD_LINK_DEFINITION by yourself
Got it! Thanks you for your advice.