mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
2.2 KiB
2.2 KiB
Using the PlatformIO IDE
- Download Git (install using the default settings)
- Download and install Visual Studio Code (VSC)
- Restart the PC (if using Windows) to apply the new PATH settings. It should now detect Git
- Install the VSC extension "PlatformIO IDE"
- Git clone this repo with "git clone" from the command palette and using the URL https://github.com/proddy/EMS-ESP.git
- Install NodeJS from here.
- Test if Node is installed correctly by
node --version(both v10 and v12 are ok) - Install the modules in the
tools/webfilesbuilderfolder with:
cd tools/webfilesbuilder
npm ci
- Check you can build the web files by typing
node node_modules/gulp/bin/gulp.jsfrom thewebfilesbuilderfolder. - Finally use the build targets in PlatformIO's to build & upload.
If you seeing fatal errors in the npm install and came from an earlier build then you'll may need to refresh the library, like
- Remove the local
node_modules - Clean npm cache by
npm cache verify - Update the global npm by
sudo npm ci -g npm - Reinstall the local
node_modulesbynpm ci
Using Linux CLI
- Install python:
sudo apt install python-pip
- Install PlatformIO (see https://docs.platformio.org/en/latest/installation.html):
python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)"
- Edit
~/.profileand add:export PATH=$PATH:~/.platformio/penv/binto the end, thenexit, and start a new shell - Update platformio and its libraries
platformio platform update
platformio lib update
- Grab the EMS-ESP source code:
git clone https://github.com/proddy/EMS-ESP.git
(use git clone --branch=dev https://github.com/proddy/EMS-ESP.git for dev builds)
- Install NodeJS. See instructions here.
- Install the EMS-ESP's web builder components
cd EMS-ESP/tools/webfilesbuilder
npm ci
cd ../..
- Build the firmware image:
pio run
- Upload to firmware image. This uses OTA as default. Change
platformio.iniif using USB
pio run -t upload