Actions

EmSys

Difference between revisions of "Using Visual Studio Code for ARM Development – Defines"

From EdWiki

m (Using Visual Studio Code for ARM Development – Defines)
m (Using Visual Studio Code for ARM Development – Defines)
Line 8: Line 8:
 
  -DPART_TM4C123GH6PM
 
  -DPART_TM4C123GH6PM
  
Setting these for VSCode is simple: just add them to the “defines” section of c_cpp_properties.json, without the -D flag prefix:
+
 
 +
Setting these for VSCode is simple: just add them to the “defines” section of '''c_cpp_properties.json''', without the -D flag prefix:
  
 
<pre>
 
<pre>
Line 17: Line 18:
 
</pre>
 
</pre>
  
This fixes all of the errors related to things defined in the libraries!
 
  
 
If the include paths and defines are properly set up in Visual Studio Code, the C/C++ plugin should be able to properly parse your code, identify syntax errors, and will provide Intellisense code completion to improve the speed and accuracy of your writing!
 
If the include paths and defines are properly set up in Visual Studio Code, the C/C++ plugin should be able to properly parse your code, identify syntax errors, and will provide Intellisense code completion to improve the speed and accuracy of your writing!

Revision as of 14:56, 23 March 2022

Using Visual Studio Code for ARM Development – Defines

It is common to pass defines to the compiler using flags at compile time.

-D_DEBUG
-DPART_TM4C123GH6PM


Setting these for VSCode is simple: just add them to the “defines” section of c_cpp_properties.json, without the -D flag prefix:

    "defines": [
        "DEBUG",
        "PART_TM4C123GH6PM"
    ],


If the include paths and defines are properly set up in Visual Studio Code, the C/C++ plugin should be able to properly parse your code, identify syntax errors, and will provide Intellisense code completion to improve the speed and accuracy of your writing!