esp-idf
The idf.py command-line tool provides a front-end to easily manage your project builds, deployment, debugging and more. It manages CMake, Ninja and esptool.py.Installation
dagger install github.com/alanmosely/daggerverse/esp-idf@v0.0.5Entrypoint
Return Type
EspIdf ! Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@3019cda0c10fcfca32156c47be102d2d897f2848 call \
func (m *MyModule) Example() *dagger.EspIdf {
return dag.
EspIdf()
}@function
def example() -> dagger.EspIdf:
return (
dag.esp_idf()
)@func()
example(): EspIdf {
return dag
.espIdf()
}Types
EspIdf 🔗
config() 🔗
Execute “idf.py menuconfig” from the official Espressif IDF or ADF Docker image
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| projectDir | Directory ! | - | The directory containing the ESP-IDF project |
| adfVersion | String | null | The Espressif ADF image tag or full image reference to use; if set, idf_version is ignored |
| idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
| interactive | Boolean ! | true | Whether to allocate a TTY for menuconfig |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@3019cda0c10fcfca32156c47be102d2d897f2848 call \
config --project-dir DIR_PATH --idf-version string --interactive booleanfunc (m *MyModule) Example(ctx context.Context, projectDir *dagger.Directory, idfVersion string, interactive bool) string {
return dag.
EspIdf().
Config(ctx, projectDir, idfVersion, interactive)
}@function
async def example(project_dir: dagger.Directory, idf_version: str, interactive: bool) -> str:
return await (
dag.esp_idf()
.config(project_dir, idf_version, interactive)
)@func()
async example(projectDir: Directory, idfVersion: string, interactive: boolean): Promise<string> {
return dag
.espIdf()
.config(projectDir, idfVersion, interactive)
}docs() 🔗
Execute “idf.py docs” from the official Espressif IDF Docker image
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| projectDir | Directory ! | - | The directory containing the ESP-IDF project |
| idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@3019cda0c10fcfca32156c47be102d2d897f2848 call \
docs --project-dir DIR_PATH --idf-version stringfunc (m *MyModule) Example(ctx context.Context, projectDir *dagger.Directory, idfVersion string) string {
return dag.
EspIdf().
Docs(ctx, projectDir, idfVersion)
}@function
async def example(project_dir: dagger.Directory, idf_version: str) -> str:
return await (
dag.esp_idf()
.docs(project_dir, idf_version)
)@func()
async example(projectDir: Directory, idfVersion: string): Promise<string> {
return dag
.espIdf()
.docs(projectDir, idfVersion)
}flash() 🔗
Execute “idf.py flash” from the official Espressif IDF or ADF Docker image using the rfc2217 protocol to connect to the host machine’s serial port
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| projectDir | Directory ! | - | The directory containing the ESP-IDF project |
| adfVersion | String | null | The Espressif ADF image tag or full image reference to use; if set, idf_version is ignored |
| idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
| serialHost | String ! | "host.docker.internal" | RFC2217 host for serial forwarding |
| serialPort | Integer ! | 4000 | RFC2217 port for serial forwarding |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@3019cda0c10fcfca32156c47be102d2d897f2848 call \
flash --project-dir DIR_PATH --idf-version string --serial-host string --serial-port integerfunc (m *MyModule) Example(ctx context.Context, projectDir *dagger.Directory, idfVersion string, serialHost string, serialPort int) string {
return dag.
EspIdf().
Flash(ctx, projectDir, idfVersion, serialHost, serialPort)
}@function
async def example(project_dir: dagger.Directory, idf_version: str, serial_host: str, serial_port: int) -> str:
return await (
dag.esp_idf()
.flash(project_dir, idf_version, serial_host, serial_port)
)@func()
async example(projectDir: Directory, idfVersion: string, serialHost: string, serialPort: number): Promise<string> {
return dag
.espIdf()
.flash(projectDir, idfVersion, serialHost, serialPort)
}run() 🔗
Execute idf.py from the Espressif IDF or ADF Docker image, by default building the project
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| projectDir | Directory ! | - | The directory containing the ESP-IDF project |
| adfVersion | String | null | The Espressif ADF image tag or full image reference to use; if set, idf_version is ignored |
| idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
| idfArgs | [String ! ] | null | The arguments to pass to idf.py |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@3019cda0c10fcfca32156c47be102d2d897f2848 call \
run --project-dir DIR_PATH --idf-version stringfunc (m *MyModule) Example(ctx context.Context, projectDir *dagger.Directory, idfVersion string) string {
return dag.
EspIdf().
Run(ctx, projectDir, idfVersion)
}@function
async def example(project_dir: dagger.Directory, idf_version: str) -> str:
return await (
dag.esp_idf()
.run(project_dir, idf_version)
)@func()
async example(projectDir: Directory, idfVersion: string): Promise<string> {
return dag
.espIdf()
.run(projectDir, idfVersion)
}