From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: ANN: Cortex GNAT RTS 2018-07-15 Date: Wed, 18 Jul 2018 01:29:15 -0700 Organization: A noiseless patient Spider Message-ID: <87tvox9cbo.fsf@nightsong.com> References: <87in5gf9nt.fsf@nightsong.com> <87sh4ipq0q.fsf@nightsong.com> <87fu0hprvb.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: h2725194.stratoserver.net; posting-host="01689cb8ca5e4ebf10707a204be93e62"; logging-data="22040"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zBX7Mb1dQjZKJbgG5Ibx9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:IJDx9VpPhwO3Ac5oHvkAAfIE3+w= sha1:saEkjkS1M7sqcBIEfmnyoKAM3bk= Xref: reader02.eternal-september.org comp.lang.ada:53889 Date: 2018-07-18T01:29:15-07:00 List-Id: "Dmitry A. Kazakov" writes: >> you can type Python code at it interactively, and you can also drag >> and drop files onto it since it also presents a USB flash drive >> interface. It's great. > > Well, there will be no place left for actual programming. There are > lots of such boards on the net running various interpreters, e.g. Lua. The Trinket is a dinky little MCU board that will be controlling a fish tank heater or something. There's not enough space for a large program but it's not intended for that type of application. It comes with about 25k of free space and you can free up some more (maybe another 25k?) by deleting some unneeded libraries. The bigger boards have the 2MB SPI flash chip which is tons of space for stuff like this. > People keep on breaking out in order to save place and CPU cycles by > programing in C. Yes you might want to drop down to C for speed, or just delete Python completely from the board and run the Arduino toolkit, or (as we're discussing here) the GNAT RTS. Again it depends on the application but the 32k of ram on the M0 is enough to run typical programs. MicroPython also runs on the BBC micro:bit which has only 16k of ram, but that's significantly more cramped. Of course the M4 version of the Adafruit board has 192k of ram, bigger than the old minicomputers some of us remember. > Ada without tasking and other useful features would be in the same > league as C in terms of memory use and performance. I think Simon mentioned that GNAT RTS uses FreeRTOS for tasking. FreeRTOS is pretty small (https://freertos.org/FAQMem.html) and the rest of the GNAT RTS is not that large either, for these chips or even for the Bluepill. But, I know of Forth multitaskers using only a few dozen lines of code altogether, and less than 100 bytes of ram per task depending on stack and cell size. I've played a little with STM8 eForth which is an interactive interpreter supporting 2 tasks, using around 4k of flash memory and again, maybe 100 bytes of ram. The STM8 board itself has 8k of flash and 1k of ram and is almost a throwaway.