[Microbit-Python] Microbit Digest, Vol 11, Issue 10

Coryan W-S coryanws at gmail.com
Wed Apr 20 05:25:49 EDT 2016


Hello Nevil,

I may be wrong about some of these, but I believe the following are true:

 - The maximum size of the flash memory on an nRF51822 is 256 kilobytes
 - The width of the "Size" field in a MicroPython program header is 16
bits, which limits its size to 65 kilobytes.
 - The Mu IDE will refuse to flash scripts that are larger than 8192 bytes

The smallest of these is Mu's limit of 8kb, so that'd be the limit you'd
hit first. Note that the actual size of the hex files you are generating
will be larger than this, as they're in Intel Hex, not pure binary.

Hope that helps!
 - Coryan




On Tue, Apr 19, 2016 at 5:00 PM, <microbit-request at python.org> wrote:

> Send Microbit mailing list submissions to
>         microbit at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.python.org/mailman/listinfo/microbit
> or, via email, send a message with subject or body 'help' to
>         microbit-request at python.org
>
> You can reach the person managing the list at
>         microbit-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Microbit digest..."
>
>
> Today's Topics:
>
>    1. Maximum Size of Microbit Python Program? (Nevil Hunt)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 18 Apr 2016 18:17:05 +0100
> From: Nevil Hunt <nevil.hunt at hotmail.co.uk>
> To: "microbit at python.org" <microbit at python.org>
> Subject: [Microbit-Python] Maximum Size of Microbit Python Program?
> Message-ID: <DUB131-W66074EA0FFD3E703617583C36B0 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I think I may have exceeded the maximum size a microbit Python Program can
> be!
> My program compiles OK. Appears to download OK. But then doesn't run.
> There is no error message during the download and no error message on the
> microbit.
> I'm fairly sure it's the program's size that's the problem as I've
> experimented gradually reducing the size of the program until it started to
> work again.
>
> Does anyone know what is the maximum size a microbit Python Program can be?
> And what is it limited by? Is it the size available in the micro:bit's
> Flash?
> And how do I know how big my program is? Is it simply down to the size of
> the Hex file?
> (I have a working program which is 590k and one that doesn't run which is
> 595k)
>
> Thanks,
>
> Nevil
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/microbit/attachments/20160418/5b64fb20/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>
>
> ------------------------------
>
> End of Microbit Digest, Vol 11, Issue 10
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/microbit/attachments/20160420/8a8c3c95/attachment.html>


More information about the Microbit mailing list