-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore: Arduino CLIやMbed CLIをインストールする #204 * chore: CSellの辞書を更新した #204 * chore: Arduino CLIやMbed CLIをインストール #204 * chore: Arduino CLIやMbed CLIでのビルドテストを追加 #204 * fix: mbedコマンドではなくmbed-cliコマンドを利用する #204 * fix: devcontainer exec を利用する #204 * chore: Dev Container CLIのバージョンを0.50.0に固定する #204 0.50.1ではエラーが発生したため、その前のバージョンに固定する * feat: Mbed CLI 1でのビルドをtmpディレクトリ中で行う #204 * feat: devcontainers/ci を利用したワークフローに変更 #204 * fix: CIの git の safe.directory の設定時のエラーを修正 #204 * chore: テスト中のコマンドの終了ステータスが0以外のときに中断する #204 * fix: コンパイルエラーを修正 #204 * fix: 用意したソースコードでビルドテストするように変更 #204 * chore: multiplatform build #204 * Revert "chore: multiplatform build #204" This reverts commit 4875af0. * chore: ビルド成功時にイメージをpushする #204 * chore: Arduino CLIでのビルド中にログを出力する #204 * fix: `No space left on device`対策を実施 #204 * chore: 削除する容量を増やした #204
- Loading branch information
Showing
9 changed files
with
192 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Arduino CLI のインストールとセットアップをする | ||
# | ||
# 参考: https://arduino.github.io/arduino-cli/0.33/installation/ | ||
|
||
set -eu | ||
|
||
# Arduino CLI に必要なパッケージをインストール | ||
sudo apt-get update | ||
sudo apt-get -y install --no-install-recommends python3 \ | ||
python3-dev \ | ||
python-is-python3 \ | ||
python3-pip | ||
|
||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
|
||
pip3 install pyserial \ | ||
esptool | ||
|
||
# Installing Arduino CLI | ||
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sudo BINDIR=/usr/local/bin sh | ||
|
||
# Setup bash completion | ||
echo 'source <(arduino-cli completion bash)' >>~/.bashrc | ||
|
||
# Install supported boards | ||
arduino-cli config init | ||
|
||
# ESP32 | ||
arduino-cli config add board_manager.additional_urls https://dl.espressif.com/dl/package_esp32_index.json | ||
arduino-cli core update-index | ||
arduino-cli core install esp32:esp32 | ||
|
||
# STM32 | ||
arduino-cli config add board_manager.additional_urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | ||
arduino-cli core update-index | ||
arduino-cli core install STMicroelectronics:stm32 | ||
|
||
# Mbed | ||
arduino-cli core update-index | ||
arduino-cli core install arduino:mbed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# GNU Arm Embedded Toolchain のインストール | ||
# | ||
# 参考: https://developer.arm.com/downloads/-/gnu-rm | ||
|
||
set -eu | ||
|
||
# GNU Arm Embedded Toolchain のバージョン | ||
GCC_ARM_VERSION='10.3-2021.07' | ||
|
||
machine=$(uname -m) | ||
if [ "${machine}" = "x86_64" ] || [ "${machine}" = "aarch64" ]; then | ||
url="https://developer.arm.com/-/media/Files/downloads/gnu-rm/${GCC_ARM_VERSION}/gcc-arm-none-eabi-${GCC_ARM_VERSION}-${machine}-linux.tar.bz2" | ||
else | ||
echo "Unsupported architecture: ${machine}" | ||
exit 1 | ||
fi | ||
|
||
# Check if the file already exists | ||
if [ -f "/usr/local/gcc-arm-none-eabi-${GCC_ARM_VERSION}/bin/arm-none-eabi-gcc" ]; then | ||
echo "gcc-arm-none-eabi-${GCC_ARM_VERSION} is already installed." | ||
exit 0 | ||
fi | ||
|
||
wget "${url}" -P /tmp/ | ||
tar -xvf /tmp/gcc-arm-none-eabi-${GCC_ARM_VERSION}-*-linux.tar.bz2 -C /tmp/ | ||
sudo mv /tmp/gcc-arm-none-eabi-${GCC_ARM_VERSION} /usr/local/ | ||
rm /tmp/gcc-arm-none-eabi-${GCC_ARM_VERSION}-*-linux.tar.bz2 | ||
|
||
echo 'export PATH=${PATH}:/usr/local/gcc-arm-none-eabi-'${GCC_ARM_VERSION}'/bin' >> ~/.bashrc | ||
export PATH=/usr/local/gcc-arm-none-eabi-${GCC_ARM_VERSION}/bin:${PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Mbed CLI 1 のインストール | ||
# | ||
# 参考: https://os.mbed.com/docs/mbed-os/v6.16/build-tools/install-and-set-up.html | ||
|
||
set -eu | ||
|
||
# Check if gcc-arm-none-eabi is installed | ||
if ! command -v arm-none-eabi-gcc &> /dev/null | ||
then | ||
echo "Error: gcc-arm-none-eabi is not installed. Please install it and try again." | ||
exit 1 | ||
fi | ||
|
||
# Mbed CLI 1 に必要なパッケージをインストール | ||
sudo apt-get update | ||
sudo apt-get -y install --no-install-recommends python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
git \ | ||
mercurial | ||
|
||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
|
||
# Installing Mbed CLI 1 | ||
python3 -m pip install mbed-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Mbed CLI 2 のインストール | ||
# | ||
# 参考: https://os.mbed.com/docs/mbed-os/v6.16/build-tools/install-or-upgrade.html | ||
# | ||
|
||
set -eu | ||
|
||
# Check if gcc-arm-none-eabi is installed | ||
if ! command -v arm-none-eabi-gcc &> /dev/null | ||
then | ||
echo "Error: gcc-arm-none-eabi is not installed. Please install it and try again." | ||
exit 1 | ||
fi | ||
|
||
# Mbed CLI 2 に必要なパッケージをインストール | ||
sudo apt-get update | ||
sudo apt-get -y install --no-install-recommends python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
ninja-build \ | ||
cmake | ||
|
||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
|
||
# Installing Mbed CLI 2 | ||
python3 -m pip install mbed-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters