Closed xiaolongba closed 6 years ago
@lgmcode Great,so i dont need to install the app of "make for windows"?i can make all directly?right?
@xiaolongba The make.exe is in the bin directory, you don't need to install it again.
@lgmcode Millions of thanks.let me have a try.u are a good man.
@lgmcode,
Thank you for helping @xiaolongba. I added the make tool to enable cross platform build with only the bare metal tools.
@atomclip , if the makefile of my project need to specify the toolchain path,what should i do?
The extension has three paths for the toolchain. You can use this in the tasks.json.
arm-none-eabi.bin arm-none-eabi.include arm-none-eabi.lib
You can add the rest of the path in tasks.json or your make file.
This is what I use in the make file at the moment for a Cortex M0
lib_path = ${LIB}/gcc/arm-none-eabi/7.3.1/thumb/v6-m/ lib = $(lib_path)libgcc.a
@atomclip Thanks for your help.Maybe u misunderstood what i meant.i mean that how to specify my own project's makefile after i install the extension of windows-arm-none-eabi,i want to use the path of the extension toolchain in my makefile,is it possible?
@xiaolongba
On Windows visual studio code extensions are installed on the location:
C:\User\USERNAME\.vscode\extensions\EXTENSION_NAME
See the example below. My name is "Carl" and the extension name "atomclip.windows-arm-none-eabi-0.1.0"
To create a makefile that is independent of the name of the user, the version of the extension and the operating system I made three visual studio code variables. The names of these variables are:
arm-none-eabi.bin arm-none-eabi.include arm-none-eabi.lib
In my case the variable ${config:arm-none-eabi.bin} in the task.json expands to
C:\Users\Carl\.vscode\extensions\atomclip.windows-arm-none-eabi-0.1.0\bin
As you can see in the example task.json I added this path to the environment variable PATH. Now Windows is able to find make.exe which I copied to the bin directory for convenience.
If you like to call any of the tools from the toolchain from the command prompt or Windows PowerShell you need to add the search path to the PATH environment variable.
See this example: https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/
There is a catch here. Visual studio code uses the version number of the extension in the path. If the extension is updated visual studio code leaves the old version on you computer. If you forget to update the PATH it still points to the previous version. So be warned.
Happy coding
@atomclip Great!I tried the method what you said and it works well now.Thanks for your help,bro.u are a good man.
Hi, @atomclip I dont know how to use this extension,can u give me some examples for reference?