Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/platforms/rp2/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ static int app_main()

if (!avmpack_is_valid(MAIN_AVM, XIP_SRAM_BASE - (uintptr_t) MAIN_AVM)) {
sleep_ms(5000);
fprintf(stderr, "Fatal error: invalid main.avm packbeam\n");
fprintf(stderr, "No application loaded. Please flash your application to get started.\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be caused by a number of different reasons, such as copying an application that was generated for the wrong family type. Perhaps “No valid application found” would be enough help.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to be more verbose, maybe mention that an an application forth correct family, or “universal” needs to be flashed… but this could still be caused by some other corruption of the uf2 file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid/invalid LIB_AVM is handled below

The new combined artifacts should hopefully have people install correctly - so this is only for main.avm - no expert on the picos but assume they run from identical main.avm and there isn't specific compiles there..

"No/invalid main.avm, Please flash your application."

But let's simmer on it - mostly about removing the "Fatal error:"

if (avmpack_is_valid(LIB_AVM, (uintptr_t) MAIN_AVM - (uintptr_t) LIB_AVM)) {
fprintf(stderr, "Lib avm packbeam is valid, though\n");
fprintf(stderr, "Core libraries are loaded and ready.\n");
}
AVM_ABORT();
}
Expand Down