Very early initial support for RPi 5 based on dev branch of circle. (#638)

* Very early initial support for RPi 5 based on dev branch of circle.

* Added parameter to choose UART option on all RPi versions to be GP14/15

* Build for Raspberry Pi 5

* Update README.md for RPi 5

---------

Co-authored-by: probonopd <probonopd@users.noreply.github.com>
pull/643/head
Kevin 7 months ago committed by GitHub
parent 349100d65a
commit 75eb763055
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .github/workflows/build.yml
  2. 3
      README.md
  3. 6
      src/config.txt
  4. 4
      src/kernel.cpp
  5. 8
      src/minidexed.cpp
  6. 6
      src/serialmididevice.cpp
  7. 18
      src/usbminidexedmidigadget.h
  8. 4
      submod.sh

@ -27,6 +27,12 @@ jobs:
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
tar xf *-arm-none-eabi.tar.xz tar xf *-arm-none-eabi.tar.xz
mkdir -p kernels mkdir -p kernels
- name: Build for Raspberry Pi 5
run: |
set -ex
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
RPI=5 bash -ex build.sh
cp ./src/kernel*.img ./kernels/
- name: Build for Raspberry Pi 4 - name: Build for Raspberry Pi 4
run: | run: |
set -ex set -ex

@ -32,7 +32,8 @@ Video about this project by [Floyd Steinberg](https://www.youtube.com/watch?v=Z3
## System Requirements ## System Requirements
- Raspberry Pi 1, 2, 3, 4, or 400 (Zero and Zero 2 can be used but need HDMI or a supported i2s DAC for audio out). On Raspberry Pi 1 and on Raspberry Pi Zero there will be severely limited functionality (only one tone generator instead of 8) - Raspberry Pi 1, 2, 3, 4, or 400. Raspberry Pi Zero and Zero 2 can be used but need HDMI or a supported i2s DAC for audio out. On Raspberry Pi 1 and on Raspberry Pi Zero there will be severely limited functionality (only one tone generator instead of 8)
- Raspberry Pi 5 can be used but currently support is experimental; HDMI sound and USB Gadget mode are not available yet
- A [PCM5102A or PCM5122 based DAC](https://github.com/probonopd/MiniDexed/wiki/Hardware#i2s-dac), HDMI display or [audio extractor](https://github.com/probonopd/MiniDexed/wiki/Hardware#hdmi-to-audio) for good sound quality. If you don't have this, you can use the headphone jack on the Raspberry Pi but on anything but the Raspberry 4 the sound quality will be seriously limited - A [PCM5102A or PCM5122 based DAC](https://github.com/probonopd/MiniDexed/wiki/Hardware#i2s-dac), HDMI display or [audio extractor](https://github.com/probonopd/MiniDexed/wiki/Hardware#hdmi-to-audio) for good sound quality. If you don't have this, you can use the headphone jack on the Raspberry Pi but on anything but the Raspberry 4 the sound quality will be seriously limited
- Optionally (but highly recommended), an [LCDC1602 Display](https://www.berrybase.de/en/sensors-modules/displays/alphanumeric-displays/alphanumerisches-lcd-16x2-gr-252-n/gelb) (with or without i2c "backpack" board) and a [KY-040 rotary encoder](https://www.berrybase.de/en/components/passive-components/potentiometer/rotary-encoder/drehregler/rotary-encoder-mit-breakoutboard-ohne-gewinde-und-mutter) - Optionally (but highly recommended), an [LCDC1602 Display](https://www.berrybase.de/en/sensors-modules/displays/alphanumeric-displays/alphanumerisches-lcd-16x2-gr-252-n/gelb) (with or without i2c "backpack" board) and a [KY-040 rotary encoder](https://www.berrybase.de/en/components/passive-components/potentiometer/rotary-encoder/drehregler/rotary-encoder-mit-breakoutboard-ohne-gewinde-und-mutter)

@ -10,7 +10,7 @@ gpu_mem=16
disable_overscan=0 disable_overscan=0
# #
# Use 64-bit for RPi 3, 4, 400 and Zero 2, and 32-bit for all other models # Use 64-bit for RPi 3, 4, 400, 5 and Zero 2, and 32-bit for all other models
# #
[pi3] [pi3]
@ -24,3 +24,7 @@ kernel=kernel8-rpi4.img
# Zero 2 W # Zero 2 W
[pi02] [pi02]
arm_64bit=1 arm_64bit=1
[pi5]
arm_64bit=1
kernel=kernel_2712.img

@ -68,8 +68,12 @@ bool CKernel::Initialize (void)
if (m_Config.GetUSBGadgetMode()) if (m_Config.GetUSBGadgetMode())
{ {
#if RASPPI==5
#warning No support for USB Gadget Mode on RPI 5 yet
#else
// Run the USB stack in USB Gadget (device) mode // Run the USB stack in USB Gadget (device) mode
m_pUSB = new CUSBMiniDexedMIDIGadget (&mInterrupt); m_pUSB = new CUSBMiniDexedMIDIGadget (&mInterrupt);
#endif
} }
else else
{ {

@ -103,7 +103,11 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
if (pConfig->GetUSBGadgetMode()) if (pConfig->GetUSBGadgetMode())
{ {
#if RASPPI==5
LOGNOTE ("USB Gadget (Device) Mode NOT supported on RPI 5");
#else
LOGNOTE ("USB In Gadget (Device) Mode"); LOGNOTE ("USB In Gadget (Device) Mode");
#endif
} }
else else
{ {
@ -128,6 +132,9 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
} }
else if (strcmp (pDeviceName, "hdmi") == 0) else if (strcmp (pDeviceName, "hdmi") == 0)
{ {
#if RASPPI==5
LOGNOTE ("HDMI mode NOT supported on RPI 5.");
#else
LOGNOTE ("HDMI mode"); LOGNOTE ("HDMI mode");
m_pSoundDevice = new CHDMISoundBaseDevice (pInterrupt, pConfig->GetSampleRate (), m_pSoundDevice = new CHDMISoundBaseDevice (pInterrupt, pConfig->GetSampleRate (),
@ -136,6 +143,7 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
// The channels are swapped by default in the HDMI sound driver. // The channels are swapped by default in the HDMI sound driver.
// TODO: Remove this line, when this has been fixed in the driver. // TODO: Remove this line, when this has been fixed in the driver.
m_bChannelsSwapped = !m_bChannelsSwapped; m_bChannelsSwapped = !m_bChannelsSwapped;
#endif
} }
else else
{ {

@ -28,11 +28,15 @@
LOGMODULE("serialmididevice"); LOGMODULE("serialmididevice");
// There are several UART options - see circle/include/serial.h
// 0 corresponds to GP14/GP15 on all RPi versions.
#define SERIAL_MIDI_DEVICE 0
CSerialMIDIDevice::CSerialMIDIDevice (CMiniDexed *pSynthesizer, CInterruptSystem *pInterrupt, CSerialMIDIDevice::CSerialMIDIDevice (CMiniDexed *pSynthesizer, CInterruptSystem *pInterrupt,
CConfig *pConfig, CUserInterface *pUI) CConfig *pConfig, CUserInterface *pUI)
: CMIDIDevice (pSynthesizer, pConfig, pUI), : CMIDIDevice (pSynthesizer, pConfig, pUI),
m_pConfig (pConfig), m_pConfig (pConfig),
m_Serial (pInterrupt, TRUE), m_Serial (pInterrupt, TRUE, SERIAL_MIDI_DEVICE),
m_nSerialState (0), m_nSerialState (0),
m_nSysEx (0), m_nSysEx (0),
m_SendBuffer (&m_Serial) m_SendBuffer (&m_Serial)

@ -22,6 +22,23 @@
#ifndef _usbminidexedmidigadget_h #ifndef _usbminidexedmidigadget_h
#define _usbminidexedmidigadget_h #define _usbminidexedmidigadget_h
#if RASPPI==5
#include <circle/sysconfig.h>
#include <assert.h>
#warning No support for USB Gadget Mode on RPI 5 yet
class CUSBMiniDexedMIDIGadget
{
public:
CUSBMiniDexedMIDIGadget (CInterruptSystem *pInterruptSystem)
{
}
~CUSBMiniDexedMIDIGadget (void)
{
}
};
#else
#include <circle/usb/gadget/usbmidigadget.h> #include <circle/usb/gadget/usbmidigadget.h>
#include <circle/usb/gadget/usbmidigadgetendpoint.h> #include <circle/usb/gadget/usbmidigadgetendpoint.h>
#include <circle/sysconfig.h> #include <circle/sysconfig.h>
@ -82,5 +99,6 @@ protected:
return CUSBMIDIGadget::GetDescriptor(wValue, wIndex, pLength); return CUSBMIDIGadget::GetDescriptor(wValue, wIndex, pLength);
} }
}; };
#endif
#endif #endif

@ -6,13 +6,13 @@ git submodule update --init --recursive
# #
# Use fixed master branch of circle-stdlib then re-update # Use fixed master branch of circle-stdlib then re-update
cd circle-stdlib/ cd circle-stdlib/
git checkout 695ab4a git checkout 3bd135d
git submodule update --init --recursive git submodule update --init --recursive
cd - cd -
# #
# Optional update submodules explicitly # Optional update submodules explicitly
cd circle-stdlib/libs/circle cd circle-stdlib/libs/circle
git checkout fe09c4b git checkout 4b3e06f
cd - cd -
cd circle-stdlib/libs/circle-newlib cd circle-stdlib/libs/circle-newlib
#git checkout develop #git checkout develop

Loading…
Cancel
Save