File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ loop() ->
7474
7575boot () ->
7676 BootPath = get_boot_path (),
77- atomvm :add_avm_pack_file (BootPath , []),
77+ atomvm :add_avm_pack_file (BootPath , [{ name , app } ]),
7878
7979 StartModule = get_start_module (),
8080 StartModule :start ().
@@ -90,7 +90,14 @@ get_boot_path() ->
9090get_start_module () ->
9191 case esp :nvs_get_binary (atomvm , start_module ) of
9292 undefined ->
93- main ;
93+ case atomvm :get_start_beam (app ) of
94+ error ->
95+ main ;
96+ {ok , ModuleNameWithExt } when is_binary (ModuleNameWithExt ) ->
97+ Len = byte_size (ModuleNameWithExt ) - byte_size (<<" .beam" >>),
98+ ModuleName = binary :part (ModuleNameWithExt , 0 , Len ),
99+ erlang :binary_to_atom (ModuleName , latin1 )
100+ end ;
94101 Module ->
95102 erlang :binary_to_atom (Module , latin1 )
96103 end .
You can’t perform that action at this time.
0 commit comments