「Guide:Marlin/en」の版間の差分
(ページの作成:「== Install PlatformIO == {{terminal|text= root_dir=$PWD export PLATFORMIO_CORE_DIR=$root_dir/pio git clone https://github.com/platformio/platformio-core-installer cd plat…」) |
(ページの作成:「Optional: commit the changes, and do this every time the config is changed. Provide a description of the changes. {{terminal|text= cd $root_dir/marlin git add Marlin git…」) |
||
(同じ利用者による、間の5版が非表示) | |||
7行目: | 7行目: | ||
}} |
}} |
||
+ | == Clone Marlin == |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
+ | We clone the version 2.1.2.1, the latest at the time of writing this guide. |
||
− | == Marlin をクローンする == |
||
− | このガイドの作成時点で最新であるバージョン 2.1.2.1 のクローンを作成します。 |
||
{{terminal|text= |
{{terminal|text= |
||
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Marlin marlin |
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Marlin marlin |
||
cd $root_dir |
cd $root_dir |
||
}} |
}} |
||
− | </div> |
||
+ | Clone example configurations (also for version 2.1.2.1), so we don't have to start from scratch. |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | また、サンプル (バージョン 2.1.2.1 用) のクローンも作成するので、最初から開始する必要はありません。 |
||
{{terminal|text= |
{{terminal|text= |
||
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Configurations config |
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Configurations config |
||
}} |
}} |
||
− | </div> |
||
+ | == Find PlatformIO environment == |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
+ | Find the environment (a build preset/toolchain) to use with PlatformIO. We're compiling for Ender 3 v4.2.2 board, so use <code>STM32F103RE_creality</code> in "Build with PlatformIO" section. |
||
− | == PlatformIO プリセットを見つける == |
||
− | Ender 3 v4.2.2 ボード用にコンパイルしているため、「PlatformIO で構築する」で <code>STM32F103RE_creality</code> を使用します。 |
||
− | </div> |
||
+ | If your printer or motherboard version is different, proceed with the steps below. |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | プリンターまたはマザーボードのバージョンが異なる場合は、以下の手順に進みます。 |
||
− | </div> |
||
+ | Search for similar lines in <code>./Marlin/src/pins/pins.h</code> file: |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | <code>./Marlin/src/pins/pins.h</code> ファイルで類似の行を検索します: |
||
{{terminal|text= |
{{terminal|text= |
||
grep CREALITY_V422 marlin/Marlin/src/pins/pins.h |
grep CREALITY_V422 marlin/Marlin/src/pins/pins.h |
||
− | </div> |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
./Marlin/src/pins/pins.h:575: #include "stm32f1/pins_CREALITY_V422.h" |
./Marlin/src/pins/pins.h:575: #include "stm32f1/pins_CREALITY_V422.h" |
||
/ STM32F1 |
/ STM32F1 |
||
47行目: | 36行目: | ||
/ env:STM32F103RE_creality_maple |
/ env:STM32F103RE_creality_maple |
||
}} |
}} |
||
− | </div> |
||
+ | Choose the one that matches your board. |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | ボードに合ったものをお選びください。 |
||
− | </div> |
||
+ | == Configure == |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
+ | Optional: create a git branch specific for this printer, so all changes can be tracked and updated easily. |
||
− | == 設定 == |
||
− | オプション: このプリンターに固有の git ブランチを作成して、すべての変更を簡単に追跡および更新できるようにします。 |
||
{{terminal|text= |
{{terminal|text= |
||
cd $root_dir/marlin |
cd $root_dir/marlin |
||
git checkout -b ender-3 |
git checkout -b ender-3 |
||
}} |
}} |
||
− | </div> |
||
+ | Use the example config: |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | サンプルファイルを使用する。 |
||
{{terminal|text= |
{{terminal|text= |
||
cp $root_dir/config/config/examples/Creality/Ender-3/CrealityV422/{_Bootscreen.h,Configuration_adv.h,Configuration.h,_Statusscreen.h} marlin/Marlin/ |
cp $root_dir/config/config/examples/Creality/Ender-3/CrealityV422/{_Bootscreen.h,Configuration_adv.h,Configuration.h,_Statusscreen.h} marlin/Marlin/ |
||
}} |
}} |
||
− | </div> |
||
+ | Optional: commit the changes, and do this every time the config is changed. Provide a description of the changes. |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | オプション: 変更をコミットし、構成が変更されるたびにこれを実行します。 変更の説明を入力します。 |
||
{{terminal|text= |
{{terminal|text= |
||
cd $root_dir/marlin |
cd $root_dir/marlin |
||
76行目: | 57行目: | ||
git commit -m "Ender 3 example config" |
git commit -m "Ender 3 example config" |
||
}} |
}} |
||
− | </div> |
||
+ | == Build with PlatformIO == |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | + | Use the PlatformIO environment that we found before. |
|
− | 以前に見つけた PlatformIO プリセットを使用します。 |
||
{{terminal|text= |
{{terminal|text= |
||
cd $root_dir/marlin |
cd $root_dir/marlin |
||
$root_dir/pio/penv/bin/platformio run -e STM32F103RE_creality |
$root_dir/pio/penv/bin/platformio run -e STM32F103RE_creality |
||
}} |
}} |
||
− | </div> |
||
+ | This builds a firmware file, and you can find it in the compilation output log: |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
− | これによりファームウェア ファイルがビルドされ、コンパイル出力ログで確認できます: |
||
{{terminal|text= |
{{terminal|text= |
||
RAM: [= ] 11.6% (used 7592 bytes from 65536 bytes) |
RAM: [= ] 11.6% (used 7592 bytes from 65536 bytes) |
||
94行目: | 71行目: | ||
Building .pio/build/STM32F103RE_creality/firmware-20231008-230629.bin |
Building .pio/build/STM32F103RE_creality/firmware-20231008-230629.bin |
||
}} |
}} |
||
− | </div> |
||
+ | == Installation == |
||
− | <div lang="ja" dir="ltr" class="mw-content-ltr"> |
||
+ | Copy <code>.pio/build/STM32F103RE_creality/firmware-20231008-230629.bin</code> to |
||
− | == インストール == |
||
+ | the SD card. Do not rename it, otherwise the printer may refuse to update if the name is the same as the current firmware. |
||
− | <code>.pio/build/STM32F103RE_creality/firmware-20231008-230629.bin</code>をSDカードにコピーします。 名前を変更しないでください。名前が現在のファームウェアと同じ場合、プリンタがアップデートを拒否する可能性があります。SDカードを挿入し、プリンターをリセットします。 起動中に自動的に更新されるはずです。 |
||
+ | |||
− | </div> |
||
+ | Insert the SD card and reset the printer. It should update itself during the boot. |
2024年1月30日 (火) 08:54時点における最新版
Install PlatformIO
root_dir=$PWD export PLATFORMIO_CORE_DIR=$root_dir/pio git clone https://github.com/platformio/platformio-core-installer cd platformio-core-installer && python3 get-platformio.py
Clone Marlin
We clone the version 2.1.2.1, the latest at the time of writing this guide.
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Marlin marlin cd $root_dir
Clone example configurations (also for version 2.1.2.1), so we don't have to start from scratch.
git clone -b 2.1.2.1 https://github.com/MarlinFirmware/Configurations config
Find PlatformIO environment
Find the environment (a build preset/toolchain) to use with PlatformIO. We're compiling for Ender 3 v4.2.2 board, so use STM32F103RE_creality
in "Build with PlatformIO" section.
If your printer or motherboard version is different, proceed with the steps below.
Search for similar lines in ./Marlin/src/pins/pins.h
file:
grep CREALITY_V422 marlin/Marlin/src/pins/pins.h ./Marlin/src/pins/pins.h:575: #include "stm32f1/pins_CREALITY_V422.h" / STM32F1 / env:STM32F103RE_creality / env:STM32F103RE_creality_xfer / env:STM32F103RC_creality / env:STM32F103RC_creality_xfer / env:STM32F103RE_creality_maple
Choose the one that matches your board.
Configure
Optional: create a git branch specific for this printer, so all changes can be tracked and updated easily.
cd $root_dir/marlin git checkout -b ender-3
Use the example config:
cp $root_dir/config/config/examples/Creality/Ender-3/CrealityV422/{_Bootscreen.h,Configuration_adv.h,Configuration.h,_Statusscreen.h} marlin/Marlin/
Optional: commit the changes, and do this every time the config is changed. Provide a description of the changes.
cd $root_dir/marlin git add Marlin git commit -m "Ender 3 example config"
Build with PlatformIO
Use the PlatformIO environment that we found before.
cd $root_dir/marlin $root_dir/pio/penv/bin/platformio run -e STM32F103RE_creality
This builds a firmware file, and you can find it in the compilation output log:
RAM: [= ] 11.6% (used 7592 bytes from 65536 bytes) Flash: [=== ] 27.2% (used 142600 bytes from 524288 bytes) Building .pio/build/STM32F103RE_creality/firmware-20231008-230629.bin
Installation
Copy .pio/build/STM32F103RE_creality/firmware-20231008-230629.bin
to
the SD card. Do not rename it, otherwise the printer may refuse to update if the name is the same as the current firmware.
Insert the SD card and reset the printer. It should update itself during the boot.