Separate vs embedding into hex

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
User avatar
Posts: 88
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia

Separate vs embedding into hex

Post by aivarannamaa » Tue Jul 16, 2019 7:54 pm

Hi everybody!

Are there any benefits of embedding main code into hex file instead of uploading plain firmware and separately?

Does one of these approaches allow longer programs?

Best regards,
Aivar Annamaa

User avatar
Posts: 2053
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Separate vs embedding into hex

Post by jimmo » Tue Jul 16, 2019 10:32 pm

On the micro:bit, the difference is fairly small.

To allow for the largest possible program, put your in the hex and put additional modules into the filesystem. (But be aware that flashing the hex file may erase the filesystem).

One advantage of putting code in the filesystem is that it's faster to upload, because you don't have to flash the entire device for every code change. Although if you install the latest daplink firmware and use recent versions of Mu, then flashing the hex file is a lot faster anyway. ... -micro-bit

Post Reply