pico
You can compile your code by going to your C/C++ source code directory and execute:$ dagger -m github.com/jig/dagger-modules/pico call build --source . container file --path=/workspace/build/firmware.uf2 export --path=firmware.uf2
change firmware.uf2 to the name of your output file defined in your CMakeLists.txt
You can also open a terminal with all the tools installed by executing:
$ dagger -m github.com/jig/dagger-modules/pico call build --source . terminal
Installation
dagger install github.com/jig/dagger-modules/pico@v0.0.4
Entrypoint
Return Type
Pico
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
func (m *MyModule) Example() *dagger.Pico {
return dag.
Pico()
}
@function
def example() -> dagger.Pico:
return (
dag.pico()
)
@func()
example(): Pico {
return dag
.pico()
}
Types
Pico 🔗
Pico struct to hold the Dagger container
container() 🔗
Container where the build will be executed
Return Type
Container !
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
container
func (m *MyModule) Example() *dagger.Container {
return dag.
Pico().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.pico()
.container()
)
@func()
example(): Container {
return dag
.pico()
.container()
}
setup() 🔗
Setup the tooling to compile for Raspberry Pi Pico
Return Type
Pico !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Source code directory |
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
setup
func (m *MyModule) Example() *dagger.Pico {
return dag.
Pico().
Setup()
}
@function
def example() -> dagger.Pico:
return (
dag.pico()
.setup()
)
@func()
example(): Pico {
return dag
.pico()
.setup()
}
cmake() 🔗
CMake builds the Pico project using CMake
Return Type
Pico !
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
cmake
func (m *MyModule) Example() *dagger.Pico {
return dag.
Pico().
Cmake()
}
@function
def example() -> dagger.Pico:
return (
dag.pico()
.cmake()
)
@func()
example(): Pico {
return dag
.pico()
.cmake()
}
make() 🔗
Make builds the Pico project using Make
Return Type
Pico !
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
make
func (m *MyModule) Example() *dagger.Pico {
return dag.
Pico().
Make()
}
@function
def example() -> dagger.Pico:
return (
dag.pico()
.make()
)
@func()
example(): Pico {
return dag
.pico()
.make()
}
build() 🔗
Build builds the Pico project chaining Setup, CMake and Make
Return Type
Pico !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Source code directory |
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
build
func (m *MyModule) Example() *dagger.Pico {
return dag.
Pico().
Build()
}
@function
def example() -> dagger.Pico:
return (
dag.pico()
.build()
)
@func()
example(): Pico {
return dag
.pico()
.build()
}
version() 🔗
Version displays information about the SDK and tools versions
Return Type
String !
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
version
func (m *MyModule) Example(ctx context.Context) string {
return dag.
Pico().
Version(ctx)
}
@function
async def example() -> str:
return await (
dag.pico()
.version()
)
@func()
async example(): Promise<string> {
return dag
.pico()
.version()
}
terminal() 🔗
Returns the directory containing the built files
Return Type
Container !
Example
dagger -m github.com/jig/dagger-modules/pico@4a9ab0e11d4ac89388a5f6a0cde465b25b32c5af call \
terminal
func (m *MyModule) Example() *dagger.Container {
return dag.
Pico().
Terminal()
}
@function
def example() -> dagger.Container:
return (
dag.pico()
.terminal()
)
@func()
example(): Container {
return dag
.pico()
.terminal()
}