The default path of Arduino core is :C:\Users\myUser\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.20
I would like to change this path in order to use a custom git repository.
Depending on the project I use I also need to modify the files in the directory :
"C:\Users\myUser\AppData\Local\Arduino15\packages\arduino\variants\mkrgsm1400" (to change pins assignment).
The default path of Arduino core is :C:\Users\myUser\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.20
I would like to change this path
You can cause it to be installed to {Arduino IDE installation folder}\portable\packages\arduino\hardware\samd\1.6.20 if you run the Arduino IDE in portable mode: https://www.arduino.cc/en/Guide/PortableIDE
alexduch:
in order to use a custom git repository.
It's not clear what you mean by that. Please provide more details about what you're trying to accomplish.
alexduch:
Depending on the project I use I also need to modify the files in the directory :
"C:\Users\myUser\AppData\Local\Arduino15\packages\arduino\variants\mkrgsm1400" (to change pins assignment).
You can do that, but your changes will be lost every time you update to a new version of Arduino SAMD Boards. The better solution would be to create your own custom hardware package in the {sketchbook folder}/hardware folder. That way, your work will persist through package updates. You can reference all the resources from the Arduino SAMD Boards package so all this hardware would need to be is a boards.txt file to provide a board definition for your custom board and the modified variant file. More information here:
What I tried to accomplish is to have one git repository to manage all the Arduino code I use.
It is accompished thanks to the portable mode.
Here is my architecture :
portable folder is my main git repository. {Arduino}\portable\project => my Arduino projects {Arduino}\portable\sketchbook\hardware => my custom board {Arduino}\portable\sketchbook\libraries => various git repositories of Arduino libraries {Arduino}\portable\packages\arduino\hardware\samd => Arduino core git repository
The better solution would be to create your own custom hardware package in the {sketchbook folder}/hardware folder.
I have copied the mkr1400 folder from {Arduino}\portable\packages\arduino\hardware\samd\1.6.20\variants\mkrgsm1400
to {Arduino}\portable\sketchbook\hardware\sam\Arduino\mkrgsm1400_custom
I have also copied the files platform.txt, programmers.txt, boards.txt to {Arduino}\portable\sketchbook\hardware\sam\Arduino
But when I select the board Arduino MKR GSM 1400 Custom the compilation failed.
All the files from the Arduino core are not found.
Can you please tell me what I missed ?
I've made symbolic links from the standard core location to the one I want to actually use:
cd {Arduino}/portable/packages/arduino/hardware/samd
mv 1.6.19 1.6.19-original # Save original core
ln -s ~/src/ArduinoCore-samd 1.6.19 # link to core from github
Even windows has an equivalent of symbolic links these days...