Skip to content

Commit

Permalink
GD32F205: Fix build errors
Browse files Browse the repository at this point in the history
There is circular dependency as GD32F205 platform includes
ZuluSCSI_disk.h for the prefetchbytes workaround. This
requires `lib_ldf_mode = chain+` for platformio.

In addition the GD32F205 with audio buffers is very low on RAM.
Moved some constants into flash so that the new multi-bin/cue support
fits.
  • Loading branch information
PetteriAimonen committed Nov 1, 2024
1 parent 95364e7 commit 0a828e7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/ZuluSCSI_platform_GD32F205/gd32_cdc_acm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static const usb_desc_str product_string =
};

/* USBD serial string */
static usb_desc_str serial_string =
static const usb_desc_str serial_string =
{
.header =
{
Expand Down
2 changes: 1 addition & 1 deletion lib/ZuluSCSI_platform_GD32F205/scsi_accel_dma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,4 @@ static void greenpak_stop_dma()
exti_interrupt_disable(GREENPAK_PLD_IO2_EXTI);
}

#endif
#endif
2 changes: 1 addition & 1 deletion lib/ZuluSCSI_platform_GD32F205/usbd_msc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static __ALIGN_BEGIN const usb_desc_str product_string __ALIGN_END = {
};

/* USBD serial string */
static __ALIGN_BEGIN usb_desc_str serial_string __ALIGN_END = {
static __ALIGN_BEGIN const usb_desc_str serial_string __ALIGN_END = {
.header =
{
.bLength = USB_STRING_LEN(12U),
Expand Down
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ board_build.ldscript = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205.ld
ldscript_bootloader = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205_btldr.ld
framework = spl
lib_compat_mode = off
lib_ldf_mode = chain+
lib_deps =
SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
minIni
Expand Down
38 changes: 19 additions & 19 deletions src/ZuluSCSI_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,25 @@ void ZuluSCSISettings::setDefaultDriveInfo(uint8_t scsiId, const char *presetNam



static const char *driveinfo_fixed[4] = DRIVEINFO_FIXED;
static const char *driveinfo_removable[4] = DRIVEINFO_REMOVABLE;
static const char *driveinfo_optical[4] = DRIVEINFO_OPTICAL;
static const char *driveinfo_floppy[4] = DRIVEINFO_FLOPPY;
static const char *driveinfo_magopt[4] = DRIVEINFO_MAGOPT;
static const char *driveinfo_network[4] = DRIVEINFO_NETWORK;
static const char *driveinfo_tape[4] = DRIVEINFO_TAPE;

static const char *apl_driveinfo_fixed[4] = APPLE_DRIVEINFO_FIXED;
static const char *apl_driveinfo_removable[4] = APPLE_DRIVEINFO_REMOVABLE;
static const char *apl_driveinfo_optical[4] = APPLE_DRIVEINFO_OPTICAL;
static const char *apl_driveinfo_floppy[4] = APPLE_DRIVEINFO_FLOPPY;
static const char *apl_driveinfo_magopt[4] = APPLE_DRIVEINFO_MAGOPT;
static const char *apl_driveinfo_network[4] = APPLE_DRIVEINFO_NETWORK;
static const char *apl_driveinfo_tape[4] = APPLE_DRIVEINFO_TAPE;

static const char *iomega_driveinfo_removeable[4] = IOMEGA_DRIVEINFO_ZIP100;
static const char * const driveinfo_fixed[4] = DRIVEINFO_FIXED;
static const char * const driveinfo_removable[4] = DRIVEINFO_REMOVABLE;
static const char * const driveinfo_optical[4] = DRIVEINFO_OPTICAL;
static const char * const driveinfo_floppy[4] = DRIVEINFO_FLOPPY;
static const char * const driveinfo_magopt[4] = DRIVEINFO_MAGOPT;
static const char * const driveinfo_network[4] = DRIVEINFO_NETWORK;
static const char * const driveinfo_tape[4] = DRIVEINFO_TAPE;

static const char * const apl_driveinfo_fixed[4] = APPLE_DRIVEINFO_FIXED;
static const char * const apl_driveinfo_removable[4] = APPLE_DRIVEINFO_REMOVABLE;
static const char * const apl_driveinfo_optical[4] = APPLE_DRIVEINFO_OPTICAL;
static const char * const apl_driveinfo_floppy[4] = APPLE_DRIVEINFO_FLOPPY;
static const char * const apl_driveinfo_magopt[4] = APPLE_DRIVEINFO_MAGOPT;
static const char * const apl_driveinfo_network[4] = APPLE_DRIVEINFO_NETWORK;
static const char * const apl_driveinfo_tape[4] = APPLE_DRIVEINFO_TAPE;

static const char * const iomega_driveinfo_removeable[4] = IOMEGA_DRIVEINFO_ZIP100;

const char **driveinfo = NULL;
const char * const * driveinfo = NULL;
bool known_preset = false;
scsi_system_settings_t& cfgSys = m_sys;

Expand Down Expand Up @@ -483,4 +483,4 @@ scsi_device_preset_t ZuluSCSISettings::getDevicePreset(uint8_t scsiId)
const char* ZuluSCSISettings::getDevicePresetName(uint8_t scsiId)
{
return devicePresetName[m_devPreset[scsiId]];
}
}

0 comments on commit 0a828e7

Please sign in to comment.