#解決したいこと
簡潔に言うとデフォルトパスとして指定されているものを自分のカスタムしたパスに変更したいです。(Macです。)もともと指定されているインクルード先のパスを変更したいのですが、どうしたらよろしいでしょうか。
教えていただけると幸いです。
#調べた内容
今現在Macでarduino.inoをもちいてstm32のボードを開発しています。swdという方法を用いて書き込もうとしていますが,
STM32_Programmer_CLI not found. Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment: https://www.st.com/en/development-tools/stm32cubeprog.html An error occurred while uploading the sketch Aborting!
というエラーが出てしまっています。
これを調べるとこのページがでてきて、読みすすめていくと、
Requirement To use those upload methods, STM32CubeProgrammer have to be installed manually as it is not provided through the tools packages. User can change the default install path but in this case, the new path have to be added in the PATH environment variable. Default path of STM32CubeProgrammer binary: Linux: $HOME/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin Mac: /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin Windows: 32 bits: %ProgramFiles(X86)%\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin 64 bits: %ProgramW6432%\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin To add your custom installation path you can refer to this HowTo
の特に
User can change the default install path but in this case, the new path have to be added in the PATH environment variable.
という箇所がありデフォルトパスを変更するためにはPATH環境変数に追加してくださいと書いてあります。下のところTo add your custom installation path you can refer to this HowToにやり方があると書いてあるのですが、その中の内容を見ても具体的なパスの変更方法が書いてありません。
どなたかわかる方はいらっしゃいますか?
#書き込みたいソースコード
blinkのコードです。
cpp
1/* 2 Blink 3 Turns on an LED on for one second, then off for one second, repeatedly. 4 5 This example code is in the public domain. 6 */ 7 8// Pin 13 has an LED connected on most Arduino boards. 9// Pin 11 has the LED on Teensy 2.0 10// Pin 6 has the LED on Teensy++ 2.0 11// Pin 13 has the LED on Teensy 3.0 12// give it a name: 13int led = 13; 14 15// the setup routine runs once when you press reset: 16void setup() { 17 // initialize the digital pin as an output. 18 pinMode(led, OUTPUT); 19} 20 21// the loop routine runs over and over again forever: 22void loop() { 23 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) 24 delay(1000); // wait for a second 25 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW 26 delay(1000); // wait for a second 27}
# 変更したいデフォルトパスと設定したいカスタムパス
デフォルトパス
/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin
カスタムパス
/Applications/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。