Raspberry 1,2,3,4,5, Zero(1/2) ohne Linux als Microcontroller benutzen (Bare Metal)

  • Falls mal ein ESP32, RP2040/Raspberry Pico, STM32 trotz der Möglichkeit der Übertaktung nicht ausreicht und der Schritt zum FPGA noch zu groß ist, könnte man einen großen Raspberry Pi ohne laufendes Linuxsystem, als Microcontroller verwenden. Da kein Linux läuft kann man die Ressourcen die sonst Linux benötigt auch noch verwenden.

    Ein interessantes SDK für solche Bare Metal Programmierung ist Circle. Ich weiß nicht ob schon ein Projekt im Forum damit durchgezogen und dokumentiert wurde, deshalb hier nochmal die Erwähnung.

    GitHub - rsta2/circle: A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)
    A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit) - rsta2/circle
    github.com

    Die Programmierung mit dem SDK erfolgt in C oder C++, man setzt also über Assembler an und damit ist die Lernkurve so, daß auch Arduino-Boys und Girls damit schnell Erfolge erzielen können. Zudem gibt es schon sehr viel Democode dazu aus dem man lernen und kopieren kann: https://github.com/rsta2/circle/tree/master/sample

    Eine ansprechende SDK Dokumentation findet man auf https://circle-rpi.readthedocs.io/en/latest/

    Und ein HowTo von anderer Seite zur SDK-Einrichtung kopiere ich mal mit rein in den Beitrag

    Using Circle for Pi Bare Metal Programming

    Apr 4, 2024

    Circle is a C/C++ bare metal programming environment for the Raspberry Pi - i.e. it provides a bunch of libraries to make bare metal programming easier.

    To get it building for the Pi 4, 64-bit follow these instructions.

    Get the ARM GNU Toolchain

    The latest ARM GNU toolchain is available here.

    To install the toolchain for an x86_64 host and an AArch64 bare-metal target, using version 13.2.rel1:

    Code
    cd ~/builds
    wget "https://developer.arm.com/-/media/Files/…07019956E7122B5" -O arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
    unxz arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
    tar xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar
    rm arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar

    Build Circle Libraries

    To build for the Raspberry Pi 4, 64-bit, with a UK keyboard mapping:

    Code
    cd ~/builds
    git clone https://github.com/rsta2/circle
    cd circle
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin ./configure -r 4 -p aarch64-none-elf- --keymap UK
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin ./makeall

    The libraries are output to ./lib.

    Build Circle Samples

    The samples are in ./sample. To build a sample, go to the sample’s directory and run make.

    For example, to build 08-usbkeyboard:

    Code
    cd sample/08-usbkeyboard
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin make

    To run the Sample

    You need an SD card with a FAT32 formatted first partition.

    You can do create this via the command line, as follows, assuming you have an SD card at /dev/sdb (make sure you use the right device as this will wipe the filesystem!):

    Code
    sudo apt install parted dosfstools
    sudo wipefs --all --force /dev/sdb
    sudo parted -s /dev/sdb mklabel msdos
    sudo parted -s /dev/sdb mkpart primary fat32 1MiB 100%
    sudo mkfs -t vfat /dev/sdb1

    Now you need the following files on the SD card:

    • start4.elf
    • bcm2711-rpi-4-b.dtb
    • kernel8.img

    Get the first two from the Raspberry Pi Firmware repo. For example:

    Code
    wget "https://github.com/raspberrypi/fi…boot/start4.elf" -O /tmp/start4.elf
    wget "https://github.com/raspberrypi/fi…711-rpi-4-b.dtb" -O /tmp/bcm2711-rpi-4-b.dtb.elf

    The last file you just built, and so it comes from the sample directory - it will be called kernel8-rpi4.img so you will need to rename.

    For example to install all of these files on /dev/sdb1:

    Code
    sudo mount /dev/sdb1 /mnt
    sudo cp /tmp/start4.elf /mnt
    sudo cp /tmp/bcm2711-rpi-4-b.dtb /mnt
    sudo cp kernel8-rpi4.img /mnt/kernel8.img
    sudo umount /mnt

    Now put the SD card in the Pi and turn it on.

    Building for the Zero

    Get the AArch32 bare-metal target toolchain:

    Code
    cd ~/builds
    wget "https://developer.arm.com/-/media/Files/…96E6450E14A3E26" -O arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
    unxz arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
    tar xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar
    rm arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar

    Build the Circle libraries and sample:

    Code
    cd ~/builds/circle
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin ./configure -f -r 1 -p arm-none-eabi- --keymap UK
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin ./makeall clean
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin ./makeall
    cd sample/08-usbkeyboard
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin make clean
    PATH=$PATH:~/builds/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin make

    This gives a kernel.img file - install it on the SD card.

    For the Raspberry Pi Zero you need a slightly different set of other files on the SD card:

    Ansprechpartner für Umbau oder Modernisierung von Röhrenradios mittels SDR,DAB+,Internetradio,Firmwareentwicklung.
    Unser Open-Source Softwarebaukasten für Internetradios gibt es auf der Github-Seite! Projekt: BM45/iRadio (Google "github BM45/iRadio")

  • Anbei mal eine Schnellübersicht aller Klassen die das SDK bereits mitbringt.

    CLASSES

    Base library

    * C2DGraphics: Software graphics library with VSync and hardware-accelerated double buffering.
    * CActLED: Switch the Act LED on and off, checks the Raspberry Pi model to use the right LED pin.
    * CBcm54213Device: Driver for BCM54213PE Gigabit Ethernet Transceiver of Raspberry Pi 4.
    * CBcmFrameBuffer: Frame buffer initialization, setting color palette for 8 bit depth.
    * CBcmMailBox: Simple GPU mailbox interface, currently used for the property interface.
    * CBcmPCIeHostBridge: Driver for PCIe Host Bridge(s) of Raspberry Pi 4 and 5.
    * CBcmPropertyTags: Get several information from the GPU side or control something on this side.
    * CBcmRandomNumberGenerator: Driver for the built-in hardware random number generator.
    * CBcmWatchdog: Driver for the BCM2835 watchdog device.
    * CCharGenerator: Gives pixel information for console font
    * CClassAllocator: Support class for the class-specific allocation of objects
    * CCPUThrottle: Manages CPU clock rate depending on user requirements and SoC temperature.
    * CDevice: Base class for all devices
    * CDeviceNameService: Devices can be registered by name and retrieved later by this name
    * CDeviceTreeBlob: Simple Devicetree blob parser
    * CDisplay: Base class for dot-matrix display drivers.
    * CDMA4Channel: Platform DMA4 "large address" controller support (helper class).
    * CDMAChannel: Platform DMA controller support (I/O read/write, memory copy).
    * CDMAChannelRP1: RP1 platform DMA controller support (for Raspberry Pi 5).
    * CExceptionHandler: Generates a stack-trace and a panic message if an abort exception occurs.
    * CGPIOClock: Using GPIO clocks, initialize, start and stop it.
    * CGPIOManager: Interrupt multiplexer for CGPIOPin (only required if GPIO interrupt is used).
    * CGPIOPin: Encapsulates a GPIO pin, can be read, write or inverted. Supports interrupts. Simple initialization.
    * CGPIOPinFIQ: GPIO fast interrupt pin (only one allowed in the system).
    * CGenericLock: Locks a resource with or without scheduler.
    * CHeapAllocator: Allocates blocks from a flat memory region.
    * CI2CMaster: Driver for I2C master devices.
    * CI2CMasterIRQ: Driver for I2C master devices - async using IRQ.
    * CI2CSlave: Driver for I2C slave device.
    * CInterruptSystem: Connecting to interrupts, an interrupt handler will be called on interrupt.
    * CKernelOptions: Providing kernel options from file cmdline.txt (see doc/cmdline.txt).
    * CLatencyTester: Measures the IRQ latency of the running code.
    * CLogger: Writing logging messages to a target device
    * CMACAddress: Encapsulates an Ethernet MAC address.
    * CMACBDevice: Driver for MACB/GEM Ethernet NIC of Raspberry Pi 5.
    * CMachineInfo: Helper class to get different information about the running computer.
    * CMemorySystem: Enabling MMU if requested, switching page tables (not used here).
    * CMPHIDevice: A driver, which uses the MPHI device to generate an IRQ.
    * CMultiCoreSupport: Implements multi-core support on the Raspberry Pi 2.
    * CNetDevice: Base class (interface) of net devices.
    * CNullDevice: Character device which ignores sent data and returns 0 bytes on read.
    * CNumberPool: Allocation pool for (device) numbers.
    * CPageAllocator: Allocates aligned pages from a flat memory region.
    * CPageTable: Encapsulates a page table to be used by MMU (AArch32).
    * CPtrArray: Container class. Dynamic array of pointers.
    * CPtrList: Container class. List of pointers.
    * CPtrListFIQ: Container class. List of pointers, usable from FIQ_LEVEL.
    * CPWMOutput: Pulse Width Modulator output (2 channels).
    * CSouthbridge: Driver for the RP1 multi-function device of the Raspberry Pi 5.
    * CScreenDevice: Writing characters to screen, some escape sequences (some are not yet implemented)
    * CSerialDevice: Driver for PL011 UART, interrupt or polling mode
    * CSMIMaster: Driver for the Second Memory Interface.
    * CSpinLock: Encapsulates a spin lock for synchronizing the concurrent access to a resource from multiple cores.
    * CSPIMaster: Driver for (non-AUX) SPI master device. Synchronous polling operation.
    * CSPIMasterAUX: Driver for the auxiliary SPI master (SPI1).
    * CSPIMasterDMA: Driver for SPI0 master device. Asynchronous DMA operation.
    * CString: Simple string manipulation class, Format() method works like printf() (but has less formating options)
    * CTerminalDevice: Terminal support for dot-matrix displays.
    * CTime: Holds, makes and breaks the time.
    * CTimer: Manages the system clock, supports kernel timers and a calibrated delay loop.
    * CTracer: Collects tracing events in a ring buffer for debugging and dumps them to the logger later.
    * CTranslationTable: Encapsulates a translation table to be used by MMU (AArch64).
    * CUserTimer: Fine grained user programmable interrupt timer (based on ARM_IRQ_TIMER1)
    * CVirtualGPIOPin: Encapsulates a "virtual" GPIO pin controlled by the VideoCore (Output only).
    * CWindowDisplay: Non-overlapping window on a display.
    * CWriteBufferDevice: Filter for buffered write to (e.g. screen) device.

    Ansprechpartner für Umbau oder Modernisierung von Röhrenradios mittels SDR,DAB+,Internetradio,Firmwareentwicklung.
    Unser Open-Source Softwarebaukasten für Internetradios gibt es auf der Github-Seite! Projekt: BM45/iRadio (Google "github BM45/iRadio")

  • USB library

    * CDWHCICompletionQueue: Queues USB requests ready for completion (with USE_USB_FIQ enabled).
    * CDWHCIDevice: USB host controller interface (HCI) driver for Raspberry Pi 1-3.
    * CDWHCIFrameScheduler: Base class for a simple micro frame scheduler
    * CDWHCIFrameSchedulerIsochronous: Schedules the transmission of isochronous split frames to non-high-speed devices
    * CDWHCIFrameSchedulerNonPeriodic: Schedules the transmission of non-interrupt split frames to non-high-speed devices
    * CDWHCIFrameSchedulerNoSplit: Schedules the transmission of frames to direct attached non-high-speed devices
    * CDWHCIFrameSchedulerPeriodic: Schedules the transmission of interrupt split frames to non-high-speed devices
    * CDWHCIRegister: Supporting class for CDWHCIDevice, encapsulates a register of the HCI.
    * CDWHCIRootPort: Supporting class for CDWHCIDevice, initializes the root port.
    * CDWHCITransactionQueue: Queues coming USB transactions (with USE_USB_SOF_INTR enabled).
    * CDWHCITransferStageData: Holds all the data needed for a transfer stage on one HCI channel.
    * CLAN7800Device: Driver for the on-board USB Gigabit Ethernet device of the Raspberry Pi 3 B+.
    * CSMSC951xDevice: Driver for the on-board USB Ethernet device.
    * CUSBAudioControlDevice: Driver for USB audio control devices.
    * CUSBAudioStreamingDevice: Low-level driver for USB audio streaming devices.
    * CUSBAudioFunctionTopology: Topology parser for USB audio class devices.
    * CUSBBluetoothDevice: Bluetooth HCI transport driver for USB Bluetooth BR/EDR dongles.
    * CUSBBulkOnlyMassStorageDevice: Driver for USB mass storage devices (bulk only)
    * CUSBCDCEthernetDevice: Driver for the USB CDC Ethernet device implemented in QEMU.
    * CUSBConfigurationParser: Parses and validates an USB configuration descriptor.
    * CUSBController: Generic USB (host or gadget) controller
    * CUSBDevice: Encapsulates a general USB device (detects the functions of this device).
    * CUSBDeviceFactory: Creates the function objects of the different supported USB functions.
    * CUSBEndpoint: Encapsulates an endpoint of an USB device (supports control, bulk and interrupt EPs).
    * CUSBFloppyDiskDevice: Driver for USB floppy disk devices (CBI transport).
    * CUSBFunction: Encapsulates a function (represented by an interface descriptor) of an USB device.
    * CUSBGamePadDevice: Base class for USB gamepad drivers
    * CUSBGamePadPS3Device: Driver for PS3 gamepad
    * CUSBGamePadPS4Device: Driver for PS4 gamepad
    * CUSBGamePadStandardDevice: Driver for USB gamepads with USB HID class report interface (3-0-0)
    * CUSBGamePadSwitchProDevice: Driver for Nintendo Switch Pro gamepad
    * CUSBGamePadXbox360Device: Driver for Xbox 360 Wired gamepad
    * CUSBGamePadXboxOneDevice: Driver for Xbox One gamepad
    * CUSBHCIDevice: Alias for CDWHCIDevice, CXHCIDevice or CUSBSubSystem, depending on Raspberry Pi model.
    * CUSBHCIRootPort: Base class, which represents an USB HCI root port.
    * CUSBHIDDevice: General USB HID device (e.g. keyboard, mouse, gamepad)
    * CUSBHostController: Base class of USB host controllers.
    * CUSBKeyboardDevice: Driver for USB keyboards
    * CUSBMIDIDevice: Interface device for USB Audio Class MIDI 1.0 devices
    * CUSBMIDIHostDevice: Host driver for USB Audio Class MIDI 1.0 devices
    * CUSBMouseDevice: Driver for USB mice
    * CUSBPrinterDevice: Simple communications driver for USB printers (back-channel is not used).
    * CUSBRequest: A request to an USB device (URB).
    * CUSBSerialDevice: Interface device for USB serial devices.
    * CUSBSerialCDCDevice: Driver for USB CDC serial devices (e.g. micro:bit)
    * CUSBSerialCH341Device: Driver for CH341 based USB serial devices
    * CUSBSerialCP210xDevice: Driver for CP210x based USB serial devices
    * CUSBSerialDevice: Base class and interface for USB serial device drivers
    * CUSBSerialFT231XDevice: Driver for FTDI based USB serial devices
    * CUSBSerialHostDevice: Generic host driver for USB serial devices
    * CUSBSerialPL2303Device: Driver for PL2303 based USB serial devices
    * CUSBStandardHub: USB hub driver for LAN9512/9514 and external hubs (max. 8 ports)
    * CUSBString: Encapsulates a string descriptor, available on an USB device.
    * CUSBSubSystem: USB sub-system of the Raspberry Pi 5.
    * CUSBTouchScreenDevice: Driver for USB HID-class touchscreens.
    * CXHCICommandManager: Synchronous xHC command execution for the xHCI driver.
    * CXHCIDevice: USB host controller interface (xHCI) driver for Raspberry Pi 4.
    * CXHCIEndpoint: Encapsulates a single endpoint of an USB device for the xHCI driver.
    * CXHCIEventManager: xHC event handling for the xHCI driver.
    * CXHCIMMIOSpace: Provides access to the memory-mapped I/O registers of the xHCI controller.
    * CXHCIRing: Encapsulates a transfer, command or event ring for communication with the xHCI controller.
    * CXHCIRootHub: Initializes the available USB root ports of the xHCI controller.
    * CXHCIRootPort: Encapsulates an USB root port of the xHCI controller.
    * CXHCISharedMemAllocator: Shared memory allocation for the xHCI driver.
    * CXHCISlotManager: Manages the USB device slots of the xHCI controller.
    * CXHCIUSBDevice: Encapsulates a single USB device, attached to the xHCI controller.

    USB gadget library

    * CUSBCDCGadget: USB serial CDC gadget
    * CUSBCDCGadgetEndpoint: Endpoint of the USB serial CDC gadget
    * CDWUSBGadget: DW USB gadget on Raspberry Pi (3)A(+), Zero (2) (W), 4B
    * CDWUSBGadgetEndpoint: Endpoint of a DW USB gadget
    * CDWUSBGadgetEndpoint0: Endpoint 0 of a DW USB gadget
    * CUSBMIDIGadget: USB MIDI (v1.0) gadget
    * CUSBMIDIGadgetEndpoint: Endpoint of the USB MIDI gadget
    * CUSBMSDGadget: USB mass storage device gadget
    * CUSBMSDGadgetEndpoint: Endpoint of the USB mass storage gadget

    Input library

    * CConsole: Console device using screen/USB keyboard or alternate device (e.g. CSerialDevice)
    * CKeyboardBehaviour: Generic keyboard function
    * CKeyboardBuffer: Buffers characters entered on the USB keyboard
    * CKeyMap: Keyboard translation map (six selectable default maps at the moment)
    * CLineDiscipline: Implements line editor function
    * CMouseBehaviour: Generic mouse function, handles the mouse cursor
    * CMouseDevice: Generic mouse interface device
    * CRPiTouchScreen: Driver for the official Raspberry Pi touch screen
    * CTouchScreenDevice: Generic touch screen interface device
    * CXPT2046TouchScreen: Driver for XPT2046-based touch screens

    FS library

    * CPartition: Derived from CDevice, restricts access to a storage partition inside its boundaries.
    * CPartitionManager: Creates a CPartition object for each primary (non-EFI) partition.

    FAT FS library

    * CFAT: Encapsulates the File Allocation Table structure of a FAT storage partition.
    * CFATInfo: Encapsulates the configuration information describing a FAT storage partition (from BPB and FS Info).
    * CFATDirectory: Encapsulates a directory on a FAT partition (currently 8.3-names in the root directory only).
    * CFATFileSystem: File system driver for FAT16 and FAT32 storage partitions.
    * CFATCache: Sector cache for FAT storage partitions.

    Ansprechpartner für Umbau oder Modernisierung von Röhrenradios mittels SDR,DAB+,Internetradio,Firmwareentwicklung.
    Unser Open-Source Softwarebaukasten für Internetradios gibt es auf der Github-Seite! Projekt: BM45/iRadio (Google "github BM45/iRadio")

  • Scheduler library

    * CMutex: Provides a method to provide mutual exclusion (critical sections) across tasks.
    * CTask: Overload this class, define the Run() method to implement your own task and call new on it to start it.
    * CScheduler: Cooperative non-preemtive scheduler which controls which task runs at a time.
    * CSemaphore: Implements a semaphore synchronization class.
    * CSynchronizationEvent: Provides a method to synchronize the execution of a task with an event.

    Net library

    * CARPHandler: Resolves IP addresses to Ethernet MAC addresses and responds to ARP requests.
    * CChecksumCalculator: Calculates checksums in several TCP/IP packets.
    * CDHCPClient: DHCP client task. Gets and maintains an IP address lease for the network device.
    * CDNSClient: Resolves hostnames to IP addresses.
    * CHTTPClient: Requests documents from HTTP webservers.
    * CHTTPDaemon: Simple HTTP server class.
    * CICMPHandler: ICMP error message handler and echo (ping) responder.
    * CIPAddress: Encapsulates an IP address.
    * CLinkLayer: Encapsulates the Ethernet MAC layer.
    * CmDNSPublisher: mDNS / Bonjour client task.
    * CMQTTClient: Client for the MQTT IoT protocol.
    * CMQTTReceivePacket: MQTT helper class.
    * CMQTTSendPacket: MQTT helper class.
    * CNetConfig: Encapsulates the network configuration.
    * CNetConnection: Virtual transport layer connection (UDP or TCP (not yet available)).
    * CNetDeviceLayer: Encapsulates the network device support layer. Queues TX/RX frames before/after transmission.
    * CNetQueue: Encapsulates a network packet queue.
    * CNetSocket: Base class of networking sockets.
    * CNetSubSystem: The main network subsystem class. Create an instance of it in the CKernel class.
    * CNetTask: The main networking task running in the background. Processes the different network layers.
    * CNetworkLayer: Encapsulates the IP network layer. Does not support packet fragmentation so far.
    * CNTPClient: A NTP client which gets the current time from an Internet time server.
    * CNTPDaemon: Background task which uses CNTPClient to update the system time every 15 minutes.
    * CPHYTask: Background task which continuously updates the PHY of the used net device.
    * CRetransmissionQueue: The TCP retransmission queue.
    * CRetransmissionTimeoutCalculator: Calculates the TCP retransmission timeout according to RFC 6298.
    * CRouteCache: Caches special routes, received via ICMP redirect requests.
    * CSocket: Network application interface (socket) class.
    * CSysLogDaemon: Syslog sender task according to RFC5424 and RFC5426 (UDP transport only).
    * CTCPConnection: Encapsulates a TCP connection. Derived from CNetConnection.
    * CTCPRejector: Rejects TCP segments which do not address an open connection. Derived from CNetConnection.
    * CTFTPDaemon: TFTP server task.
    * CTransportLayer: Encapsulates the TCP/UDP transport layer.
    * CUDPConnection: Encapsulates a (virtual) UDP connection. Derived from CNetConnection.

    Sound library

    * CDMASoundBuffers: Concatenated DMA buffers to be used by sound device drivers.
    * CHDMISoundBaseDevice: Low level access to the HDMI sound device (without VCHIQ).
    * CI2SSoundBaseDevice: Low level access to the I2S sound device.
    * CPCM512xSoundController: Sound controller for PCM512x.
    * CPWMSoundDevice: Using the PWM device to playback sound samples in different formats.
    * CPWMSoundBaseDevice: Low level access to the PWM device to generate sounds on the 3.5mm headphone jack.
    * CSoundBaseDevice: Base class of sound devices, converts several sound formats.
    * CSoundController: Optional controller of a sound device.
    * CUSBSoundBaseDevice: High-level driver for USB audio streaming devices.
    * CUSBSoundController: Sound controller for USB sound devices.
    * CWM8960SoundController: Sound controller for WM8960.

    Ansprechpartner für Umbau oder Modernisierung von Röhrenradios mittels SDR,DAB+,Internetradio,Firmwareentwicklung.
    Unser Open-Source Softwarebaukasten für Internetradios gibt es auf der Github-Seite! Projekt: BM45/iRadio (Google "github BM45/iRadio")

  • Man kann seine eigenen Programme zunächst in qemu testen und dort auch mit Einschränkungen gpio Daten-I/O mitschreiben um diese offline zu analysieren, aber dennoch muss man später auf die richtige Hardware rauf. Dafür empfehle ich unbedingt ein Micro-SD-Karten Verlängerungskabel (einfach so bei Amazon eingeben) zu verwenden, da das ständige Umstecken der Karten zwischen Programmiersystem und Zielsystem erstens zu fummelig wird und zweitens auf Dauer dem mini Kartenhalter direkt auf dem Raspberry nicht so bekömmlich sein könnte. Noch habe ich keine Probleme gehabt, aber ich zweifele das das Teil 10.000 Steckzyklen sauber übersteht.

    Ein anderer Weg wäre es wohl über einen RS232 Bootloader zu gehen, in der SDK Doku findet man dazu einen Text, ausprobiert habe ich diesen Weg noch nicht.

    Wichtig ist, darauf habe ich zunächst nicht geachtet, das die Raspberrys alle erstmal in einem Basistakt starten, der allerdings schon so schnell ist, wie man sie auf TMS320 DSP Boards findet, also um 600 MHz. Erst mit einem CPU Clockmanagement (Klasse ist im SDK drin) erreicht man dann Maximalleistung. https://circle-rpi.readthedocs.io/en/49.0/basic-…management.html

    Einen AAC / MP3 Dekoder konnte ich Bare Metal übersetzen, theoretisch könnte man einmal versuchen alles was man so an GNU Radio "High Level" versucht hat, direkt auf die Hardware zu bringen. Da die ganzen Zwischenschichten und auch das Betriebssystem wegfallen ist selbst so ein kleiner "Zero W2" mit einem Kern rasend schnell und er hat 4 davon!

    Zur Erinnerung mit einem TMS320 bei 600 MHz ging Digital Satellite Radio (DSR) und auch DAB. Ein PMOD DAC Board dran, er könnte COHIRADIA Dateien vom Filesystem sehr sicher, davon bin ich nach ersten Hochrechnungen überzeugt, abspielen oder über einen externen ADC direkt aufzeichnen, wenn Linux, Python usw. aus der Kette rausgenommen werden. (Nachtrag: Ein erster praktischer Erfolg über R2R DAC konnte erzielt werden.)

    Mit AAC/MP3 Bare Metal libs gingen auch mehrere Internetradiostreams zeitgleich zu dekodieren, die direkt auf mehrere Software DDS moduliert werden, das Summensignal geht direkt auf ein PMOD DAC. Unter GNU Radio auf Linux läuft das ja zufriedenstellend bisher nur auf den viel größeren Raspberry Modellen und nicht auf Zeros oder ältere Modelle.

    Oder ein SDR mit hübscher Waterfall/Touch-GUI in LVGL auf einem eigenen Kern, bleiben 3 Kerne, DMA und viel RAM nur fürs Signalprozessing ohne das da noch ein ressourcenverbrauchendes OS mitmischen möchte, eigentlich ein Programmers Heaven wie man heute sagt.

    Ansprechpartner für Umbau oder Modernisierung von Röhrenradios mittels SDR,DAB+,Internetradio,Firmwareentwicklung.
    Unser Open-Source Softwarebaukasten für Internetradios gibt es auf der Github-Seite! Projekt: BM45/iRadio (Google "github BM45/iRadio")

    Edited 2 times, last by Bernhard45 (May 6, 2025 at 4:23 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!