microbit-foundation / microbit-fs

A TypeScript library to manipulate the micro:bit MicroPython filesystem.
https://microbit-foundation.github.io/microbit-fs/
MIT License
12 stars 1 forks source link

Identify MakeCode hex files via UICR #7

Open microbit-carlos opened 5 years ago

microbit-carlos commented 5 years ago

We can check if a hex file is MakeCode by looking at the magic number on the UICR. This can then be used by the Python Editor to inform the user.

microbit-carlos commented 4 years ago

As the MakeCode hex files add metadata to RAM after the EoF record the IntelHex library throws an error before microbit-fs is able to run any analysis on the hex file (UICR) data:

There is data after an EOF record at record xxxxx