Go to advanced search

by rst
Fri Nov 01, 2019 8:25 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

@kryptonaut Thanks for using and appreciating Circle. The problem, you have described, seems to be a strange one to me and I guess, the solution to define the CMachineInfo object in lib/sysinit.cpp static (outside of a function) does only work by luck. Unfortunately it's difficult to imagine, what h...
by rst
Fri Oct 18, 2019 8:25 am
Forum: Bare metal, Assembly language
Topic: Circle 64Bit Crashing in Constructor
Replies: 7
Views: 907

Re: Circle 64Bit Crashing in Constructor

LdB wrote:
Fri Oct 18, 2019 3:31 am
I stand to be corrected but if my memory serves me right -mno-unaligned-access does not exist on AARCH64
You are right. Then the options you have suggested have to do it.
by rst
Thu Oct 17, 2019 10:08 am
Forum: Bare metal, Assembly language
Topic: Circle 64Bit Crashing in Constructor
Replies: 7
Views: 907

Re: Circle 64Bit Crashing in Constructor

When does the MMU get initialized? In the constructor of the class CMemorySystem , which is normally the first member of CKernel . The constructors of the static objects will be called before main() is entered. about the static objects, the source i am porting is done that way and i dont want to ch...
by rst
Wed Oct 16, 2019 7:12 pm
Forum: Bare metal, Assembly language
Topic: Circle 64Bit Crashing in Constructor
Replies: 7
Views: 907

Re: Circle 64Bit Crashing in Constructor

This problem is caused by an unaligned access, automatically generated by the compiler to optimize setting the member variables in the constructor. Because the object xAligne is defined statically its constructor is called very early, when the MMU is not initialized yet. Unaligned accesses are gener...
by rst
Sat Oct 12, 2019 9:42 am
Forum: Bare metal, Assembly language
Topic: Bare metal à la Arduino...
Replies: 7
Views: 1148

Re: Bare metal à la Arduino...

I saw RPi4 audio there at PWM#1... so I have questions (I didn't manage to find it in the code - where to search this?): - the clock source address for PWM1 - is it the same or another than for PWM0? - GPIO functions for PWM1 - where can I output PWM1 (GPIO function numbers) The clock source is the...
by rst
Wed Oct 09, 2019 10:48 am
Forum: Bare metal, Assembly language
Topic: Bare metal à la Arduino...
Replies: 7
Views: 1148

Re: Bare metal à la Arduino...

You may have a look at Circle . It's a collection of C++ bare metal libraries with a build environment for the Raspberry Pi. It allows building bare metal programs on Raspbian too. Try: git clone https://github.com/rsta2/circle.git cd circle echo "PREFIX =" > Config.mk echo "RASPPI = 4" >> Config.mk...
by rst
Mon Sep 16, 2019 11:02 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

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 w...
by rst
Sun Sep 15, 2019 3:12 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

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 may...
by rst
Sun Sep 15, 2019 8:45 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

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 ...
by rst
Sun Sep 15, 2019 8:35 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

To comeback on this once again: 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, n...
by rst
Sat Sep 14, 2019 10:45 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

One other thought - as I'm trying to run two cores on Linux and two bare metal, can I build Circle on the Pi4 itself using the Geany and associated toolchain that comes on the Pi ? Yes, you should be able to build Circle with the GCC standard compiler on Raspbian. You have to set an empty prefix in...
by rst
Sat Sep 14, 2019 8:29 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

Has anybody got Circle running using Windows ? I searched but couldn't find any info on doing so. I tried this a long time ago, normally I am working on Linux only. Beside the toolchain you need a Windows version of "make", GNU make 4.0 or higher is best. I don't know, if this is available as binar...
by rst
Fri Sep 13, 2019 8:28 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

@MikeDB This .tar.xz file, which I downloaded earlier, is 68,4 MB big, the extracted .tar file 396,4 MB. The executables are in the bin/ subdirectory after extracting. The toolchain needs no further installation. I don't think, you are doing anything wrong. Maybe a problem with the mirror? BTW. I'm ...
by rst
Thu Sep 12, 2019 8:08 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

@Gavinmc42 In my opinion it's a fact, that one cannot use Circle without a basic understanding of classes. That I wanted to express. I didn't want to question your wish to learn.

EDIT: "with" -> "without"
by rst
Wed Sep 11, 2019 1:43 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

Someone says "Classes" I just think Pascal "Units" :D I really don't want to know about classes I just want to use them to make apps. I think C++ classes are not equivalent to Pascal units and there are classes in (Object) Pascal too. But without a basic understanding of classes, it's probably diff...
by rst
Wed Sep 11, 2019 8:08 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

There is currently no accelerated graphics support in Circle for RPi 4 Yep I did not think this would be the case yet. I do have hope it can be figured out, perhaps by analysing the Mesa DRI/DRM layers. That should in theory allow OpenGL and OpenGLES3.0 to work. A new VC6 manual would help too. I a...
by rst
Tue Sep 10, 2019 5:01 pm
Forum: Bare metal, Assembly language
Topic: Detecting RPi4 programatically
Replies: 8
Views: 633

Re: Detecting RPi4 programatically

@bzt You are welcome.
by rst
Tue Sep 10, 2019 1:58 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

I finally bite the bullet and grabbed your code. Reason? Because I saw your libgraphics stuff ;) Is that OpenVG working? Yes, it's working, but only on RPi 1-3. There is currently no accelerated graphics support in Circle for RPi 4. I had enough to do to get USB and Ethernet running on the RPi 4, s...
by rst
Tue Sep 10, 2019 8:10 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

My currently idea is a scripted UI with hardware acceleration that is language agnostic. So C. C+, Rust, Go, Free Pascal etc can use it without much change in coding. Just wish I had the time and skills to do it, ideas are easy, the hard work is actually doing it. So I usually just wait for someone...
by rst
Mon Sep 09, 2019 6:17 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

Gavinmc42 wrote: Been lots of progress since I last looked at Circle.
The most important is Pi4 and Aarch64 ;)
Well done.
Thanks.

I'm not a GUI expert, so probably not the right one for discussions about. But I guess, often it's a question of taste, which GUI to use.
by rst
Mon Sep 09, 2019 2:42 pm
Forum: Bare metal, Assembly language
Topic: Detecting RPi4 programatically
Replies: 8
Views: 633

Re: Detecting RPi4 programatically

bzt wrote:
Mon Sep 09, 2019 11:29 am
Is it possible to detect if an AArch64 image is running on an RPi3 or on an RPi4?
You can use the MIDR_EL1 system control register. It reports the PartNum in [15:4], which is 0xD03 for the Cortex-A53 (RPi 3) and 0xD08 for the Cortex-A72 (RPi 4).
by rst
Fri Sep 06, 2019 8:45 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

@patrick_h Thank you! To be honest, I was a little bit afraid by myself, if a bare metal RPi 4 support is possible. But now it seems to work. It's great, what you are doing with the RPi using Circle. My goal for Circle is to build something like a framework, which allows developing (embedded-like) b...
by rst
Wed Sep 04, 2019 9:07 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

Circle 40 with Raspberry Pi 4 support is available: https://github.com/rsta2/circle https://github.com/smuehlst/circle-stdlib Please note that there is a recent change in the Raspberry Pi firmware, which modifies the handling of 64-bit kernels. With the firmware from today on you need the following ...
by rst
Sun Sep 01, 2019 5:26 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 63757

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

@msx80 Good to see you back on this project. I can only suggest to release the spin lock as quick as possible, so that your main loop is only reading the keyboard buffer with spin lock held and does the processing outside of the spin lock protected region. Even if it is theoretically not impossible ...
by rst
Sun Aug 04, 2019 6:54 am
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 59
Views: 10622

Re: Raspberry Pi 4

What is bad IMHO is, that a kernel8.img is by default started in AArch32 on the RPi 4. I did a lot tests before I realized, why my 64-bit kernel was not running on the RPi 4. It was simply named kernel8.img (without config.txt) and started in AArch32. That was confusing. You can add arm_64bit=1 to ...

Go to advanced search