Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ Any setting specified on the command line take precedence over settings in `reba

The `packbeam` task depends on the `compile` task, so any changes to modules in the project will automatically get rebuilt when running the `packbeam` task.

Packbeam options may also be passed through from other higher level tasks such as `uf2create` or
the various flash tasks for mcu platforms. When options for packbeam are given to other tasks use
the long version, or the capitalized version of the short parameters, for example `-P` or
`--prune` intstead of `-p`.

#### External Dependencies

If you already have AVM modules are not available via `rebar3`, you can direct the `packbeam` task to these AVM files via the `--external` (or `-e`) flag, e.g.,
Expand Down
9 changes: 8 additions & 1 deletion src/atomvm_esp32_flash_provider.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@
{chip, $c, "chip", string, "ESP chip (default auto)"},
{port, $p, "port", string, "Device port (default /dev/ttyUSB0)"},
{baud, $b, "baud", integer, "Baud rate (default 115200)"},
{offset, $o, "offset", string, "Offset (default 0x210000)"}
{offset, $o, "offset", string, "Offset (default 0x210000)"},
{prune, $P, "prune", boolean, "Prune unused modules with packbeam"},
{external, $E, "external", string, "External modules to add to packed AVM"},
{force, $F, "force", boolean, "Force packbeam to repack"},
{application, $A, "application", boolean, "Build and flash an OTP application"},
{remove_lines, $R, "remove_lines", boolean,
"Remove line information from generated AVM files (off by default)"},
{list, $L, "list", boolean, "List the contents of AVM files after creation"}
]).

-define(DEFAULT_OPTS, #{
Expand Down
9 changes: 8 additions & 1 deletion src/atomvm_pico_flash_provider.erl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
"Path to pico device (Defaults Linux: /run/media/${USER}/RPI-RP2, MacOS: /Volumes/RPI-RP2)"},
{reset, $r, "reset", string,
"Path to serial device to reset before flashing (Defaults Linux: /dev/ttyACM0, MacOS: /dev/cu.usbmodem14*)"},
{picotool, $t, "picotool", string, "Path to picotool utility (Default is to search in PATH)"}
{picotool, $t, "picotool", string, "Path to picotool utility (Default is to search in PATH)"},
{prune, $P, "prune", boolean, "Prune unused modules with packbeam"},
{external, $E, "external", string, "External modules to add to packed AVM"},
{force, $F, "force", boolean, "Force packbeam to repack"},
{application, $A, "application", boolean, "Build and flash an OTP application"},
{remove_lines, $R, "remove_lines", boolean,
"Remove line information from generated AVM files (off by default)"},
{list, $L, "list", boolean, "List the contents of AVM files after creation"}
]).

%%
Expand Down
9 changes: 8 additions & 1 deletion src/atomvm_stm32_flash_provider.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@
-define(DEPS, [packbeam]).
-define(OPTS, [
{stflash, $s, "stflash", string, "Path to st-flash"},
{offset, $o, "offset", string, "Offset (default 0x8080000)"}
{offset, $o, "offset", string, "Offset (default 0x8080000)"},
{prune, $P, "prune", boolean, "Prune unused modules with packbeam"},
{external, $E, "external", string, "External modules to add to packed AVM"},
{force, $F, "force", boolean, "Force packbeam to repack"},
{application, $A, "application", boolean, "Build and flash an OTP application"},
{remove_lines, $R, "remove_lines", boolean,
"Remove line information from generated AVM files (off by default)"},
{list, $L, "list", boolean, "List the contents of AVM files after creation"}
]).

-define(DEFAULT_OPTS, #{
Expand Down
9 changes: 8 additions & 1 deletion src/atomvm_uf2create_provider.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
"Device family or flavor of uf2 file to create (default universal)"},
{output, $o, "output", string, "Output path/name"},
{start, $s, "start", string, "Start address for the uf2 binary (default 0x10180000)"},
{input, $i, "input", string, "Input avm file to convert to uf2"}
{input, $i, "input", string, "Input avm file to convert to uf2"},
{prune, $P, "prune", boolean, "Prune unused modules with packbeam"},
{external, $E, "external", string, "External modules to add to packed AVM"},
{force, $F, "force", boolean, "Force packbeam to repack"},
{application, $A, "application", boolean, "Build and flash an OTP application"},
{remove_lines, $R, "remove_lines", boolean,
"Remove line information from generated AVM files (off by default)"},
{list, $L, "list", boolean, "List the contents of AVM files after creation"}
]).

-define(DEFAULT_OPTS, #{
Expand Down
Loading