Go to advanced search

by rst
Wed Apr 10, 2019 9:23 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 175
Views: 42710

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

Is there any way to mount an usb flash drive and read it from the emulator? The developer recommended us this, I tested it but it doesn't work: You _should_ be able to add disk_volume=USB to cmdline.txt and that should switch loading emulator stuff from a USB stick. Set disk_partition=0 for auto or...
by rst
Thu Apr 04, 2019 4:08 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 175
Views: 42710

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

Thanks bzt, for linking Circle in your tutorials! Regarding Hungarian Notation I have to say, it's probably not the whole notation by Simonyi, which I am applying, more a modified one. For example I'm using the prefix "n" for any integer or unsigned typed variable. It's just "a number". About twenty...
by rst
Wed Apr 03, 2019 8:56 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 175
Views: 42710

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

Actually about the joystick, i experience a slowdown even just connecting it, without even any code to attach callbacks etc. :shock: I don't know, maybe the system is already almost saturated and that's enougth to tip it over? Please try it with the system option USE_USB_SOF_INTR enabled. Circle im...
by rst
Sun Mar 24, 2019 6:22 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 175
Views: 42710

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

Here i am with another question (i hope i'm not abusing your patience). I'm adding gamepad support to my project (the tic80 port to circle ). I find that the gamepad callback get called way too often, like continuously, to the point that the entire system slow to a crawl. I've searched the code but...
by rst
Wed Mar 20, 2019 10:54 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 175
Views: 42710

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: 175
Views: 42710

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: 1203

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: 50
Views: 34026

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: 1823

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: 1823

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: 1823

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: 1823

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: 1823

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 175
Views: 42710

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: 50
Views: 34026

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...

Go to advanced search