Skip to content

Commit b83303c

Browse files
committed
Update uf2create task Raspberry Pi Pico 2 support
Updates binary formats to updated uf2tool formats, changes the default format to univeral, which is compatible with all Pico SOCs. Signed-off-by: Winford <[email protected]>
1 parent 19d9cd8 commit b83303c

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,5 +439,6 @@ The `atomvm` properties list in the Mix project file (`mix.exs`) may contain the
439439
| Key | Type | Default | Value |
440440
|-----|------|----------|-------|
441441
| `app_start` | Address in hexademical format | 0x10180000 | The flash address to place the application |
442+
| `family_id` | atom or string | `universal` | The flavor of uf2 to create; `rp2040`, `rp2350_riscv`, `rp2350_arm_s`, `rp2350_arm_ns`, `data`, `absolute`, or `universal` |
442443

443444
Properties in the `mix.exs` file may be over-ridden on the command line using long-style flags (prefixed by `--`) by the same name as the properties key. For example, you can use the `--app_start` option to specify or override the `app_start` property in the above table.

lib/mix/tasks/uf2create.ex

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ defmodule Mix.Tasks.Atomvm.Uf2create do
6464
Keyword.get(
6565
avm_config,
6666
:family_id,
67-
Map.get(options, :family_id, System.get_env("ATOMVM_PICO_UF2_FAMILY", "rp2040"))
67+
Map.get(options, :family_id, System.get_env("ATOMVM_PICO_UF2_FAMILY", :universal))
6868
)
6969
)
7070

@@ -131,14 +131,41 @@ defmodule Mix.Tasks.Atomvm.Uf2create do
131131
:rp2040 ->
132132
:rp2040
133133

134-
"rp2035" ->
135-
:data
134+
"rp2350_riscv" ->
135+
:rp2350_riscv
136136

137-
":rp2035" ->
138-
:data
137+
":rp2350_riscv" ->
138+
:rp2350_riscv
139139

140-
:rp2035 ->
141-
:data
140+
:rp2350_riscv ->
141+
:rp2350_riscv
142+
143+
"rp2350_arm_s" ->
144+
:rp2350_arm_s
145+
146+
":rp2350_arm_s" ->
147+
:rp2350_arm_s
148+
149+
:rp2350_arm_s ->
150+
:rp2350_arm_s
151+
152+
"rp2350_arm_ns" ->
153+
:rp2350_arm_ns
154+
155+
":rp2350_arm_ns" ->
156+
:rp2350_arm_ns
157+
158+
:rp2350_arm_ns ->
159+
:rp2350_arm_ns
160+
161+
"absolute" ->
162+
:absolute
163+
164+
":absolute" ->
165+
:absolute
166+
167+
:universal ->
168+
:absolute
142169

143170
"data" ->
144171
:data

0 commit comments

Comments
 (0)