Skip to content

RP2: Improve initial flash message#2122

Merged
bettio merged 1 commit intoatomvm:release-0.7from
petermm:improve-rp2-boot-message
Apr 23, 2026
Merged

RP2: Improve initial flash message#2122
bettio merged 1 commit intoatomvm:release-0.7from
petermm:improve-rp2-boot-message

Conversation

@petermm
Copy link
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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:"

Copy link
Copy Markdown
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

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

Looks good, can you rebease this on release-0.7?

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>
@petermm petermm force-pushed the improve-rp2-boot-message branch from 44d54b9 to 6312c58 Compare April 22, 2026 09:14
@petermm petermm changed the base branch from main to release-0.7 April 22, 2026 09:14
@bettio bettio merged commit 28551c5 into atomvm:release-0.7 Apr 23, 2026
1 check passed
bettio added a commit that referenced this pull request Apr 27, 2026
Merge fixes, features, and optimizations from release-0.7, including:
- JIT: Add WASM32 backend with emscripten integration (#2260)
- Add SPI support to STM32 platform (#2127)
- Add network:wifi_scan/0,1 to esp32 network driver (#1165)
- Add serial (UART) distribution support (#2249)
- Add more reset reasons to esp:reset_reason/0 (#2275)
- Implement nif_start, executable_line and debug_line opcodes (#2264)
- MCUs: update deprecated use of term_from_int32 (#2241)
- Fix JIT crash on scheduler destroy by joining threads (#2280)
- Fix race condition in context_destroy (#2277)
- JIT x86-64: fix xorq encoding to use signed shorter form (#2278)
- JIT arm32: assemble push/pop with single reg as gnu as does (#2276)
- Fix sign of result of several functions from binary module (#2256)
- Fix offset and mod_offset sign using size_t (#2266)
- Fix warning with os:system_time/1 (#2265)
- Fix test_timer assertions (#2261)
- Normalize system_architecture strings (#2171)
- emscripten: Use EXPORT_ES6 setting and .mjs suffix (#2273)
- RP2: Improve initial flash message (#2122)
- CI: Rename pico combined for sorting (#2220)
- STM32 CI: Use tag release for renode 1.16.1 (#2268)
- CI: Fix macos - use setup-beam for gleam (#2263)
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.

3 participants