Re: [squeak-dev] MQTT for Squeak?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MQTT for Squeak?

Ben Coman
 
On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge <[hidden email]> wrote:
> And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things!

How small could we conceivably make the VM to fit on one of these...?
https://www.arduino.cc/en/Products/Compare

For example the Mega...
MCU: 8-bit 16 MHz AVR
EEPROM:  4kB
RAM:         8kB
FLASH:      256kB

Current vm build product sizes...
4.1M   phcogspurlinuxht/lib/.../pharo
4.8M   sqcogspurlinuxht/lib/.../squeak
3.9M   sqstkspurlinuxht/lib/.../squeak
1.2M   sqstkspurlinuxhtminimal/lib/.../

That last one built without any internal nor external plugins.
What areas might be attacked to feasibly improve on that, to the point
it can meet rising hardware specs?

The 8 bit-ness is probably a killer though (??)

Maybe it would be better to port the VM to the ESP32...
MCU:  32-bit 240 Mhz Tensilica Xtensa LX6
ROM:  448 KBytes for booting and core functions
RAM:  520 KBytes
FLASH: 4MB (per retail boards - 4 x 16 MBytes supported)
https://www.sparkfun.com/products/13907
https://www.adafruit.com/products/3269
https://cdn-shop.adafruit.com/product-files/3269/esp32_datasheet_en_0.pdf

Those specs look like they are getting close enough to consider possibility.
How small might an extremely minimal image be that just toggles an LED?

Hmmm.... I wonder where we might find someone both familiar with the
MCU and positively inclined to Smalltalk?
https://en.wikipedia.org/wiki/Tensilica


Some general ESP32 info...
http://hackaday.com/2016/10/04/how-to-get-started-with-the-esp32/
http://hackaday.com/2016/09/15/esp32-hands-on-awesome-promise/
http://esp32.net/

cheers -ben




[1]
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MQTT for Squeak?

Ben Coman
 
On Sun, Oct 30, 2016 at 9:26 PM, Ben Coman <[hidden email]> wrote:

> On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge <[hidden email]> wrote:
>> And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things!
>
> How small could we conceivably make the VM to fit on one of these...?
> https://www.arduino.cc/en/Products/Compare
>
> For example the Mega...
> MCU: 8-bit 16 MHz AVR
> EEPROM:  4kB
> RAM:         8kB
> FLASH:      256kB
>
> Current vm build product sizes...
> 4.1M   phcogspurlinuxht/lib/.../pharo
> 4.8M   sqcogspurlinuxht/lib/.../squeak
> 3.9M   sqstkspurlinuxht/lib/.../squeak
> 1.2M   sqstkspurlinuxhtminimal/lib/.../
>
> That last one built without any internal nor external plugins.
> What areas might be attacked to feasibly improve on that, to the point
> it can meet rising hardware specs?
>
> The 8 bit-ness is probably a killer though (??)
>
> Maybe it would be better to port the VM to the ESP32...
> MCU:  32-bit 240 Mhz Tensilica Xtensa LX6
> ROM:  448 KBytes for booting and core functions
> RAM:  520 KBytes
> FLASH: 4MB (per retail boards - 4 x 16 MBytes supported)
> https://www.sparkfun.com/products/13907
> https://www.adafruit.com/products/3269
> https://cdn-shop.adafruit.com/product-files/3269/esp32_datasheet_en_0.pdf
>
> Those specs look like they are getting close enough to consider possibility.
> How small might an extremely minimal image be that just toggles an LED?
>
> Hmmm.... I wonder where we might find someone both familiar with the
> MCU and positively inclined to Smalltalk?
> https://en.wikipedia.org/wiki/Tensilica
>
>
> Some general ESP32 info...
> http://hackaday.com/2016/10/04/how-to-get-started-with-the-esp32/
> http://hackaday.com/2016/09/15/esp32-hands-on-awesome-promise/
> http://esp32.net/

Also, a slightly lower spec'd alternative, but ARM based may be an
easier port.  How feasible are these specs?
MCU: 32-bit 180 MHz ARM Cortex-M4F core
SRAM: 256 KB
FLASH: 2048 KB
SDRAM: 8MB - but maybe uses up too many I/O pins to make a useful
Arduino competitor
  $30 including 2.4" 240 x 320 LCD
http://www.digikey.com/product-detail/en/stmicroelectronics/STM32F429I-DISC1/497-16140-ND/5731713
http://www.st.com/en/evaluation-tools/32f429idiscovery.html
Why not an arduino?... http://embedded.fm/blog/2016/8/16/lets-get-board

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MQTT for Squeak?

KenDickey
In reply to this post by Ben Coman
 
On Sun, 30 Oct 2016 21:26:26 +0800
Ben Coman <[hidden email]> wrote:

>  
> On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge <[hidden email]> wrote:
> > And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things!
>
> How small could we conceivably make the VM to fit on one of these...?
> https://www.arduino.cc/en/Products/Compare

Perhaps by upgrading to a better chip?
  https://getchip.com/pages/chip
  https://getchip.com/pages/chippro
 
Lower left of monitor (used $7) is a C.H.I.P. computer ($9) with VGA ($10) plug-in.  With $10 keyboard and used mouse, the most expensive parts were the USB hub and connectors.  Running Cuis Smalltalk on Linux (https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev) but you could possibly run Squeak.

A bit slow.  Kinda like going back to the 90's. but a much more comfortable hobbyist/DYI/maker sw development environment.


Note that the Cuis core development image has less than 500 classes, and you can shrink from that.

If you run the old (pre-spur) VM and don't need Unicode, you can make a pretty light-weight image.


$0.02,
-KenD

CHIP-9$computer.JPG (182K) Download Attachment
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MQTT for Squeak?

timrowledge
In reply to this post by Ben Coman


> On 30-10-2016, at 6:26 AM, Ben Coman <[hidden email]> wrote:
>
>
> On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge <[hidden email]> wrote:
>> And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things!
>
> How small could we conceivably make the VM to fit on one of these...?
> https://www.arduino.cc/en/Products/Compare


Arduino is just too small to be very interesting and to be honest, too expensive. The ESP8266 boards are  typically $3-4. Including the WiFi!

>
> Maybe it would be better to port the VM to the ESP32…

Yes, this might be quite interesting. I could see an interesting way to leverage Eliot's ancient BrouHaHa vm along with my ROM image technology as developed for the Active Book. That worked very nicely on a 4MHz ARM2 (no caches, not even an instruction prefect buffer) with 1Mb RAM (for everything including the executing code, screen and a filing system) and 1Mb ROM. If it is possible to memory map the flash somehow to behave like ROM…


> How small might an extremely minimal image be that just toggles an LED?

Well, the Active Book image was about 600Kb in ROM and used around 256Kb RAM most of the time; saved images were typically <100Kb since I saved only the delta from the root ROM. That was a full GUI with applications for text handling, fax sending and receiving and displaying, a paint program (that actually used vectors and fills most of the time to save memory) and some other stuff. The developer image had all the normal (as of 1990) Smalltalk-80 stuff and might have hit 1Mb.


Ignoring the time-sink we all know and love as Morphic, and assuming that the 240MHz ESP32 cpu runs much like an old StrongARM 200, then you could get pretty decent performance.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: Exact estimate


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] MQTT for Squeak?

timrowledge
In reply to this post by KenDickey


> On 30-10-2016, at 9:06 AM, KenD <[hidden email]> wrote:
>
> On Sun, 30 Oct 2016 21:26:26 +0800
> Ben Coman <[hidden email]> wrote:
>
>>
>> On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge <[hidden email]> wrote:
>>> And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things!
>>
>> How small could we conceivably make the VM to fit on one of these...?
>> https://www.arduino.cc/en/Products/Compare
>
> Perhaps by upgrading to a better chip?
>  https://getchip.com/pages/chip
>  https://getchip.com/pages/chippro
>
> Lower left of monitor (used $7) is a C.H.I.P. computer ($9) with VGA ($10) plug-in.  With $10 keyboard and used mouse, the most expensive parts were the USB hub and connectors.  Running Cuis Smalltalk on Linux (https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev) but you could possibly run Squeak.

Oh, we can do better than that Ken; the RaspberryPi Zero is only $5 (admittedly, hard to find) and includes hdmi video/audio out. And of course, comes with a Cog VM and Scratch :-)  And actually runs Squeak pretty well, though I’d recommend unloading Shout to make text handling a lot faster. Or run in non-morphic projects. And Cuis should be pretty decent, of course.

Coming soon will be ARMv8 based embedded devices not too different to the ESP32; they should be fun.

And slightly further off-topic, but possibly of interest for some projects -
https://www.kickstarter.com/projects/874883570/marvell-espressobin-board
Not as fast as a Pi3, being only dual-core, but much faster IO ports and three Gb ethernet ports. And SATA & PCIE.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
An algorithm must be seen to be believed.