diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index cee8df6..b3068d0 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/actions/setup - name: Bundle if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true' - run: source $HOME/.local/share/xs-dev-export.sh && npm run bundle + run: source $HOME/.local/share/xs-dev-export.sh && sh ./setting_scripts/unset_psram.sh && npm run bundle working-directory: ./firmware - name: Upload Firmware Bundle if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true' diff --git a/README.md b/README.md index 2011a47..5d2d87a 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,11 @@ This repository includes the following contents. * For Windows: [(WSL2) Windows 11 Stack-chan Environment Setup Manual (Japanese)](firmware/docs/getting-started-wsl2_ja.md) * For MacOS/Linux: [Getting Started (MacOS/Linux)](./firmware/docs/getting-started.md) * For Web: Follow the steps below (Reference: [Tried Flashing a Program to Stack-chan via Web Browser (Japanese)](https://rt-net.jp/humanoid/archives/5907)): - 1. Access the web-flash page from your PC. + 1. Access the [web-flah page](https://rt-net.github.io/stack-chan/web/flash/) from your PC. 2. Connect Stack-chan to the PC using a cable. - 3. Select `M5Stack CoreS3`. - 4. Press the `Flash Stack-chan firmware [・_・]` button. + 3. Hold the reset button on the bottom of the M5Stack for 3 seconds to switch to BOOT mode (a green light will appear near the reset button). + 4. Select `M5Stack CoreS3`. + 5. Press the `Flash Stack-chan firmware [・_・]` button. ## Contribution diff --git a/README_ja.md b/README_ja.md index 81eaafa..fdd8890 100644 --- a/README_ja.md +++ b/README_ja.md @@ -57,8 +57,9 @@ * Webの場合:以下の手順を実行(参考:[Webブラウザからスタックチャンにプログラムを書き込んでみた](https://rt-net.jp/humanoid/archives/5907)) 1. PCから[web-flahページ](https://rt-net.github.io/stack-chan/web/flash/)にアクセス 2. スタックチャンとPCをケーブルで接続 - 3. `M5Stack CoreS3`を選択 - 4. `Flash Stack-chan firmware [・_・]`ボタンを押下 + 3. M5Stackの下部にあるリセットボタンを3秒以上押し続けてBOOTモードに切替(切り替わるとリセットボタン付近が緑色に光ります) + 4. `M5Stack CoreS3`を選択 + 5. `Flash Stack-chan firmware [・_・]`ボタンを押下 ## コントリビューション diff --git a/firmware/docs/getting-started-wsl2_ja.md b/firmware/docs/getting-started-wsl2_ja.md index 3d729f6..a3b58fb 100644 --- a/firmware/docs/getting-started-wsl2_ja.md +++ b/firmware/docs/getting-started-wsl2_ja.md @@ -143,9 +143,7 @@ $ curl https://get.volta.sh | bash -インストールに成功すると`success: Setup complete. Open a new terminal to start using Volta!`と表示され、新しいターミナルを開始するように促されます。 - -Ubuntuのウインドウを閉じ、Windows11のスタートメニューからUbuntuを再起動してください。 +インストールに成功すると`success: Setup complete. Open a new terminal to start using Volta!`と表示され、新しいターミナルを開くように指示されますが、環境を反映するには、Ubuntuのウインドウを閉じ、Windows11のスタートメニューからUbuntuを再起動してください。 ### `Volta`から`Node.js`と`npm`をインストール @@ -249,6 +247,12 @@ $ ./setting_scripts/set_xs-dev_env.sh ### 構築した環境の確認 +Ubuntuを度再起動(Ubuntuのウインドウを閉じてから再度開く)し、以下の`cd`コマンドで作業フォルダを移動してください。 + +```bash +$ cd stack-chan/firmware` +``` + #### Moddableの環境確認 以下のコマンドでModdableの環境のテストをします。 diff --git a/firmware/docs/getting-started.md b/firmware/docs/getting-started.md index fbac210..b5022eb 100644 --- a/firmware/docs/getting-started.md +++ b/firmware/docs/getting-started.md @@ -90,7 +90,9 @@ By completing these steps, your shell environment will be configured correctly f ## Test the environment -You can test your environment with the `npm run doctor` command. +You can test your environment with the `npm run doctor` command. +This command needs to be executed from the `stack-chan/firmware` directory. + If the installation is successful, 4.9.5 will be displayed as the version of Moddable SDK as shown below, and esp32 will be displayed in Supported target devices. ```console diff --git a/firmware/docs/getting-started_ja.md b/firmware/docs/getting-started_ja.md index 9ea2c58..69bb719 100644 --- a/firmware/docs/getting-started_ja.md +++ b/firmware/docs/getting-started_ja.md @@ -75,17 +75,22 @@ xs-dev(CLI)でうまくセットアップできない場合はこちらを $ ./setting_scripts/unset_psram.sh ``` -次のコマンドを実行し、Shellの設定ファイルに`source ~/.local/share/xs-dev-export.sh`を追加します。これにより、Shellの起動時に環境変数を設定されます。 +次のコマンドを実行し、Shellの設定ファイルに`source ~/.local/share/xs-dev-export.sh`を追加します。これにより、Shellの起動時に環境変数が設定されます。 ```console $ ./setting_scripts/set_xs-dev_env.sh ``` +ここまで完了したら、ターミナルを再起動してください。 + ## 環境のテスト `npm run doctor`コマンドで環境のテストができます。 +コマンドは、`stack-chan/firmware`配下で実行する必要があります。 + インストールに成功していれば次のようにModdable SDKのバージョンとして4.9.5が表示され、Supported target devicesにesp32が表示されます。 + ```console $ npm run doctor diff --git a/firmware/package-lock.json b/firmware/package-lock.json index 2d5e3ce..7610db4 100644 --- a/firmware/package-lock.json +++ b/firmware/package-lock.json @@ -1,12 +1,12 @@ { "name": "stack-chan", - "version": "0.2.1", + "version": "2.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stack-chan", - "version": "0.2.1", + "version": "2.1.1", "license": "Apache-2.0", "devDependencies": { "@ffmpeg/core": "^0.11.0", diff --git a/firmware/package.json b/firmware/package.json index b32faf3..6545d15 100644 --- a/firmware/package.json +++ b/firmware/package.json @@ -1,6 +1,6 @@ { "name": "stack-chan", - "version": "0.2.1", + "version": "2.1.1", "description": "A firmware of M5Stack Stack-chan module", "main": "stackchan/main.ts", "scripts": { diff --git a/firmware/setting_scripts/set_xs-dev_env.sh b/firmware/setting_scripts/set_xs-dev_env.sh index 26663b1..2377efc 100755 --- a/firmware/setting_scripts/set_xs-dev_env.sh +++ b/firmware/setting_scripts/set_xs-dev_env.sh @@ -1,12 +1,12 @@ #!/bin/sh -# 追記するコマンドを設定 +# Define the command to append XS_DEV_SH="source ~/.local/share/xs-dev-export.sh" -# 現在のシェルを取得 +# Get the current shell CURRENT_SHELL=$(basename "$SHELL") -# 設定ファイルを決定 +# Determine the configuration file if [ "$CURRENT_SHELL" = "bash" ]; then CONFIG_FILE="$HOME/.bashrc" elif [ "$CURRENT_SHELL" = "zsh" ]; then @@ -16,17 +16,17 @@ else exit 1 fi -# 設定ファイルが存在しない場合は作成 +# Create the configuration file if it doesn't exist if [ ! -f "$CONFIG_FILE" ]; then touch "$CONFIG_FILE" echo "# Created $CONFIG_FILE for $CURRENT_SHELL settings" >> "$CONFIG_FILE" echo "$CONFIG_FILE was created." fi -# ファイルに追記 +# Append the command to the file if grep -Fxq "$XS_DEV_SH" "$CONFIG_FILE"; then echo "The string '$XS_DEV_SH' already exists in $CONFIG_FILE. No changes made." else echo "$XS_DEV_SH" >> "$CONFIG_FILE" echo "The string '$XS_DEV_SH' has been added to $CONFIG_FILE." -fi \ No newline at end of file +fi diff --git a/firmware/setting_scripts/unset_psram.sh b/firmware/setting_scripts/unset_psram.sh index df038c5..143d3b7 100755 --- a/firmware/setting_scripts/unset_psram.sh +++ b/firmware/setting_scripts/unset_psram.sh @@ -1,16 +1,16 @@ #!/bin/sh -# 設定ファイルパスを取得 +# Get the path to the configuration file SDKCONFIG="$HOME/.local/share/moddable/build/devices/esp32/targets/m5stack_cores3/sdkconfig/sdkconfig.defaults" -# macOS と Linux の sed コマンドの互換性を考慮 +# Ensure compatibility between macOS and Linux sed command if [ "$(uname)" = "Darwin" ]; then - # macOS 用 + # macOS sed -i '' 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG" else - # Linux 用 + # Linux sed -i 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG" fi -# 結果を表示 +# Display the result cat "$SDKCONFIG" diff --git a/web/flash/manifest_esp32_m5stack_cores3.json b/web/flash/manifest_esp32_m5stack_cores3.json index a4b9bc4..72c3749 100644 --- a/web/flash/manifest_esp32_m5stack_cores3.json +++ b/web/flash/manifest_esp32_m5stack_cores3.json @@ -1,6 +1,6 @@ { "name": "Stack-chan", - "version": "1.0.0", + "version": "2.1.1", "builds": [ { "chipFamily": "ESP32-S3",