Skip to content

Commit 1ba0ebf

Browse files
authored
Web書き込み機能の不具合修正 (#23)
* web-flash用のファームウェアビルド時にPSRAMを無効化する処理を追加 * 英語版のREADME.mdにもweb-flashページのURLを追加 * バージョン情報を更新 * web-flashにリセットボタンを押す手順を追加 * 設定スクリプトのコメントを日本語から英語に変更 * 設定スクリプトを実行後にターミナルセッションを再起動するように手順を追加 * WSL2のマニュアルで、いきなりターミナルという単語が出ているのでUbuntuに変更 * Voltaインストール後のターミナル再起動に関する文章を修正
1 parent eb60475 commit 1ba0ebf

11 files changed

+39
-26
lines changed

.github/workflows/bundle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: ./.github/actions/setup
2929
- name: Bundle
3030
if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true'
31-
run: source $HOME/.local/share/xs-dev-export.sh && npm run bundle
31+
run: source $HOME/.local/share/xs-dev-export.sh && sh ./setting_scripts/unset_psram.sh && npm run bundle
3232
working-directory: ./firmware
3333
- name: Upload Firmware Bundle
3434
if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true'

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ This repository includes the following contents.
5353
* For Windows: [(WSL2) Windows 11 Stack-chan Environment Setup Manual (Japanese)](firmware/docs/getting-started-wsl2_ja.md)
5454
* For MacOS/Linux: [Getting Started (MacOS/Linux)](./firmware/docs/getting-started.md)
5555
* 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)):
56-
1. Access the web-flash page from your PC.
56+
1. Access the [web-flah page](https://rt-net.github.io/stack-chan/web/flash/) from your PC.
5757
2. Connect Stack-chan to the PC using a cable.
58-
3. Select `M5Stack CoreS3`.
59-
4. Press the `Flash Stack-chan firmware [・_・]` button.
58+
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).
59+
4. Select `M5Stack CoreS3`.
60+
5. Press the `Flash Stack-chan firmware [・_・]` button.
6061

6162
## Contribution
6263

README_ja.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
* Webの場合:以下の手順を実行(参考:[Webブラウザからスタックチャンにプログラムを書き込んでみた](https://rt-net.jp/humanoid/archives/5907)
5858
1. PCから[web-flahページ](https://rt-net.github.io/stack-chan/web/flash/)にアクセス
5959
2. スタックチャンとPCをケーブルで接続
60-
3. `M5Stack CoreS3`を選択
61-
4. `Flash Stack-chan firmware [・_・]`ボタンを押下
60+
3. M5Stackの下部にあるリセットボタンを3秒以上押し続けてBOOTモードに切替(切り替わるとリセットボタン付近が緑色に光ります)
61+
4. `M5Stack CoreS3`を選択
62+
5. `Flash Stack-chan firmware [・_・]`ボタンを押下
6263

6364
## コントリビューション
6465

firmware/docs/getting-started-wsl2_ja.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ $ curl https://get.volta.sh | bash
143143

144144
<img src="images/getting-started-wsl2_ja/volta_reboot.jpg" width="100%">
145145

146-
インストールに成功すると`success: Setup complete. Open a new terminal to start using Volta!`と表示され、新しいターミナルを開始するように促されます。
147-
148-
Ubuntuのウインドウを閉じ、Windows11のスタートメニューからUbuntuを再起動してください。
146+
インストールに成功すると`success: Setup complete. Open a new terminal to start using Volta!`と表示され、新しいターミナルを開くように指示されますが、環境を反映するには、Ubuntuのウインドウを閉じ、Windows11のスタートメニューからUbuntuを再起動してください。
149147

150148
### `Volta`から`Node.js``npm`をインストール
151149

@@ -249,6 +247,12 @@ $ ./setting_scripts/set_xs-dev_env.sh
249247

250248
### 構築した環境の確認
251249

250+
Ubuntuを度再起動(Ubuntuのウインドウを閉じてから再度開く)し、以下の`cd`コマンドで作業フォルダを移動してください。
251+
252+
```bash
253+
$ cd stack-chan/firmware`
254+
```
255+
252256
#### Moddableの環境確認
253257

254258
以下のコマンドでModdableの環境のテストをします。

firmware/docs/getting-started.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ By completing these steps, your shell environment will be configured correctly f
9090

9191
## Test the environment
9292

93-
You can test your environment with the `npm run doctor` command.
93+
You can test your environment with the `npm run doctor` command.
94+
This command needs to be executed from the `stack-chan/firmware` directory.
95+
9496
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.
9597

9698
```console

firmware/docs/getting-started_ja.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,22 @@ xs-dev(CLI)でうまくセットアップできない場合はこちらを
7575
$ ./setting_scripts/unset_psram.sh
7676
```
7777

78-
次のコマンドを実行し、Shellの設定ファイルに`source ~/.local/share/xs-dev-export.sh`を追加します。これにより、Shellの起動時に環境変数を設定されます
78+
次のコマンドを実行し、Shellの設定ファイルに`source ~/.local/share/xs-dev-export.sh`を追加します。これにより、Shellの起動時に環境変数が設定されます
7979

8080
```console
8181
$ ./setting_scripts/set_xs-dev_env.sh
8282
```
8383

84+
ここまで完了したら、ターミナルを再起動してください。
85+
8486
## 環境のテスト
8587

8688
`npm run doctor`コマンドで環境のテストができます。
89+
コマンドは、`stack-chan/firmware`配下で実行する必要があります。
90+
8791
インストールに成功していれば次のようにModdable SDKのバージョンとして4.9.5が表示され、Supported target devicesにesp32が表示されます。
8892

93+
8994
```console
9095
$ npm run doctor
9196

firmware/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firmware/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stack-chan",
3-
"version": "0.2.1",
3+
"version": "2.1.1",
44
"description": "A firmware of M5Stack Stack-chan module",
55
"main": "stackchan/main.ts",
66
"scripts": {
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
22

3-
# 追記するコマンドを設定
3+
# Define the command to append
44
XS_DEV_SH="source ~/.local/share/xs-dev-export.sh"
55

6-
# 現在のシェルを取得
6+
# Get the current shell
77
CURRENT_SHELL=$(basename "$SHELL")
88

9-
# 設定ファイルを決定
9+
# Determine the configuration file
1010
if [ "$CURRENT_SHELL" = "bash" ]; then
1111
CONFIG_FILE="$HOME/.bashrc"
1212
elif [ "$CURRENT_SHELL" = "zsh" ]; then
@@ -16,17 +16,17 @@ else
1616
exit 1
1717
fi
1818

19-
# 設定ファイルが存在しない場合は作成
19+
# Create the configuration file if it doesn't exist
2020
if [ ! -f "$CONFIG_FILE" ]; then
2121
touch "$CONFIG_FILE"
2222
echo "# Created $CONFIG_FILE for $CURRENT_SHELL settings" >> "$CONFIG_FILE"
2323
echo "$CONFIG_FILE was created."
2424
fi
2525

26-
# ファイルに追記
26+
# Append the command to the file
2727
if grep -Fxq "$XS_DEV_SH" "$CONFIG_FILE"; then
2828
echo "The string '$XS_DEV_SH' already exists in $CONFIG_FILE. No changes made."
2929
else
3030
echo "$XS_DEV_SH" >> "$CONFIG_FILE"
3131
echo "The string '$XS_DEV_SH' has been added to $CONFIG_FILE."
32-
fi
32+
fi
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/sh
22

3-
# 設定ファイルパスを取得
3+
# Get the path to the configuration file
44
SDKCONFIG="$HOME/.local/share/moddable/build/devices/esp32/targets/m5stack_cores3/sdkconfig/sdkconfig.defaults"
55

6-
# macOS Linux sed コマンドの互換性を考慮
6+
# Ensure compatibility between macOS and Linux sed command
77
if [ "$(uname)" = "Darwin" ]; then
8-
# macOS
8+
# macOS
99
sed -i '' 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
1010
else
11-
# Linux
11+
# Linux
1212
sed -i 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
1313
fi
1414

15-
# 結果を表示
15+
# Display the result
1616
cat "$SDKCONFIG"

web/flash/manifest_esp32_m5stack_cores3.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Stack-chan",
3-
"version": "1.0.0",
3+
"version": "2.1.1",
44
"builds": [
55
{
66
"chipFamily": "ESP32-S3",

0 commit comments

Comments
 (0)