Skip to content

Add command line compile instructions, remove Arduino IDE instructions#253

Open
marcone wants to merge 4 commits intowled:mainfrom
marcone:patch-4
Open

Add command line compile instructions, remove Arduino IDE instructions#253
marcone wants to merge 4 commits intowled:mainfrom
marcone:patch-4

Conversation

@marcone
Copy link
Copy Markdown
Contributor

@marcone marcone commented Mar 26, 2025

Summary by CodeRabbit

  • Documentation
    • Reorganized compilation documentation with clearer VS Code and PlatformIO setup instructions
    • Added comprehensive Linux command line compilation guide featuring step-by-step installation, Node.js verification, and build procedures
    • Updated flashing guidance to include paths for both new installations and existing OTA updates

Copy link
Copy Markdown
Member

@netmindz netmindz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great update, just one small tweak

Comment thread docs/advanced/compiling-wled.md Outdated
The .bin and .bin.gz files are located in the subfolder `/build_output/release` in your WLED folder.

ESP32:
If you have an existing WLED install, you can flash the .bin.gz image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow the instructions [here](/basics/install-binary/#flashing-method-2-esptool).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin is more commonly used than bin.gz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.gz is only used for ESP02 (with limited flash size) though it can work on other ESP8266.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to use .gz on my ESP8266 because the .bin wouldn't work. Does .gz not work for all devices? I figured it was sort of the lowest common denominator.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not on ESP32

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I assume this is explained elsewhere, so I just removed the reference to the .bin.gz file here.

@blazoncek
Copy link
Copy Markdown
Contributor

BTW regarding OTA updates: It is also possible to update OTA directly from PIO using correctly configured environment. I.e.

upload_protocol = espota
;upload_port="192.168.xxx.xxx"
upload_port="wled-test.local"

@marcone marcone requested a review from netmindz April 1, 2025 00:47
@netmindz netmindz requested a review from blazoncek June 11, 2025 06:29
Copy link
Copy Markdown
Contributor

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not use/have Linux so really can't comment or verify.
However it is ok to remove ArduinoIDE instructions. Perhaps adding a disclaimer that it is no longer supported would be good.


- Variant has 4MB flash
- Settings as for NodeMCU or Wemos
The .bin and .bin.gz files are located in the subfolder `/build_output/release` in your WLED folder.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files are only copied into release folder if their environment has WLED_RELEASE_NAME macro/constant set.

The .bin and .bin.gz files are located in the subfolder `/build_output/release` in your WLED folder.

ESP32:
If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow the instructions [here](/basics/install-binary/#flashing-method-2-esptool).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious - if you build your firmware within VSCode, why would a user want to manually upload with esptool, and not use the "build and upload" button?

see also #161 (comment)

@softhack007 softhack007 added the needs_rework PR needs improvements before merging label Apr 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Walkthrough

The documentation for WLED compilation is reorganized to prioritize Visual Studio Code with PlatformIO as the primary method. The Arduino IDE section is removed entirely. A new comprehensive Linux command-line compilation guide is added, detailing installation steps for dependencies, PlatformIO setup via official installer, and build procedures specific to Ubuntu environments.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/advanced/compiling-wled.md
Removed Arduino IDE compilation section. Reorganized content under VS Code/PlatformIO guidance with separate subsections for installation, compiling, customization, and flashing. Added detailed Linux command-line build instructions including Ubuntu version specification, dependency installation (git, npm), Node.js verification, PlatformIO core installer setup (with apt warning), repository cloning, and pio run compilation workflow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through docs so fine,
Compilation paths now realigned,
From Arduino's way to VS Code bright,
And Linux trails through build-time night,
Instructions clear, the journey's right! 🏗️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main changes: adding command-line compile instructions and removing Arduino IDE instructions, which are the primary modifications in the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@softhack007

This comment was marked as outdated.

@coderabbitai

This comment was marked as outdated.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
docs/advanced/compiling-wled.md (1)

107-111: ⚡ Quick win

Add language identifier to fenced code blocks.

The code blocks at lines 107-111, 114-117, and 126-128 are missing language identifiers. Add bash or shell to enable syntax highlighting:

-```
+```bash
 curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/advanced/compiling-wled.md` around lines 107 - 111, The fenced code
blocks containing shell commands (e.g., the block with "curl -fsSL -o
get-platformio.py ...", the subsequent "python3 get-platformio.py ..." block,
and the later platformio PATH/commands blocks) lack language identifiers; update
each triple-backtick fence to use "bash" (or "shell") so they become ```bash ...
``` to enable syntax highlighting for the blocks around the PlatformIO install
and PATH instructions referenced in the doc.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/advanced/compiling-wled.md`:
- Line 110: The documentation currently shows a transient PATH change (the line
"PATH=$PATH:$HOME/.platformio/penv/bin/") which only affects the current shell
and will break the pio command in new terminals; update the docs to instruct
users how to make this persistent by exporting that PATH addition in their shell
profile (e.g., ~/.bashrc or ~/.zshrc) or, alternately, explicitly tell users
they must re-run the PATH command in each new session so the pio command remains
available.
- Around line 126-128: Add installation instructions for jq to the "Installing
required software" section so the example pio + jq command won't fail;
specifically, include a line telling users to install jq (e.g., sudo apt install
jq) for Debian/Ubuntu and mention the Homebrew equivalent for macOS (brew
install jq). Update the docs/advanced/compiling-wled.md Installing required
software section and ensure the new line appears before the example that runs
`pio project config --json-output | jq -cr '.[0][1][0][1]'`.
- Line 134: Replace the non-descriptive link text "here" in the sentence about
flashing WLED with a descriptive phrase such as "the esptool flashing
instructions" (or similar) so the link reads: "Otherwise, follow the
instructions the esptool flashing instructions." Update the link target to
remain the same but change the anchor text to the descriptive phrase to improve
accessibility and clarity.
- Line 14: Change the improperly-leveled heading "Compiling using Visual Studio
Code" from an h3 to h2 (use "## Compiling using Visual Studio Code") to restore
heading hierarchy, and make the same change for the "Linux command line" section
heading (convert its current h3 to h2) so both sections follow the document's h1
-> h2 structure.

---

Nitpick comments:
In `@docs/advanced/compiling-wled.md`:
- Around line 107-111: The fenced code blocks containing shell commands (e.g.,
the block with "curl -fsSL -o get-platformio.py ...", the subsequent "python3
get-platformio.py ..." block, and the later platformio PATH/commands blocks)
lack language identifiers; update each triple-backtick fence to use "bash" (or
"shell") so they become ```bash ... ``` to enable syntax highlighting for the
blocks around the PlatformIO install and PATH instructions referenced in the
doc.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 63c32341-b5c4-455f-8b27-026103c7dcd8

📥 Commits

Reviewing files that changed from the base of the PR and between 2e6aef0 and 23ecd1e.

📒 Files selected for processing (1)
  • docs/advanced/compiling-wled.md

If you don't want to change the code but only add some compile options and/or usermods, you can use bot on discord or compile with just few clicks using [this inofficial web based wled compiler](https://wled-compile.github.io/). Using it you can download the resulting .bin file directly or install via USB using built-in web-based installer.

### Preparations
### Compiling using Visual Studio Code
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Heading level skips from h1 to h3.

The document structure jumps from the h1 title to h3 headings. Use h2 (##) for the main section "Compiling using Visual Studio Code" to maintain proper heading hierarchy.

-### Compiling using Visual Studio Code
+## Compiling using Visual Studio Code

Then update the "Linux command line" section similarly:

-### Compiling using the Linux command line
+## Compiling using the Linux command line
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Compiling using Visual Studio Code
## Compiling using Visual Studio Code
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 14-14: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/advanced/compiling-wled.md` at line 14, Change the improperly-leveled
heading "Compiling using Visual Studio Code" from an h3 to h2 (use "## Compiling
using Visual Studio Code") to restore heading hierarchy, and make the same
change for the "Linux command line" section heading (convert its current h3 to
h2) so both sections follow the document's h1 -> h2 structure.

```
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py # if this fails because of missing packages, install the packages it complains about, then retry
PATH=$PATH:$HOME/.platformio/penv/bin/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

PATH modification is not persistent across sessions.

The PATH modification shown only applies to the current shell session. Users will need to re-run this command in each new terminal, or the pio command will not be found.

Consider adding a note to make it persistent by adding the PATH export to the user's shell profile (e.g., ~/.bashrc or ~/.zshrc):

echo 'export PATH=$PATH:$HOME/.platformio/penv/bin/' >> ~/.bashrc
source ~/.bashrc

Or instruct users to re-run the PATH command in each new terminal session.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/advanced/compiling-wled.md` at line 110, The documentation currently
shows a transient PATH change (the line
"PATH=$PATH:$HOME/.platformio/penv/bin/") which only affects the current shell
and will break the pio command in new terminals; update the docs to instruct
users how to make this persistent by exporting that PATH addition in their shell
profile (e.g., ~/.bashrc or ~/.zshrc) or, alternately, explicitly tell users
they must re-run the PATH command in each new session so the pio command remains
available.

Comment on lines +126 to +128
```
pio project config --json-output | jq -cr '.[0][1][0][1]'
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Missing jq installation instruction.

The command uses jq to parse JSON output, but the installation of jq is not documented in the "Installing required software" section. Users will encounter a "command not found" error when running this command.

Add jq to the software installation section:

sudo apt install jq
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 126-126: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/advanced/compiling-wled.md` around lines 126 - 128, Add installation
instructions for jq to the "Installing required software" section so the example
pio + jq command won't fail; specifically, include a line telling users to
install jq (e.g., sudo apt install jq) for Debian/Ubuntu and mention the
Homebrew equivalent for macOS (brew install jq). Update the
docs/advanced/compiling-wled.md Installing required software section and ensure
the new line appears before the example that runs `pio project config
--json-output | jq -cr '.[0][1][0][1]'`.

The .bin and .bin.gz files are located in the subfolder `/build_output/release` in your WLED folder.

ESP32:
If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow the instructions [here](/basics/install-binary/#flashing-method-2-esptool).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use descriptive link text instead of "here".

The link text "here" is not descriptive. For better accessibility and clarity, use descriptive text like "the esptool flashing instructions":

-If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow the instructions [here](/basics/install-binary/#flashing-method-2-esptool).
+If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow [the esptool flashing instructions](/basics/install-binary/#flashing-method-2-esptool).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow the instructions [here](/basics/install-binary/#flashing-method-2-esptool).
If you have an existing WLED install, you can flash the image using the Config -> Security & Updates -> Manual OTA Update option in the web interface. Otherwise, follow [the esptool flashing instructions](/basics/install-binary/#flashing-method-2-esptool).
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 134-134: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/advanced/compiling-wled.md` at line 134, Replace the non-descriptive
link text "here" in the sentence about flashing WLED with a descriptive phrase
such as "the esptool flashing instructions" (or similar) so the link reads:
"Otherwise, follow the instructions the esptool flashing instructions." Update
the link target to remain the same but change the anchor text to the descriptive
phrase to improve accessibility and clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_rework PR needs improvements before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants