Towards using Ring 1.21 on Raspberry Pi Pico (Microcontroller)

552 views
Skip to first unread message

Mahmoud Fayed

unread,
Jul 31, 2024, 5:33:57 AM7/31/24
to The Ring Programming Language
Hello

Today, I have good news about Ring 1.21 development, using this release we can compile Ring using C compilers for 32-bit Microcontrollers.

Compiling Ring Compiler/VM for Microcontrollers is tested Using:
1- Raspberry Pi Pico and gcc-arm-none-eabi (Buy a Raspberry Pi Pico – Raspberry Pi)
2- Microchip C compiler for 32-bit PIC Microcontrollers (32-bit Microcontrollers (MCUs) | Microchip Technology)

Also, we did some practical experiments using Raspberry Pi Pico Microcontroller (Code not added to GitHub yet - Will be added in the next future) to be sure that this is practical.

Unlike (Python) & (MicroPython) which are two projects (by different teams) which requires from MicroPython team to follow new Python releases and merge updates as possible: MicroPython differences from CPython — MicroPython latest documentation 

Here we are using the same Ring version (Used in Desktop/Web/WebAssembly/Mobile) for Embedded systems development too (That means all of the features at the language level are unified between these platforms and the difference as expected exist only at the libraries level). This is possible because Ring is designed from Day 1 to be lightweight (Small Implementation with respect to the code size - A Lesson learned from the Lua programming language). 

Screen Shots:
ringpico1.jpg

ringpico2.jpg

Finally, Thanks to Eng. Samir Fayed, Eng. Ahmad Fayed and the Scientific Village Store (Qariya.net) for their help. 

Greetings,
Mahmoud

Mansour Ayouni

unread,
Jul 31, 2024, 5:53:10 AM7/31/24
to Mahmoud Fayed, The Ring Programming Language

Hello Mahmoud,

This is a hudge step forward in the history of Ring!

I'm very happy you made it and let Ring be an option for this kind of devices.

It is like you offered me two wings!

Yesterday, after I saw your activity on Github citing microcontrollers, I asked myself: will Mahmoud do it?

 Then I started dreaming a little by chatting about it with ClaudeAI ...

Big five.

Big Thank You!


--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/b155509b-a764-4c9c-a7df-18333fb56c92n%40googlegroups.com.
1000017516.jpg

Mahmoud Fayed

unread,
Jul 31, 2024, 6:14:48 AM7/31/24
to The Ring Programming Language
Hello Mansour

>> "Big Thank You!"

You are welcome :D

Greetings,
Mahmoud

Bert Mariani

unread,
Aug 1, 2024, 11:44:41 AM8/1/24
to The Ring Programming Language
Hello Mahmoud

I see the "picolib.ring" addition for microcontrollers and Raspberry-Pie
Ring is now even More Versatile !
Congratulations !!

Best Regards
Bert Mariani

Mahmoud Fayed

unread,
Aug 1, 2024, 3:05:33 PM8/1/24
to The Ring Programming Language
Hello Bert

>> "Ring is now even More Versatile ! Congratulations !!"

You are welcome :D

Greetings,
Mahmoud

Azzeddine Remmal

unread,
Aug 1, 2024, 4:45:59 PM8/1/24
to The Ring Programming Language
  Hello Mahmoud



Great addition this means we can use Arduino

What are the supported functions

Can I control the frequency of the output signal and the dotocycle of the signal
I mean are all MicroPython functions supported

Regards Azzeddine

Mahmoud Fayed

unread,
Aug 1, 2024, 5:55:32 PM8/1/24
to The Ring Programming Language
Hello Azzeddine

>> "What are the supported functions"

This is a work in progress - As stated in the topic title, we used the word (Towards) 
This work is planned for Ring 1.21 release (Under Development)
Currently what works is the Ring Compiler/VM itself
Also, we tried supporting simple functions from GPIO (Just for testing) - And we are happy with the results, So we can continue development.

Later more functions/libraries could be added using Ring Code Generator for Extensions - In a similar way used for supporting other extensions (This will not be hard - We plan to provide good support for the libraries/functions provided by Raspberry Pi Pico C/C++ SDK)

Also, based on your knowledge about Ring extensions, You can support any extra libraries in the future.

The next step will be adding what we did to GitHub and continue adding libraries support.

>> "Great addition this means we can use Arduino"

Currently, we focus on Raspberry Pi Pico
Other/Similar projects could be supported by the community in the future.

>> "I mean are all MicroPython functions supported"

We don't plan to compete with MicroPython - I have full respect for this project, in reality this project is a motivation to any dynamic language community towards using their language on Microcontrollers.

Also, In theory, Ring extensions could grow to the same level or better.

Ring advantages will be
1- Using the same implementation code for Microcontroller, Desktop, Web, WebAssembly, Mobile, etc.
2- Ring Garbage Collector and the language features is already good for embedded systems 
3- Ring could be faster & provide better performance (During next releases like Ring 1.21, Ring 1.22, etc.) - But this is not very important compared to the importance of memory usage.

Greetings,
Mahmoud

Mahmoud Fayed

unread,
Aug 2, 2024, 3:42:14 AM8/2/24
to The Ring Programming Language
Hello

We added the source code to the Ring project in GitHub


The folder contains a README.md file that explains the steps (Install, Programming, Building & Deployment)

Feel free to read the steps and report if they are simple or not


Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages