GithubHelp home page GithubHelp logo

microbit-put-data-on-hex's Introduction

put data in microbit hex file

why:

it was a question for me how makecode and micropython IDE can generate hex files for microbit without calling c compiler and requesting any server and I found this link https://github.com/bbcmicrobit/micropython/blob/master/docs/devguide/hexformat.rst for micropython and for makecode it looks like it does some more steps and there is bunch of typescript code in their repo to compile (static) TypeScript to hex (more information can be found in their repo: https://github.com/microsoft/pxt)

so, finally I ended up with making an arduino code that reads our data(program or something else) from last cells in flash memory and then we append that data to hex file and this repo is the materials we need for that

I used arduino nvm library to read flash memory and for generating a full dump of microbit's flash memory (the hex file we put data in it) I used ubittool (read-flash command) in arduino-code/ is an .ino file that reads memory from end until it finds an empty cell(0xFFFFFFFF) and then prints it into Serial putData.js is the utility that do the replace and put the data in

so if you want to make a runtime for microbit that can used in an editor like what micropython does you can use this repo(actually I guess what micropython is doing is diffrent (generating uicr and stuff like that) but what we have here works)

also if you want to use micropython in your editor (or somthing else) there is a good library for that documented here: https://microbit-foundation.github.io/microbit-fs/

microbit-put-data-on-hex's People

Contributors

radinparsaei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.