Go to advanced search

by rst
Sat Jul 20, 2019 7:58 am
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 46
Views: 4271

Re: Raspberry Pi 4

I had to add 'enable_uart=1' to the config.txt on the boot folder to get UART0 (ie. /dev/serial0) to work, similar to RPi 3B+. This probably sets the alternate functions for GPIO14/15. I'm doing this in my bare metal code, without config.txt. For JTAG, even with 'enable_jtag_gpio=1' in config.txt t...
by rst
Fri Jul 19, 2019 8:12 am
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 46
Views: 4271

Re: Raspberry Pi 4

Thanks for the clarity. Do you know if LPAE/MMU is required for xHCI, or needed for performance? Is activity LED still at GPIO 29 (as with RPi 3 B+)? Has anyone been able to verify if 0x7E000000 is a valid peripheral base (without first enabling MMU)? You are welcome. LPAE/MMU is needed for xHCI in...
by rst
Thu Jul 18, 2019 5:31 am
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 46
Views: 4271

Re: Raspberry Pi 4

For boot kernel execution, the RPi 4 will execute the new file kernel7l.img (lpae is enabled on RPi 4). If this file is not present on the boot partition Raspbian will not boot. For bare metal compiling with arm-none-eabi-gcc compiler, a kernel7.img file is not compatible; the Raspbian kernel7.img ...
by rst
Sat Jul 13, 2019 6:02 pm
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 30
Views: 1489

Re: BCM2711B0

@joan You are welcome.

What I am missing at the moment is the PWM audio info for the new PWM device (assigned clock, DREQ and GPIO Alternate setting). If somebody would share info about this, it would be great. Perhaps we have to wait for the new "Peripherals document", but this may take time.
by rst
Sat Jul 13, 2019 5:40 pm
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 30
Views: 1489

Re: BCM2711B0

Did you discover the 54 MHz Osc clock value in a document or by experiment? Similarly the DMA channel info. For the oscillator clock rate I generated a clock signal on GPIO4 with a defined divider and the oscillator source and measured the resulting clock rate. From that I calculated the oscillator...
by rst
Sat Jul 13, 2019 1:58 pm
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 22
Views: 956

Re: Reserving cores for bare-metal programs - interupts

I'm not sure about the new GIC, but Pi4 also has the old interface to the ARM Q4 interrupt controller with which you can route every single interrupt to a specific core. Are you sure, that the old interrupt controller can be used on the RPi 4? How did you enable this? I tried the old interrupt cont...
by rst
Sat Jul 13, 2019 11:28 am
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 30
Views: 1489

Re: BCM2711B0

Some additional notes on Raspberry Pi 4 bare metal support from basically porting Circle : Firmware This has been tested with the firmware from Jul 9 2019 from here . Running bare metal code requires the following new firmware files: fixup4.dat start4.elf bcm2711-rpi-4-b.dtb (did not work without) b...
by rst
Tue May 14, 2019 11:02 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 177
Views: 49216

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

Very well done Patrick and thank you!

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

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: 177
Views: 49216

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: 177
Views: 49216

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: 177
Views: 49216

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: 177
Views: 49216

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: 177
Views: 49216

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

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

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

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

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

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

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

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: 177
Views: 49216

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: 177
Views: 49216

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: 177
Views: 49216

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

Go to advanced search