Skip to content

Commit

Permalink
Merge pull request #467 from ZuluSCSI/feature/merge-rp2xxx-libs
Browse files Browse the repository at this point in the history
Merge the RP2350 and the RP2040 base MCU platform libraries into a common library
  • Loading branch information
aperezbios authored Nov 4, 2024
2 parents 2d60284 + 6fdb664 commit 5c620ac
Show file tree
Hide file tree
Showing 75 changed files with 3,022 additions and 205 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/firmware_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
build_firmware:
name: RHC-internal-Z4
runs-on: self-hosted
# name: Build firmware on Ubuntu 20.04
# runs-on: ubuntu-20.04
# name: RHC-internal-Z4
# runs-on: self-hosted
name: Build firmware on GitHub using latest Ubuntu
runs-on: ubuntu-latest

steps:
- name: Check out code from GitHub
Expand Down Expand Up @@ -39,18 +39,18 @@ jobs:
path: ZuluSCSI/distrib/*
name: ZuluSCSI binaries

- name: Upload to latest release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.ref == 'refs/heads/main'
run: |
cd ZuluSCSI
git tag -d latest
git tag latest
git push origin --force latest
cd distrib
gh api repos/${GITHUB_REPOSITORY}/releases/tags/latest | jq -r '.assets[] | [.url] | @tsv' | xargs -n 1 gh api -X DELETE || true
gh release upload --repo ${GITHUB_REPOSITORY} --clobber latest *
# - name: Upload to latest release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# if: github.ref == 'refs/heads/main'
# run: |
# cd ZuluSCSI
# git tag -d latest
# git tag latest
# git push origin --force latest
# cd distrib
# gh api repos/${GITHUB_REPOSITORY}/releases/tags/latest | jq -r '.assets[] | [.url] | @tsv' | xargs -n 1 gh api -X DELETE || true
# gh release upload --repo ${GITHUB_REPOSITORY} --clobber latest *

- name: Upload to newly created release
env:
Expand Down
55 changes: 55 additions & 0 deletions boards/rpipico.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2E8A",
"usb_pid": "0x000A"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0x000A"
]
],
"mcu": "rp2040",
"variant": "rpipico"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "ZuluSCSI Pico",
"upload": {
"maximum_ram_size": 262144,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "cmsis-dap",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "http://zuluscsi.com",
"vendor": "Rabbit Hole Computing LLC"
}
57 changes: 57 additions & 0 deletions boards/rpipico2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "none.S",
"usb_vid": "0x2E8A",
"usb_pid": "0x000F"
}
},
"core": "earlephilhower",
"cpu": "cortex-m33",
"extra_flags": "-DARDUINO_RASPBERRY_PI_PICO_2 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
"f_cpu": "150000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0x000F"
]
],
"mcu": "rp2350",
"variant": "rpipico2"
},
"debug": {
"jlink_device": "RP2350_0",
"openocd_target": "rp2350.cfg",
"svd_path": "rp2350.svd"
},
"frameworks": [
"arduino"
],
"name": "ZuluSCSI Pico 2",
"upload": {
"psram_length": 0,
"maximum_ram_size": 524288,
"maximum_size": 4194304,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "cmsis-dap",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe",
"pico-debug"
]
},
"url": "http://zuluscsi.com",
"vendor": "Rabbit Hole Computing LLC"
}
55 changes: 55 additions & 0 deletions boards/rpipicow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2E8A",
"usb_pid": "0xF00A"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_RASPBERRY_PI_PICO_W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0xF00A"
]
],
"mcu": "rp2040",
"variant": "rpipicow"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "ZuluSCSI Pico DaynaPORT",
"upload": {
"maximum_ram_size": 262144,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "cmsis-dap",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "http://zuluscsi.com",
"vendor": "Rabbit Hole Computing LLC"
}
12 changes: 6 additions & 6 deletions boards/zuluscsi_rp2040.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_RHC_ZULUSCSI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
"extra_flags": "-DARDUINO_GENERIC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 ",
"f_cpu": "125000000L",
"hwids": [
[
Expand All @@ -22,7 +22,7 @@
]
],
"mcu": "rp2040",
"variant": "zuluscsi_rp2040"
"variant": "generic"
},
"debug": {
"jlink_device": "RP2040_M0_0",
Expand All @@ -32,15 +32,15 @@
"frameworks": [
"arduino"
],
"name": "ZuluSCSI",
"name": "ZuluSCSI RP2040",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocol": "cmsis-dap",
"protocols": [
"blackmagic",
"cmsis-dap",
Expand All @@ -51,7 +51,7 @@
"pico-debug"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Rabbit Hole Computing"
"url": "http://zuluscsi.com",
"vendor": "Rabbit Hole Computing LLC"
}

55 changes: 55 additions & 0 deletions boards/zuluscsi_rp2350A.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "none.S",
"usb_vid": "0x2E8A",
"usb_pid": "0xF00F"
}
},
"core": "earlephilhower",
"cpu": "cortex-m33",
"extra_flags": "-DARDUINO_GENERIC_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 ",
"f_cpu": "150000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0xF00F"
]
],
"mcu": "rp2350",
"variant": "generic_rp2350"
},
"debug": {
"jlink_device": "RP2350_0",
"openocd_target": "rp2350.cfg",
"svd_path": "rp2350.svd"
},
"frameworks": [
"arduino"
],
"name": "ZuluSCSI RP2350A",
"upload": {
"maximum_ram_size": 524288,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "cmsis-dap",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "http://zuluscsi.com",
"vendor": "Rabbit Hole Computing LLC"
}
4 changes: 2 additions & 2 deletions lib/SCSI2SD/src/firmware/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ extern void dbgmsg_buf(const unsigned char *buf, unsigned long size);
extern void dbgmsg_f(const char *format, ...);

#define DBGMSG_BUF(buf, size) dbgmsg_buf(buf, size)
#define DBGMSG_F(format, ...) dbgmsg_f(format, __VA_ARGS__);
#define DBGMSG_F(format, ...) dbgmsg_f(format, __VA_ARGS__)
#define LOGMSG_BUF(buf, size) logmsg_buf(buf, size)
#define LOGMSG_F(format, ...) logmsg_f(format, __VA_ARGS__);
#define LOGMSG_F(format, ...) logmsg_f(format, __VA_ARGS__)

#else

Expand Down
2 changes: 1 addition & 1 deletion lib/SCSI2SD/src/firmware/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int scsiNetworkCommand()
int size = sizeof(struct wifi_network_entry) * nets;
if (size + 2 > sizeof(scsiDev.data))
{
LOGMSG_F("WARNING: wifi_network_list is bigger than scsiDev.data, truncating");
LOGMSG_F("WARNING: wifi_network_list is bigger than scsiDev.data, truncating", 0);
size = sizeof(scsiDev.data) - 2;
size -= (size % (sizeof(struct wifi_network_entry)));
}
Expand Down
Loading

0 comments on commit 5c620ac

Please sign in to comment.