Developers (Advanced) - BlueSCSI/BlueSCSI-v2 GitHub Wiki
Development Environment
BlueSCSI v2 uses PlatformIO as it's dependency and build tool. You can install the PlatformIO IDE or use the PlatformIO Core CLI to build BlueSCSI.
PlatformIO IDE
Install Visual Studio Code or VSCodium.
Clone the BlueSCSI-v2 git repo and open the cloned folder in the IDE.
You will be prompted to install PlatformIO - follow the prompts to install the PlatformIO extension.
Run the "Build" task.
Flash the the .pio/build/BlueSCSI_Pico/firmware.uf2
file to the Pico following the flashing instructions.
USB Serial Debug
Connect the Pico via USB to your computer. Use a terminal program like Tera Term (Win) or CoolTerm (Mac/Win) to view real time logs from the Pico. Note the first logs may go by faster than the USB Serial starts. You can start with the SD Card out then insert it to see the config log.
Setting up PicoProbe
Analyzing Crash
arm-none-eabi-addr2line
is needed and not installed by default on PlatformIO.
# Mac
$ brew install gcc-arm-embedded
# Usage:
# utils/analyze_crashlog.sh # paste log to console, press ctrl-D to end
# utils/analyze_crashlog.sh log.txt # read log from file
# utils/analyze_crashlog.sh log.txt path # read log from file and find firmware at path
Release
- On
main
editsrc/BlueSCSI_config.h
- set the date andrel
, commit and tag, egv2024.09.15
- Edit
src/BlueSCSI_config.h
back to date + 1 anddev
- Push tag
git push origin v2024.09.15
- While action is running, create a release off the tag (GH Action should really do this itself)
- Generate release notes, note any commits or PR's.
- Once action is done and notes updated push main.
List of SCSI Commands implemented
I wrote this up quite a while ago, so may be outdated. Clause sections are in https://www.staff.uni-mainz.de/tacke/scsi/SCSI2.html
Command | OpCode | Type | Clause | BlueSCSI v1 | BlueSCSI v2 | PiSCSI |
---|---|---|---|---|---|---|
TEST UNIT READY | 00h | Mandatory | 8.2.16 | Y | Y | Y |
REZERO UNIT | 01h | Optional | 9.2.13 | Y | Y | Y |
REQUEST SENSE | 03h | Mandatory | 8.2.14 | Y | Y | Y |
FORMAT UNIT | 04h | Mandatory | 9.2.1 | N | Y | Y |
REASSIGN BLOCKS | 07h | Optional | 9.2.10 | N | N | Y |
READ6 | 08h | Mandatory | 9.2.5 | Y | Y | Y |
WRITE6 | 0Ah | Optional | 9.2.20 | Y | Y | Y |
SEEK6 | 0Bh | Optional | 9.2.15 | N | Y | N |
SCSI Write sector buffer? | 0Fh | ? | N | Y | N | |
INQUIRY | 12h | Mandatory | 8.2.5 | Y | Y | Y |
MODE SELECT6 | 15h | Optional | 8.2.9 | Y | Y | Y |
RESERVE | 16h | Mandatory | 9.2.12 | N | Y | Y |
RELEASE | 17h | Mandatory | 9.2.12 | N | Y | Y |
COPY | 18h | Optional | 8.2.3 | N | N | N |
MODE SENSE6 | 1Ah | Optional | 8.2.10 | Y | Y | Y |
START STOP UNIT | 1Bh | Optional | 9.2.17 | N | Y | Y |
RECEIVE DIAGNOSTICS RESULTS | 1Ch | Optional | 8.2.13 | N | Y | N |
SEND DIAGNOSTIC | 1Dh | Mandatory | 8.2.15 | Y | Y | Y |
PREVENT-ALLOW MEDIUM REMOVAL | 1Eh | Optional | 9.2.4 | Y | Y | Y |
READ CAPACITY | 25h | Mandatory | 9.2.7 | Y | Y | Y |
READ10 | 28h | Mandatory | 9.2.6 | Y | Y | Y |
WRITE10 | 2Ah | Optional | 9.2.21 | Y | Y | Y |
SEEK10 | 2Bh | Optional | 9.2.15 | N | Y | N |
WRITE AND VERIFY | 2Eh | Optional | 9.2.22 | N | Y | N |
VERIFY | 2Fh | Optional | 9.2.19 | Y | Y | Y |
SEARCH DATA HIGH | 30h | Optional | 9.2.14.2 | N | N | N |
SEARCH DATA EQUAL | 31h | Optional | 9.2.14.1 | N | N | N |
SEARCH DATA LOW | 32h | Optional | 9.2.14.3 | N | N | N |
SET LIMITS | 33h | Optional | 9.2.16 | N | N | N |
PRE_FETCH | 34h | Optional | 9.2.3 | Y | Y | N |
SYNCHRONIZE CACHE | 35h | Optional | 9.2.18 | Y | Y | Y |
LOCK-UNLOCK CACHE | 36h | Optional | 9.2.2 | Y | Y | N |
READ DEFECT DATA | 37h | Optional | 9.2.8 | N | Y | Y |
COMPARE | 39h | Optional | 8.2.2 | N | N | N |
COPY AND VERIFY | 3Ah | Optional | 8.2.4 | N | N | N |
WRITE BUFFER | 3Bh | Optional | 8.2.17 | Y | Y | N |
READ BUFFER | 3Ch | Optional | 9.2.12 | Y | Y | N |
READ LONG | 3Eh | Optional | 9.2.9 | N | N | Y |
WRITE LONG | 3Fh | Optional | 9.2.23 | N | N | Y |
CHANGE DEFINITION | 40h | Optional | 8.2.1 | N | N | N |
WRITE SAME | 41h | Optional | 9.2.24 | N | N | N |
READ TOC | 43h | ? | N | N | Y | |
GET EVENT STATUS NOTIFICATION | 4Ah | ? | N | N | Y | |
LOG SELECT | 4Ch | Optional | 8.2.6 | N | N | N |
LOG SENSE | 4Dh | Optional | 8.2.7 | N | N | N |
MODE SELECT10 | 55h | Optional | 8.2.8 | Y | Y | Y |
MODE SENSE10 | 5Ah | Optional | 8.2.11 | Y | Y | Y |
READ 16 | 88h | ? | N | N | Y | |
WRITE 16 | 8Ah | ? | N | N | Y | |
VERIFY 16 | 8Fh | ? | N | N | Y | |
SYNC CACHE 16 | 91h | ? | N | N | Y | |
READ CAPACITY 16 | 9Eh | ? | N | N | Y | |
REPORT LUNS | A0h | ? | N | N | Y | |
SKIP READ | E8h | IBM proprietary, e.g. AS/400 | IBM Enterprise Storage Server SCSI Command Reference | N | N | N |
SKIP WRITE | EAh | IBM proprietary, e.g. AS/400 | IBM Enterprise Storage Server SCSI Command Reference | N | N | N |