Açıklama Yok

Petteri Aimonen 053fec7b6a Add preliminary SDIO support and enable build for V1.1. 3 yıl önce
.github 19e1250b8b Bugfixes for SCSI2SD integration 3 yıl önce
include 6c55cf3b9d Initial fork of BlueSCSI firmware, no hardware 3 yıl önce
lib 053fec7b6a Add preliminary SDIO support and enable build for V1.1. 3 yıl önce
src 3376afa204 Several bugfixes 3 yıl önce
test 6c55cf3b9d Initial fork of BlueSCSI firmware, no hardware 3 yıl önce
utils 73862dd156 Add github workflow 3 yıl önce
.gitignore 1849488127 Rename project to AzulSCSI 3 yıl önce
LICENSE 1849488127 Rename project to AzulSCSI 3 yıl önce
README.md d6873ac90e Update readme 3 yıl önce
azulscsi.ini 2cb3b22d32 Add example ini file 3 yıl önce
platformio.ini 053fec7b6a Add preliminary SDIO support and enable build for V1.1. 3 yıl önce

README.md

AzulSCSI Firmware

Harddrive image files

AzulSCSI uses the same harddrive image file format as in BlueSCSI instructions.

The image files should be named e.g. HD00_512.hda for ID 0, LUN 0, 512 byte block.

Log files and error indications

Log messages are stored in azullog.txt, which is cleared on every boot. Normally only basic initialization information is stored, but turning DIPSW2 on will cause every SCSI command to be logged.

The indicator LED will normally report disk access. It also reports following status conditions:

  • 1 fast blink on boot: Image file loaded successfully
  • 3 fast blinks: No images found on SD card
  • 5 fast blinks: SD card not detected
  • Continuous morse pattern: firmware crashed, morse code indicates crash location

In crashes the firmware will also attempt to save information into azulerr.txt.

Configuration file

Optional configuration can be stored in azulscsi.ini. If image file is found but configuration is missing, a default configuration is used.

Example config file is available here: azulscsi.ini.

Performance

With verbose log messages disabled, expected SCSI performance is 2.4 MB/s read and 2.1 MB/s write. Slow SD card or fragmented filesystem can slow down access.

Seek performance is best if image files are contiguous. For ExFAT filesystem this relies on a file flag set by PC. Current versions of exfat-fuse on Linux have an issue that causes the files not to be marked contiguous even when they are. This is indicated by message WARNING: file HD00_512.hda is not contiguous. This will increase read latency. in the log.

Hotplugging

The firmware supports hot-plug removal and reinsertion of SD card. The status led will blink continuously when card is not present, then blink once when card is reinserted successfully.

It will depend on the host system whether it gets confused by hotplugging. Any IO requests issued when card is removed will be timeouted.

Programming

The AzulSCSI v1 board can be programmed using USB connection in DFU mode. The necessary programmer utility for Windows can be downloaded from GD32 website. On Linux and Mac gd32-dfu-utils can be used.

DIP switches

The DIP switch settings are as follows:

  • DIPSW1: Not used
  • DIPSW2: Enable verbose debug log (saved to azullog.txt)
  • DIPSW3: Enable SCSI termination
  • DIPSW4: Enable built-in USB bootloader

Project structure

  • src/AzulSCSI.cpp: Main portable SCSI implementation.
  • src/AzulSCSI_disk.cpp: Interface between SCSI2SD code and SD card reading.
  • src/AzulSCSI_log.cpp: Simple logging functionality, uses memory buffering.
  • src/AzulSCSI_config.h: Some compile-time options, usually no need to change.
  • lib/AzulSCSI_platform_GD32F205: Platform-specific code for GD32F205.
  • lib/SCSI2SD: SCSI2SD V6 code, used for SCSI command implementations.
  • lib/minIni: Ini config file access library
  • lib/SdFat_NoArduino: Modified version of SdFat library for use without Arduino core.
  • utils/run_gdb.sh: Helper script for debugging with st-link adapter. Displays SWO log directly in console.

Building

This codebase uses PlatformIO. To build run the command:

pio run

Origins and License

This firmware is derived from two sources, both under GPL 3 license:

Main program structure:

  • SCSI command implementations are from SCSI2SD.
  • SCSI physical layer code is mostly custom, with some inspiration from BlueSCSI.
  • Image file access is derived from BlueSCSI.

Major changes from BlueSCSI and SCSI2SD include:

  • Separation of platform-specific functionality to separate file to ease porting.
  • Ported to GD32F205.
  • Removal of Arduino core dependency, as it was not currently available for GD32F205.
  • Buffered log functions.
  • Direct streaming between SD card and SCSI for slightly improved performance.