Skip to content

Commit

Permalink
PSRAM無効化のsedコマンドのバリエーションにmac向けの条件を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
KuraZuzu committed Jan 8, 2025
1 parent b6f6fc6 commit 8d88328
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions firmware/setting_scripts/setting_unset_psram.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# 設定ファイルパスを取得
SDKCONFIG="$HOME/.local/share/moddable/build/devices/esp32/targets/m5stack_cores3/sdkconfig/sdkconfig.defaults"

# PSRAMを無効化
sed -i 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' $SDKCONFIG
cat $SDKCONFIG
# macOS と Linux の sed コマンドの互換性を考慮
if [ "$(uname)" = "Darwin" ]; then
# macOS 用
sed -i '' 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
else
# Linux 用
sed -i 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
fi

# 結果を表示
cat "$SDKCONFIG"

0 comments on commit 8d88328

Please sign in to comment.