Creator: setting variables for cross-development
-
Hi all -
I'm trying to build an ARM app from Creator. I have the toolchain, but it's a little unclear how I am supposed to specify arguments for it. Specifically:
- I need to define target=arm-arm-none-eabi. Does this go in the Build Steps -> Tool Arguments section? I can't seem to get it to "take."
- I added this line to my CMakeLists.txt file:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --specs=nosys.specs")
Which enables me to run cmake from Creator, but it breaks when I try to run from the CLI. How do I put this into my build configuration?
Thanks...
EDIT: I solved #2 by adding the line:
-DCMAKE_C_FLAGS="--specs=nosys.specs"
to Build Settings --> CMake --> Initial CMake parameters, so that's fixed. Still could use some help with #1.
EDIT #2: I think I solved #1 with this:
# Target definition set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_PROCESSOR ARM)
I'm not sure I understand the mechanism here (where does "__arm__" get defined?), but I won't argue with success.