This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Visual Studio Code environment for armclang?

I want to configure Visual Studio Code to use CMake and armclang to build code for Cortex-M4, on Windows.

My CMakeLists.txt file configures correctly from the ARM DS 2021.1 Command Prompt.  In VS Code I set the environment variables for CMake Configuration as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
"cmake.configureEnvironment": {
"ARMLMD_LICENSE_FILE": "\\Users\\<snip>\\AppData\\Roaming\\arm\\ds\\licenses",
"ARM_CONFIG_PATH": "\\Users\\<snip>\\AppData\\Roaming\\arm\\ds\\2021.1",
"ARM_PRODUCT_DEF": "\\Program Files\\Arm\\Development Studio 2021.1\\sw\\mappings\\gold.elmap",
"DS_CDB_PATH": "\\Program Files\\Arm\\Development Studio 2021.1\\sw\\debugger\\configdb",
"DS_HOME": "\\Program Files\\Arm\\Development Studio 2021.1\\sw\\..",
"LM_LICENSE_FILE_TMP": "<snip>",
"GNU_ARM_TOOLCHAIN_PATH": "/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.10/bin",
"PATH": "\\Program Files\\Arm\\Development Studio 2021.1\\sw\\..\\sw\\ARMCompiler6.16\\bin;\\Program Files\\Arm\\Development Studio 2021.1\\bin;\\Program Files\\Arm\\Development Studio 2021.1\\sw\\java\\bin;${env:PATH}"
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CMake configuration then fails as follows:
[cmake] -- The C compiler identification is ARMClang 6.16.1
[cmake] -- The CXX compiler identification is ARMClang 6.16.1
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/Program Files/Arm/Development Studio 2021.1/sw/ARMCompiler6.16/bin/armclang.exe
[cmake] -- Check for working C compiler: C:/Program Files/Arm/Development Studio 2021.1/sw/ARMCompiler6.16/bin/armclang.exe - broken
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
[cmake] The C compiler
[cmake]
[cmake] "C:/Program Files/Arm/Development Studio 2021.1/sw/ARMCompiler6.16/bin/armclang.exe"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: C:/SVNProj/Elysion/trunk/software/prototypes/elysion_arm_studio_4/build/CMakeFiles/CMakeTmp
[cmake]
[cmake] Run Build Command(s):C:/bin/ninja-win/ninja.exe cmTC_5d897 && [1/2] Building C object CMakeFiles/cmTC_5d897.dir/testCCompiler.o
[cmake] warning: 'armv4t' is unsupported in this version of the product
[cmake] warning: 'arm7tdmi' is unsupported in this version of the product
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The same error occurs if I start Code from the ARM DS 2021.1 Command Prompt.
Obviously something is wrong with my environment. Any idea what please?
0