Skip to content

Emulator crashes with mt25q flash write errors and RTC/PLL warnings #5

@vman26

Description

@vman26

Title

Emulator crashes with mt25q flash write errors and RTC/PLL warnings

Description

Summary

The Pebble emulator crashes immediately after app launch with flash write errors, RTC time synchronization warnings, and PLL configuration errors.

Environment

  • Platform: WSL2 (Windows Subsystem for Linux)
  • Pebble Tool: v5.0.10
  • Pebble SDK: v4.5
  • Target Platform: Emery (Pebble 2), but tried all others
  • App Type: Watchface (no persistent storage, no AppMessage)
  • Tested on all platforms: aplite, basalt, chalk, diorite, emery - all crash identically

Reproduction Steps

  1. Create a simple watchface app (no persist_* calls, no external dependencies)
  2. Run pebble build
  3. Run pebble install --emulator <platform> (tried aplite, basalt, chalk, diorite, emery)
  4. Emulator crashes immediately after app launch on all platforms

Troubleshooting attempts that did NOT resolve the issue:

  • Cleared ~/.pebble-sdk/ directory
  • Ran pebble clean and rebuilt
  • Wiped emulator state completely
  • Created brand new project from scratch - same issue occurs
  • Tried all available platforms (aplite, basalt, chalk, diorite, emery) - all crash identically

Error Output

DEBUG_STM32F2XX_RTC f2xx_update_current_date_and_time: detected -9 mismatch between host and target ticks, jamming new host time into RTC without checking for alarms
qemu stm32: hardware warning: PLL cannot be disabled while it is selected as the system clock.
R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=2001aa00 R14=00000000 R15=080025e0
PSR=40000173 -Z-- T svc32
-1: mt25q_write8: Flipping bit from 0 => 1 (addr=0x552003, value=0xfd, current=0xfa)
-1: mt25q_write8: Flipping bit from 0 => 1 (addr=0x554003, value=0xfd, current=0xfa)
-1: mt25q_write8: Flipping bit from 0 => 1 (addr=0x556003, value=0xfd, current=0xf6)
-1: mt25q_write8: Flipping bit from 0 => 1 (addr=0x558003, value=0xfd, current=0xf6)
-1: mt25q_write8: Flipping bit from 0 => 1 (addr=0x55a003, value=0xfd, current=0xf6)

Impact

  • Severity: Critical - emulator completely unusable on all platforms
  • Workarounds: None found - issue persists across all troubleshooting attempts
  • Reproducibility: 100% - occurs with every app launch on every platform

Additional Context

  • Issue occurs on all platforms (aplite, basalt, chalk, diorite, emery)
  • App code is clean (no persistent storage, no heap allocations, proper initialization)
  • Creating a new project from scratch does not resolve the issue
  • Issue appears to be in QEMU's STM32F2xx peripheral emulation or firmware initialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions