Skip to content

RP2: Improve initial flash message#2122

Open
petermm wants to merge 1 commit intoatomvm:mainfrom
petermm:improve-rp2-boot-message
Open

RP2: Improve initial flash message#2122
petermm wants to merge 1 commit intoatomvm:mainfrom
petermm:improve-rp2-boot-message

Conversation

@petermm
Copy link
Contributor

@petermm petermm commented Feb 21, 2026

After first flash/install of atomvm on picos, user was met with the rather blunt "Fatal error:.."

Suggestions, improvements welcome!

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

After first flash/install of atomvm on picos, user was met with the rather blunt "Fatal error:.."

Signed-off-by: Peter M <petermm@gmail.com>
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:"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants