I’m having cross-crompiling issues with the armcc/armlink toolchain when I run armlink with our scatter file. The scatter file includes a header file from a relative path (has to work on developer machines and it works when building from the uVision IDE).
With CMake, the linker no longer finds that header file. When armlink is running, the current directory is different from the one when uVision runs the build.
The original scatter file uses
#! armcc -E -I.. and then the
With CMake, I have to use
#! armcc -E -I../<folder of my CMakeLists.txt>.
What is the “current directory” when CMake is running the link step?
CMAKE_BIN_DIR? The scatter file mechanism is somewhat odd. Essentially, the linker takes all its inputs (the object files) from the build tree - except for a scatter file, which is located in the source tree and may include other files from the source tree.