Go to advanced search

by rst
Wed Oct 14, 2020 5:22 am
Forum: Bare metal, Assembly language
Topic: Hardware Random Generator
Replies: 2
Views: 1218

Re: Hardware Random Generator

Do you know if this will work on the Raspberry Pi 4? Once again there's zero documentation on it in the BCM2711 ARM Peripherals documentation so I'm not sure if it even exists or uses different memory addresses. The RNG in the BCM2711 is different from that of the BCM2835. The Linux driver is here ...
by rst
Mon Oct 12, 2020 9:20 am
Forum: Bare metal, Assembly language
Topic: [SOLVED] Yagarto for Linux?
Replies: 3
Views: 173

Re: Yagarto for Linux?

A similar toolchain for Linux can be downloaded from here . I think, you need the "AArch32 bare-metal target (arm-none-eabi)" for your platform (e.g. "x86_64 Linux hosted cross compilers"). You simply have to extract the archive to a directory on your hard disk and include the bin/ subdirectory of t...
by rst
Sun Oct 11, 2020 9:11 am
Forum: Bare metal, Assembly language
Topic: UART Interrupts
Replies: 32
Views: 878

Re: UART Interrupts

Please specify the following options to arm-none-eabi-as and arm-none-eabi-gcc: -mcpu=arm1176jzf-s -marm Do not specify "-mfpu=vfp -mfloat-abi=hard" unless you have enabled the Floating Point Unit. Otherwise the compiler may generate floating point instructions for optimization, which will not work...
by rst
Sat Oct 10, 2020 9:18 pm
Forum: Bare metal, Assembly language
Topic: UART Interrupts
Replies: 32
Views: 878

Re: UART Interrupts

Please specify the following options to arm-none-eabi-as and arm-none-eabi-gcc: -mcpu=arm1176jzf-s -marm Do not specify "-mfpu=vfp -mfloat-abi=hard" unless you have enabled the Floating Point Unit. Otherwise the compiler may generate floating point instructions for optimization, which will not work ...
by rst
Sat Oct 10, 2020 6:08 pm
Forum: Bare metal, Assembly language
Topic: UART Interrupts
Replies: 32
Views: 878

Re: UART Interrupts

This is an AArch64 instruction, which does not work on the RPi Zero. These should work:

Code: Select all

#define	EnableIRQs()		asm volatile ("cpsie i")
#define	DisableIRQs()		asm volatile ("cpsid i")
by rst
Sat Oct 10, 2020 8:24 am
Forum: Bare metal, Assembly language
Topic: LdB's USB driver - Question
Replies: 67
Views: 2169

Re: LdB's USB driver - Question

szoshi wrote:
Fri Oct 09, 2020 9:02 pm
I plan to test USPi over the weekend and see if it works. Can anyone confirm if USPi actually enumerates FS devices?

Yes, it does. Tested again on a RPi 3B.
by rst
Tue Oct 06, 2020 1:29 pm
Forum: Bare metal, Assembly language
Topic: Simple USB support via library (RPI4)
Replies: 14
Views: 492

Re: Simple USB support via library (RPI4)

A "simple" implementation like with the CSUD is no longer possible on the RPI4? I don't know, if anybody got the DWC OTG USB controller in the RPi 4 to work as a host controller? This one should be compatible with the USB controllers of the other RPis. But it is connected to the Type-C power connec...
by rst
Tue Oct 06, 2020 10:59 am
Forum: Bare metal, Assembly language
Topic: Simple USB support via library (RPI4)
Replies: 14
Views: 492

Re: Simple USB support via library (RPI4)

@satyria Thanks. If you talk about writing a xHCI USB driver, this spec. is your friend. But it's more than this, because you need a driver for the PCIe bridge too, to be able to access the xHCI controller of the RPi 4.
by rst
Tue Oct 06, 2020 7:35 am
Forum: Bare metal, Assembly language
Topic: Simple USB support via library (RPI4)
Replies: 14
Views: 492

Re: Simple USB support via library (RPI4)

@satyria Unfortunately it's not that easy. If you try to link a program with libusb.a only, you will get a lot of unresolved externals. These external (mostly) functions can effectively only implemented in C++, which has been done in libcircle.a. But if you use this, you actually use the Circle bare...
by rst
Mon Oct 05, 2020 10:58 am
Forum: Bare metal, Assembly language
Topic: LdB's USB driver - Question
Replies: 67
Views: 2169

Re: LdB's USB driver - Question

In the reply to my first point, do you mean micro frame or frame? Do you mean that the micro frame counter has to be 0 to start the split transaction? No, the last 3 bits may have to be zero. The register at 0x408 counts the micro-frames in bits 0:15. The Pi has a hub on board with dedicated TTs fo...
by rst
Mon Oct 05, 2020 10:49 am
Forum: Bare metal, Assembly language
Topic: Simple USB support via library (RPI4)
Replies: 14
Views: 492

Re: Simple USB support via library (RPI4)

CSUD would have been sufficient for me here, but here I couldn't get it to do the right thing. Maybe too much has changed here that it doesn't work. I think, CSUD cannot be used for the RPi 4, at least not for the normal xHCI controller. The RPi 4 has an DWC OTG controller too, which is connected t...
by rst
Mon Oct 05, 2020 9:47 am
Forum: Bare metal, Assembly language
Topic: LdB's USB driver - Question
Replies: 67
Views: 2169

Re: LdB's USB driver - Question

1) Since I am doing only control transfers initially, I don't have to worry about precisely timing my split transactions. Not sure. I looked, what my own driver is doing with control transfers. I waits for the next micro-frame to begin, before it starts the split transaction. After receiving a NAK ...
by rst
Mon Oct 05, 2020 9:28 am
Forum: Bare metal, Assembly language
Topic: Simple USB support via library (RPI4)
Replies: 14
Views: 492

Re: Simple USB support via library (RPI4)

I also looked at LdB's USB driver, which unfortunately only supports up to RPI3 ... But here in the forum I saw that Circle exists. Can i use it for this? If so, where do I get the library from, what functions does it have and then how do I use it? I program in assembler myself. Circle is a C++ bar...
by rst
Sun Oct 04, 2020 4:28 pm
Forum: Bare metal, Assembly language
Topic: LdB's USB driver - Question
Replies: 67
Views: 2169

Re: LdB's USB driver - Question

I could not find any restriction on the position in the micro frame like you have mentioned. Ah yes, I forgot that CSUD is using Control transactions to poll the keyboard. USPi is using Interrupt In transactions, which are described in section A.4. Have a look at the "uFrame M+N" info on the left s...
by rst
Sun Oct 04, 2020 1:42 pm
Forum: Bare metal, Assembly language
Topic: LdB's USB driver - Question
Replies: 67
Views: 2169

Re: LdB's USB driver - Question

@szoshi Maybe it has some influence, that with MMU enabled the CSUD code runs much faster then before. So the time behavior is much different. USB split transactions require to be started in a specific micro-frame on the USB. There are a number of transaction examples in Appendix A of the USB 2.0 sp...
by rst
Tue Sep 08, 2020 8:40 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

Hello MikeDB, the common logger target for Circle development without an attached monitor is the serial output over GPIO14 (SoC numbering) using the class CSerialDevice and an USB serial adapter on your development host. This is implemented in most sample programs. You only need to include the follo...
by rst
Fri Sep 04, 2020 10:40 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

MikeDB wrote:
Thu Sep 03, 2020 8:39 pm
rst wrote:
Thu Sep 03, 2020 3:54 pm
;) Honestly one can currently effectively use "only" 3GB of that memory with Circle.
I'll struggle through :D

At 96kHz even 3Gbyte makes an 86 minute long stereo reverb :shock:

86 minutes should be enough. :lol:
by rst
Thu Sep 03, 2020 3:54 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

Circle already has xHCI support, but without plug-and-play so far. That's going to be changed now. The property mailbox call for RPi 4B 8GB models is also included in the latest release. 8GByte in an embedded processor application ! I remember squeezing code into a 6805 with 8kbits (1kbyte) ! ;) Ho...
by rst
Wed Sep 02, 2020 11:48 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

Circle already has xHCI support, but without plug-and-play so far. That's going to be changed now. The property mailbox call for RPi 4B 8GB models is also included in the latest release.
by rst
Mon Aug 31, 2020 9:41 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

@MikeDB I had a look on how USB plug-and-play (PnP) can be implemented in Circle. I found a way that both application types (PnP-aware and not PnP-aware) can coexist in Circle, so that existing applications do not need to be modified and new applications can use PnP. The initial attempt of implement...
by rst
Tue Aug 25, 2020 6:35 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

MikeDB wrote:
Tue Aug 25, 2020 4:28 pm
Have you had any luck finding a VL805 datasheet ? Or documentation from RPi on how they have used it ?

The VL805 is a standard xHCI 1.0 controller. The current revision 1.2 of the xHCI specification is here.
by rst
Tue Aug 25, 2020 3:24 pm
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

@MikeDB OK, I will have a look on it. Powering off the device at any time should not be a problem with a bare metal solution.
by rst
Tue Aug 25, 2020 11:10 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

@MikeDB I understand, what the problem is. I can have a look at USB host-plugging, but as I said, it will take time and I cannot make promises. Given that Circle is still a (basically one-man) hobby project and for a professional device I would recommend the Linux solution. Maybe I underestimate, wh...
by rst
Mon Aug 24, 2020 11:08 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

@MikeDB Yes, the Circle USB stack does not support hot-plugging. In the main areas of applications based on Circle, time is important. On the Raspberry Pi 1-3 it would be relatively time consuming to poll the USB hubs all the time to be able to detect device plug-ins or removes. On the RPi 4 with it...
by rst
Sun Jun 28, 2020 9:35 am
Forum: Bare metal, Assembly language
Topic: Circle - C++ bare metal environment (with USB)
Replies: 297
Views: 93234

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

@cjm42 The circle-stdlib project provides access to the C and C++ standard library and is based on Circle. Circle itself does not support classes from the C++ standard library.

Go to advanced search