mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-03-09 05:20:21 +00:00
Add sdkconfig.defaults and tasks.py for project configuration and build automation
- Created sdkconfig.defaults to store default configuration settings for the project. - Added tasks.py to define various build and management tasks using Invoke
This commit is contained in:
parent
3a5cf2ff22
commit
4d8be45e48
5 changed files with 57 additions and 2286 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -15,6 +15,7 @@ cmake_install.cmake
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|
||||||
# ESP-IDF specific
|
# ESP-IDF specific
|
||||||
|
sdkconfig
|
||||||
sdkconfig.old
|
sdkconfig.old
|
||||||
flasher_args.json
|
flasher_args.json
|
||||||
flash_args*
|
flash_args*
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
esp-idf
|
esp-idf
|
||||||
|
pkgs.python3
|
||||||
|
pkgs.python3Packages.invoke
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
4
sdkconfig.defaults
Normal file
4
sdkconfig.defaults
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# This file was generated using idf.py save-defconfig. It can be edited manually.
|
||||||
|
# Espressif IoT Development Framework (ESP-IDF) 5.5.2 Project Minimal Configuration
|
||||||
|
#
|
||||||
|
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||||
50
tasks.py
Normal file
50
tasks.py
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
from invoke import task
|
||||||
|
|
||||||
|
@task
|
||||||
|
def cleanbuild(c):
|
||||||
|
"""Clean build: fullclean and build the project"""
|
||||||
|
c.run("idf.py fullclean")
|
||||||
|
c.run("idf.py build")
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def build(c):
|
||||||
|
"""Build the project"""
|
||||||
|
c.run("idf.py build")
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def flash(c):
|
||||||
|
"""Flash the project to device"""
|
||||||
|
c.run("idf.py flash")
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def monitor(c, port="/dev/ttyUSB0"):
|
||||||
|
"""Monitor serial output from device"""
|
||||||
|
c.run(f"idf.py monitor -p {port}")
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def run(c, port="/dev/ttyUSB0"):
|
||||||
|
"""Build, flash, and monitor in sequence"""
|
||||||
|
build(c)
|
||||||
|
flash(c)
|
||||||
|
monitor(c, port)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def clean(c):
|
||||||
|
"""Clean build artifacts"""
|
||||||
|
c.run("idf.py fullclean")
|
||||||
|
|
||||||
|
@task
|
||||||
|
def config(c):
|
||||||
|
"""Open menuconfig to edit project settings"""
|
||||||
|
c.run("idf.py menuconfig --color-scheme=monochrome", pty=True)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def saveconfig(c):
|
||||||
|
"""Save current config as sdkconfig.defaults"""
|
||||||
|
c.run("idf.py save-defconfig")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue