How to work on a project collaboratively? Version control / git

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to work on a project collaboratively? Version control / git

Jump to solution
1,767 Views
halfordC
Contributor I

Me, and a team of 2 other developers are getting up to speed on the vsCode extension for MCUXpresso. 
We've done all the setup steps, and have had success running example code on our i.MXRT1050 development boards. 

Our issue, is that we would like to work collaboratively on a new project in github.
So, I cloned the "new project" repo for the RT1050, made a few small changes, and pushed the project folder to our repo. 

We seem to have run into 2 problems: 
- If the .vscode and armgcc folder is shared, then all of the paths in the CMake file for the project are the absolute paths from my computer. So our other devs get errors when they try to build. 

- If these files are added to the gitignore, importing the project is missing all the support files for the board, and so project is also not able to compile. 

We have got the project to build on another devs computer with some hack-y solutions. (copying the __repo__, .vsCode, and armgcc folder from a project of the same name, in the same location that we then deleted and cloned our own project into), but this can't be the correct way to do this. 

What are the steps to set this up? What should I have in my .gitignore, and what steps need to be taken to set up a project from a repository?

 

0 Kudos
Reply
1 Solution
1,709 Views
DragosMiloiu
NXP Employee
NXP Employee

Hi @halfordC,

 Please find below some changes needed to make the project shareable in Git:

  • In your project, under .vscode folder (which should be saved in Git), there is a file called mcuxpresso-tools.json that contains two absolute paths: “toolchainPath” and "path" (under “sdk” node).

         You can refer environment variables to make sure these paths work on different computers.

         Ex:  "toolchainPath": "${env:ARMGCC_PATH}" – where ARMGCC_PATH is an environment variable that points to a toolchain.

  • ide_overrides.cmake can be added to . gitignore as it is regenerated by the build process.
  • Folders where the build artifacts are generated should be added to . gitignore too.

Hope these steps help.

Thanks,

Dragos.

View solution in original post

0 Kudos
Reply
2 Replies
1,710 Views
DragosMiloiu
NXP Employee
NXP Employee

Hi @halfordC,

 Please find below some changes needed to make the project shareable in Git:

  • In your project, under .vscode folder (which should be saved in Git), there is a file called mcuxpresso-tools.json that contains two absolute paths: “toolchainPath” and "path" (under “sdk” node).

         You can refer environment variables to make sure these paths work on different computers.

         Ex:  "toolchainPath": "${env:ARMGCC_PATH}" – where ARMGCC_PATH is an environment variable that points to a toolchain.

  • ide_overrides.cmake can be added to . gitignore as it is regenerated by the build process.
  • Folders where the build artifacts are generated should be added to . gitignore too.

Hope these steps help.

Thanks,

Dragos.

0 Kudos
Reply
1,618 Views
halfordC
Contributor I

Thanks! This solution worked, we are now all working on the project together. 

0 Kudos
Reply