joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.02k stars 210 forks source link

Upload firmware to the emulator #311

Closed lchen198 closed 7 months ago

lchen198 commented 8 months ago

Is there a way to try my local build firmware in the emulator? Thanks

BrianBinFL commented 8 months ago

This should probably be in "Discussion", not "Issue" - maybe someone with the proper rights can move it. Meanwhile I'll answer it.

You can read how to run the emulator locally here. Note that you'll need to install emscripten. There is a link on the page to the emscripten home. There are instructions for installing emscripten on various platforms on the Downloads page of the emscripten site.

I hope this helps.

WesleyAC commented 7 months ago

Going to close this, since it seems like @BrianBinFL's link should answer the question. The reason that the firmware file can't be easily uploaded to the emulator is because that would require simulating the entire SAML22 chip, which is quite complex, while building the same source code with emscripten allows the simulator to work without needing accurate simulation of the hardware.