rst
Posts: 409
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Circle - C++ bare metal environment (with USB)

Sun Sep 15, 2019 8:35 am

To comeback on this once again:
Gavinmc42 wrote:
Thu Sep 12, 2019 1:02 am
Arduino is C++, but I use them to make apps.
There is a difference between using tools and being able to write them.
I see myself more as a baremetal tool user than a tool maker.
That's why some of my ideas are ease of user based, not maker.
It's like driving a car, not making one every time I need to go to the shops ;)
That's OK. I understand your position. There have been attempts for an Arduino integration using Circle. But I think it's not possible to develop and maintain this together with a (basically) one-man-project like Circle without a quality drop. That's why I decided myself against it. So one still need some understanding of classes for writing apps using Circle. ;)
From reading the forum you have now got Circle++ to a level that people can use for their apps.
You deserve a medal.
Thanks. But for a "correct" history I have to note, that there were already remarkable apps in 2015 using Circle. The first that I know of was an emulator for a retro computer from South Korea. In 2016 came a ArtNet-DMX gateway, which was used in real stage performances. In the meantime there are several apps.

rst
Posts: 409
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Circle - C++ bare metal environment (with USB)

Sun Sep 15, 2019 8:45 am

MikeDB wrote:
Sat Sep 14, 2019 9:33 am
I'm aiming for Ethernet, USB & HDMI as Linux only and everything on the 40 pin extender as bare metal.
I forgot to mention, that Circle is able to do Ethernet, USB & HDMI on its own. So maybe Linux is not needed. But of course it depends on what you want to do with it. Linux and Circle together is probably not a good idea, because the startup procedure of Circle does not fit into Linux and Circle wants to take over the interrupt system and memory management for any application, which makes sense.

MikeDB
Posts: 82
Joined: Sun Oct 12, 2014 8:27 am

Re: Circle - C++ bare metal environment (with USB)

Sun Sep 15, 2019 10:48 am

rst wrote:
Sun Sep 15, 2019 8:45 am
MikeDB wrote:
Sat Sep 14, 2019 9:33 am
I'm aiming for Ethernet, USB & HDMI as Linux only and everything on the 40 pin extender as bare metal.
I forgot to mention, that Circle is able to do Ethernet, USB & HDMI on its own. So maybe Linux is not needed. But of course it depends on what you want to do with it. Linux and Circle together is probably not a good idea, because the startup procedure of Circle does not fit into Linux and Circle wants to take over the interrupt system and memory management for any application, which makes sense.
Yes that's moreorless where I got to yesterday :-)

It's a live audio project so I need proper real-time (not pseudo-real time using large DMA buffers like ALSA) and Circle seemed to be one of the few with decent I2S drivers I could use as a base rather than a 'to be implemented' notice. But Linux gives me WiFi, USB, etc in a hassle free way. So maybe I need to just use some of the drivers from Circle without actually using Circle itself.

Altertnatively I may use a Pi Zero W for Linux and Pi4 for the audio using Circle and connect the two with SPI which would double the audio DSP available.

rst
Posts: 409
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Circle - C++ bare metal environment (with USB)

Sun Sep 15, 2019 3:12 pm

MikeDB wrote:
Sun Sep 15, 2019 10:48 am
It's a live audio project so I need proper real-time (not pseudo-real time using large DMA buffers like ALSA) and Circle seemed to be one of the few with decent I2S drivers I could use as a base rather than a 'to be implemented' notice. But Linux gives me WiFi, USB, etc in a hassle free way. So maybe I need to just use some of the drivers from Circle without actually using Circle itself.
I heard more than once, that the audio latency in Linux was the reason to try Circle. Unfortunately I cannot offer WiFi and yes, USB in Circle has not the features and quality of the Linux drivers. The I2S driver model in Circle is relatively simple. There are two concatenated DMA buffers of configurable size, one is filled by the the application, while the other is written out to the I2S device. I guess, it's possible to adapt this in Linux.
Altertnatively I may use a Pi Zero W for Linux and Pi4 for the audio using Circle and connect the two with SPI which would double the audio DSP available.
If you are familiar with NEON programming, you will get much processing power. I programmed a virtual analog synthesizer with Circle by myself, which supports 24 polyphonic voices (6 per core), but without explicit NEON programming and probably not in a very efficient way. I heard others have reached over 100 voices.

MikeDB
Posts: 82
Joined: Sun Oct 12, 2014 8:27 am

Re: Circle - C++ bare metal environment (with USB)

Sun Sep 15, 2019 6:05 pm

rst wrote:
Sun Sep 15, 2019 3:12 pm
If you are familiar with NEON programming, you will get much processing power. I programmed a virtual analog synthesizer with Circle by myself, which supports 24 polyphonic voices (6 per core), but without explicit NEON programming and probably not in a very efficient way. I heard others have reached over 100 voices.
Interesting idea - I'll take a look at that.

MikeDB
Posts: 82
Joined: Sun Oct 12, 2014 8:27 am

Re: Circle - C++ bare metal environment (with USB)

Mon Sep 16, 2019 10:35 am

MikeDB wrote:
Sun Sep 15, 2019 6:05 pm
rst wrote:
Sun Sep 15, 2019 3:12 pm
If you are familiar with NEON programming, you will get much processing power. I programmed a virtual analog synthesizer with Circle by myself, which supports 24 polyphonic voices (6 per core), but without explicit NEON programming and probably not in a very efficient way. I heard others have reached over 100 voices.
Interesting idea - I'll take a look at that.
Okay I had a look. Unlike Intel, it's only 128 bits so you can only do two 64 bit integer operations per cycle, and there's an overhead in moving from normal registers to the NEON ones and back. And with constantly changing multiply coefficients having to come from the main processor I suspect it won't help in the central DSP funtion, but there may be tasks I can offload to it.

rst
Posts: 409
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Circle - C++ bare metal environment (with USB)

Mon Sep 16, 2019 11:02 am

MikeDB wrote:
Mon Sep 16, 2019 10:35 am
Okay I had a look. Unlike Intel, it's only 128 bits so you can only do two 64 bit integer operations per cycle, and there's an overhead in moving from normal registers to the NEON ones and back. And with constantly changing multiply coefficients having to come from the main processor I suspect it won't help in the central DSP funtion, but there may be tasks I can offload to it.
OK. Good to know.

Return to “Bare metal, Assembly language”