Go to advanced search

by rst
Wed Mar 20, 2019 10:54 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

Awesome, that's what i needed. Just to understand, does the spinlock work in single core too? Does the IRQ kinda stops and the main flow resume until it frees the spinlock? Btw how do one set the build as single or multicore? does it need a rebuild of circle? Thanks a lot! Yes, you can use the spin...
by rst
Wed Mar 20, 2019 4:38 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

I have some questions about usb keyboard callbacks (the Raw one in particular). When, during the execution of the program, is the callback called? Can it interrupt the flow of the program in any arbitrary point? And is the callback completed somehow in parallel with the normal program, or does it s...
by rst
Sat Mar 16, 2019 8:18 am
Forum: OpenGLES
Topic: Depth buffer with OpenGL ES 1.1 on Raspberry Pi 3B+
Replies: 3
Views: 2252

Re: Depth buffer with OpenGL ES 1.1 on Raspberry Pi 3B+

It's working now: :) raspi.png The card slot and RAM chip are not visible any more. The problem has been the missing "EGL_DEPTH_SIZE, 8" entry in the EGL attribute_list. Thank you very much, also for your very interesting article series in The MagPi 65-77. It inspired me, to start with this. I will ...
by rst
Mon Mar 11, 2019 3:56 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

Hi bzt, generally I'm happy with the current QEMU release now. It helped me very much to debug some AArch64 libgcc C++ exception handling problem this weekend. Because I needed a quick solution here, I have added the Generic Timer (Core Timer) support to Circle and the System Timer is not required t...
by rst
Wed Mar 06, 2019 9:52 am
Forum: Bare metal, Assembly language
Topic: CNTP interrupt not firing
Replies: 38
Views: 3269

Re: CNTP interrupt not firing

Your vectors are Current EL with SP0 and Current EL with SPx only one would be needed depending if you set spsr_el2 with 0x3c5 or 0x3c4 Yes, the vector at 0x80 would probably be enough. My main code runs in EL1t using SP_EL0. The IRQ handler in EL1h using SP_EL1. Yeah so looking at the linux aarch6...
by rst
Wed Mar 06, 2019 9:04 am
Forum: Bare metal, Assembly language
Topic: CNTP interrupt not firing
Replies: 38
Views: 3269

Re: CNTP interrupt not firing

What ARM8 registers do you bash to trap the interrupt? I only set bit (1 << 1) in the register at 0x40000040. Of course IRQs must be enabled in PSTATE.I and VBAR_EL1 must be programmed with a valid exception vector structure. I have set the entries at offset 0x80 and 0x280 as IRQ stubs. My code run...
by rst
Wed Mar 06, 2019 7:17 am
Forum: Bare metal, Assembly language
Topic: CNTP interrupt not firing
Replies: 38
Views: 3269

Re: CNTP interrupt not firing

I know you have running code so that makes me think there is another clock I haven't found so could you outline your register setup to run from 19.2Mhz because I have definitely only found 38.4Mhz so far. First the initialisation code: #define HZ 100 u64 nCNTFRQ; asm volatile ("mrs %0, CNTFRQ_EL0" ...
by rst
Tue Mar 05, 2019 5:04 pm
Forum: Bare metal, Assembly language
Topic: CNTP interrupt not firing
Replies: 38
Views: 3269

Re: CNTP interrupt not firing

It is actually 38.4MHz from the 19.2Mhz clock on real hardware https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf Section 4.11 The code has a single local timer which can generate interrupts. The local timer ALWAYS gets its timing pulses from the Crystal clock. Yo...
by rst
Tue Mar 05, 2019 11:12 am
Forum: Bare metal, Assembly language
Topic: CNTP interrupt not firing
Replies: 38
Views: 3269

Re: CNTP interrupt not firing

Circle is working with QEMU 3.1.0 now with AARCH = 64 (including CNTPNSIRQ). I have replaced the BCM283[567] System Timer implementation with the ARMv7 Generic Timer (RPi Core Timer) for that purpose. The source is on the branch "core-timer" at the moment. That means the Core Timer is already workin...
by rst
Sun Mar 03, 2019 7:32 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

Gavinmc42 wrote:
Sun Mar 03, 2019 12:09 am
I like Geany because it is available on most OS's and it has just enough easy to use IDE compile/build/make and can colour syntax edit most known languages.
Perhaps I should have a look at Geany. It's also available on Raspbian and on the Linux distribution, I am using.
by rst
Sun Mar 03, 2019 7:24 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

This compiles fine, but the openvg tiger sample fails to link with "undefined reference to `__errno'" from: ../../../../../addon/vc4/interface/vcos/libvcos.a(vcos_pthreads.o): In function `vcos_pthreads_map_errno': and /usr/local/Caskroom/gcc-arm-embedded/7-2018-q2-update/gcc-arm-none-eabi-7-2018-q...
by rst
Sat Mar 02, 2019 12:15 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

But you can use e.g. the Eclipse IDE with it, if you want to. That's the exact opposite of a simple IDE, came from that space never want to go back. Eclipse is a big thing, I know. It was installed in Circle by a Circle user, who also introduced dwelch67's bootloader to speed up development and I a...
by rst
Sat Mar 02, 2019 10:08 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

But back when I tried to go from C to C++ (DOS C era) they started this thing called Hungarian notation, totally put me off C++. Of course, you do not need to use this notation, if you use C++. I do it, because I learned it at some stage and I find it useful. I wonder if Circle could be used with t...
by rst
Sat Mar 02, 2019 9:38 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

With regard to building on Raspian, I did as previously mentioned, compiled the same toolchain as you are using. So the issue now is that I would need to compile a version of libmath.a? You should be able to use the circle-stdlib project with the --no-cpp configure option. It comes with the impleme...
by rst
Fri Mar 01, 2019 7:58 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

I followed the example in CUSBStandardHub::EnumeratePorts and picked up a value from pOptions->GetUSBPowerDelay (). For the cheap keyboard I was using, I needed to set the delay to 1000ms. You are right. That's a real issue. The time between powering on the port and deciding, if there is a device a...
by rst
Fri Mar 01, 2019 5:09 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

If I may make an observation on USB timing, for those RPi models without a built-in hub, the 20ms timeout waiting for the connection of the root device (Routine CDWHCIDevice::EnableRootPort (void) in file "dwhcidevice.cpp") can be a bit short. It was causing me to fail to recognise a keyboard plugg...
by rst
Fri Mar 01, 2019 4:40 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

/Joke mode off/ @Gavinmc42 uGUI is not accelerated in Circle. It was an early attempt to provide a GUI in Circle, but works well. It's an interesting question, how an accelerated GUI can be provided e.g. using OpenVG. The API calls are relatively time expensive, so they should be reduced. OpenVG all...
by rst
Fri Mar 01, 2019 8:33 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

It's strange but some people like C++ ;) Well done, I was wondering who was going to be next to do VC4 baremetal. . Any and every baremetal progress is good for the industry. Not everyone wants or needs to use Linux. Wonder if that uGUI can be ported to Ultibo? I don't read C++, is that pixel or gp...
by rst
Fri Mar 01, 2019 8:14 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

Congratulations Rene, We know how much work is required to produce a complete implementation of the VCHIQ protocol and Userland libraries so your effort should be applauded not only by those using the Circle project but by anyone interested in serious bare metal development. Having two publicly ava...
by rst
Thu Feb 28, 2019 3:44 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

The ARM Local Timer is accepted for a review, and I got answer from Andrew. He said the only reason why those drivers weren't merged because he didn't had the time to bring them up with the modern qemu API. Yeah, lots of things changed, granted, but still I can do that easily. I also got Pekka on b...
by rst
Thu Feb 28, 2019 3:40 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 235
Views: 64034

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

Circle 39 has been released today with support for the following accelerated graphics APIs:
  • OpenGL ES 1.1 and 2.0
  • OpenVG 1.1
  • EGL 1.4
  • Dispmanx
I have partially ported the userland code to realise this.
by rst
Wed Feb 27, 2019 7:00 am
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

Hey this is awesome, he wrote the driver exactly in a way I wanted to! And he has also added the power management interface! I see no point in reimplementing the wheel (or reinventing the timer, ehhh whatever :-) ). His solution looks pretty good, clean code, proper classes, using host friendly vir...
by rst
Tue Feb 26, 2019 2:52 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

I have to apologize, because I mentioned the wrong author of the bcm2835_st driver for QEMU. The driver is here and the author is noticed in the file header. In the commit notice there is the suffix "et al". Shouldn't talk about things, I do not know much about like QEMU. :oops: @bzt you knows for s...
by rst
Tue Feb 26, 2019 12:14 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

I hope the ARM Local Timer will pass as that's a very simple patch, but with the System Timer I'll definitely need Pekka's help again. I'm hoping he is willing to push through another patch of mine. But first I have to write it :-) In the repo of 0xabu, which I forked, the System Timer has already ...
by rst
Tue Feb 26, 2019 7:18 am
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44112

Re: RPI3 QEMU

If the qemu developers accept the patch, I'll continue with the BCM2835 System Timer. That's a bit more difficult to implement, as there's no class for it yet and it requires a dynamic memory value, but with that many bare metal projects would run under qemu (like @rst's Circle for one). Usually th...

Go to advanced search