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.3
Entrypoint
Return Type
EspIdf !
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@27608eea162e7d085e76fc6ac75cae4a519c3808 call \
func (m *myModule) example() *EspIdf {
return dag.
EspIdf()
}
@function
def example() -> dag.EspIdf:
return (
dag.esp_idf()
)
@func()
example(): EspIdf {
return dag
.espIdf()
}
Types
EspIdf 🔗
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 | - | The version of the Espressif ADF Docker image to use, if specified, idf_version is ignored |
idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
idfArgs | [String ! ] ! | ["build"] | The arguments to pass to idf.py |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@27608eea162e7d085e76fc6ac75cae4a519c3808 call \
run --project-dir DIR_PATH --idf-version string --idf-args string1 --idf-args string2
func (m *myModule) example(ctx context.Context, projectDir *Directory, idfVersion string, idfArgs []string) string {
return dag.
EspIdf().
Run(ctx, projectDir, idfVersion, idfArgs)
}
@function
async def example(project_dir: dagger.Directory, idf_version: str, idf_args: List[str]) -> str:
return await (
dag.esp_idf()
.run(project_dir, idf_version, idf_args)
)
@func()
async example(projectDir: Directory, idfVersion: string, idfArgs: string[]): Promise<string> {
return dag
.espIdf()
.run(projectDir, idfVersion, idfArgs)
}
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 | - | The version of the Espressif ADF Docker image to use, if specified, idf_version is ignored |
idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@27608eea162e7d085e76fc6ac75cae4a519c3808 call \
config --project-dir DIR_PATH --idf-version string
func (m *myModule) example(ctx context.Context, projectDir *Directory, idfVersion string) string {
return dag.
EspIdf().
Config(ctx, projectDir, idfVersion)
}
@function
async def example(project_dir: dagger.Directory, idf_version: str) -> str:
return await (
dag.esp_idf()
.config(project_dir, idf_version)
)
@func()
async example(projectDir: Directory, idfVersion: string): Promise<string> {
return dag
.espIdf()
.config(projectDir, idfVersion)
}
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@27608eea162e7d085e76fc6ac75cae4a519c3808 call \
docs --project-dir DIR_PATH --idf-version string
func (m *myModule) example(ctx context.Context, projectDir *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 | - | The version of the Espressif ADF Docker image to use, if specified, idf_version is ignored |
idfVersion | String ! | "v5.1" | The version of the Espressif IDF Docker image to use |
Example
dagger -m github.com/alanmosely/daggerverse/esp-idf@27608eea162e7d085e76fc6ac75cae4a519c3808 call \
flash --project-dir DIR_PATH --idf-version string
func (m *myModule) example(ctx context.Context, projectDir *Directory, idfVersion string) string {
return dag.
EspIdf().
Flash(ctx, projectDir, idfVersion)
}
@function
async def example(project_dir: dagger.Directory, idf_version: str) -> str:
return await (
dag.esp_idf()
.flash(project_dir, idf_version)
)
@func()
async example(projectDir: Directory, idfVersion: string): Promise<string> {
return dag
.espIdf()
.flash(projectDir, idfVersion)
}