Quellcode durchsuchen

platformio fix build profiles

Eric Helgeson vor 6 Monaten
Ursprung
Commit
0908c1f830

+ 2 - 2
lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform.h

@@ -35,9 +35,9 @@
 #elif defined(BLUESCSI_PICO_2)
 // BlueSCSI Pico 2 carrier board variant
 #include "BlueSCSI_platform_gpio_Pico_2.h"
-#elif defined(BLUESCSI_BS2)
+#elif defined(BLUESCSI_V2)
 // BS2 hardware variant, using Raspberry Pico board on a carrier PCB
-#include "BlueSCSI_platform_gpio_BS2.h"
+#include "BlueSCSI_platform_gpio_v2.h"
 #elif defined(BLUESCSI_BLASTER)
 // RP2350B variant, using mcu chip directly
 #include "BlueSCSI_platform_gpio_Blaster.h"

+ 1 - 1
lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform_config.h

@@ -52,7 +52,7 @@
 # define PLATFORM_HAS_INITIATOR_MODE 1
 # define PLATFORM_MAX_SCSI_SPEED S2S_CFG_SPEED_SYNC_20
 # define PLATFORM_DEFAULT_SCSI_SPEED_SETTING 20
-#elif defined(BLUESCSI_BS2)
+#elif defined(BLUESCSI_V2)
 # define PLATFORM_NAME "BlueSCSI BS2"
 # define PLATFORM_PID "BS2"
 # define PLATFORM_REVISION "1.0"

+ 0 - 0
lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform_gpio_BS2.h → lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform_gpio_v2.h


+ 12 - 214
platformio.ini

@@ -1,109 +1,12 @@
 ; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html
 
 [platformio]
-default_envs = BlueSCSIv1_0, BlueSCSIv1_0_mini, BlueSCSIv1_1_plus, BlueSCSI_RP2040, BlueSCSI_RP2040_Audio, BlueSCSI_Pico, BlueSCSI_Pico_DaynaPORT, BlueSCSI_Pico_2, BlueSCSI_Pico_2_DaynaPORT, BlueSCSI_Blaster
+default_envs = BlueSCSI_Pico, BlueSCSI_Pico_DaynaPORT, BlueSCSI_Pico_2, BlueSCSI_Pico_2_DaynaPORT
 
 [env]
 build_flags =
     -DBUILD_ENV=$PIOENV
 
-; Example platform to serve as a base for porting efforts
-[env:template]
-platform = ststm32
-framework = arduino
-board = bluepill_f103c8
-build_flags =
-    ${env.build_flags}
-    -Os -Isrc
-    -DLOGBUFSIZE=512
-    -DPREFETCH_BUFFER_SIZE=0
-    -DMAX_SECTOR_SIZE=2048
-    -DSCSI2SD_BUFFER_SIZE=4096
-    -DINI_CACHE_SIZE=0
-    -DUSE_ARDUINO=1
-lib_deps =
-    SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
-    minIni
-    BlueSCSI_platform_template
-    SCSI2SD
-    CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
-
-; BlueSCSI V1.0 hardware platform with GD32F205 CPU.
-[env:BlueSCSIv1_0]
-platform = https://github.com/CommunityGD32Cores/platform-gd32.git
-board = genericGD32F205VC
-board_build.mcu = gd32f205vct6
-board_build.core = gd32
-board_build.ldscript = lib/BlueSCSI_platform_GD32F205/bluescsi_gd32f205.ld
-ldscript_bootloader = lib/BlueSCSI_platform_GD32F205/bluescsi_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
-    BlueSCSI_platform_GD32F205
-    SCSI2SD
-    CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
-    GD32F20x_usbfs_library
-upload_protocol = stlink
-platform_packages = platformio/toolchain-gccarmnoneeabi@1.100301.220327
-    framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
-debug_tool = stlink
-extra_scripts = src/build_bootloader.py
-debug_build_flags = 
-     -Os -Wall -Wno-sign-compare -ggdb -g3
-build_flags = 
-    ${env.build_flags}
-     -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
-     -DBUILD_ENV=$PIOENV
-     -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
-     -DSPI_DRIVER_SELECT=3
-     -DSD_CHIP_SELECT_MODE=2
-     -DENABLE_DEDICATED_SPI=1
-     -DPIO_USBFS_DEVICE_CDC
-     -DBLUESCSI_V1_0
-     -DPLATFORM_MASS_STORAGE
-     -DSDFAT_NOARDUINO
-     -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
-
-; BlueSCSI V1.0 mini hardware platform with GD32F205 CPU.
-[env:BlueSCSIv1_0_mini]
-extends = env:BlueSCSIv1_0
-build_flags = 
-    ${env.build_flags}
-     -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
-     -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
-     -DSPI_DRIVER_SELECT=3
-     -DSD_CHIP_SELECT_MODE=2
-     -DENABLE_DEDICATED_SPI=1
-     -DPIO_USBFS_DEVICE_CDC
-     -DBLUESCSI_V1_0
-     -DBLUESCSI_V1_0_mini
-     -DPLATFORM_MASS_STORAGE
-     -DSDFAT_NOARDUINO
-     -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
-
-; BlueSCSI V1.1+ hardware platforms, this support v1.1, v1.1 ODE, and vl.2
-[env:BlueSCSIv1_1_plus]
-extends = env:BlueSCSIv1_0
-build_flags =
-    ${env.build_flags}
-     -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
-     -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
-     -DSPI_DRIVER_SELECT=3
-     -DSD_CHIP_SELECT_MODE=2
-     -DENABLE_DEDICATED_SPI=1
-     -DPIO_USBFS_DEVICE_CDC
-     -DHAS_SDIO_CLASS
-     -DENABLE_AUDIO_OUTPUT
-     -DENABLE_AUDIO_OUTPUT_I2S
-     -DBLUESCSI_V1_1_plus
-     -DPLATFORM_MASS_STORAGE
-     -DSDFAT_NOARDUINO
-     -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
-     -DLOGBUFSIZE=8192
-
 ; BlueSCSI settings shared among Raspberry Pi microcontroller like the RP2040 and RP2350
 ; Note: getting the code to break on main, check the comments in the rp2040-template.ld or rp23xx-template.ld
 ;       They should instruct you on the changes needed to move code out of SRAM and back to flash
@@ -149,50 +52,29 @@ build_flags =
 	-DCYW43_USE_OTP_MAC=0
 
 
-
-; BlueSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
-[env:BlueSCSI_RP2040]
+; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
+; Part of the BlueSCSI_RP2040 platform, but with different pins.
+[env:BlueSCSI_Pico]
 extends = env:BlueSCSI_RP2MCU
-board = bluescsi_rp2040
-; How much flash in bytes the bootloader and main app will be allocated
-; It is used as the starting point for a ROM image saved in flash
-; Changing this will cause issues with boards that already have a ROM drive in flash
+board = rpipico
 program_flash_allocation = 360448
 linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp2040-template.ld
 ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp2040_btldr.ld
-debug_build_flags =
-    ${env:BlueSCSI_RP2MCU.debug_build_flags}
-; The values can be adjusted down to get a debug build to fit in to SRAM
-    -DLOGBUFSIZE=4096
 build_flags =
     ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_V2_0
+    -DBLUESCSI_V2
     -DBLUESCSI_MCU_RP20XX
-    -DROMDRIVE_OFFSET=${env:BlueSCSI_RP2040.program_flash_allocation}
+    -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico.program_flash_allocation}
 
 ; BlueSCSI RP2040 hardware platform, as above, but with audio output support enabled
-[env:BlueSCSI_RP2040_Audio]
+[env:BlueSCSI_Pico_Audio]
 extends = env:BlueSCSI_RP2040
 build_flags =
-    ${env:BlueSCSI_RP2040.build_flags}
+    ${env:BlueSCSI_Pico.build_flags}
     -DENABLE_AUDIO_OUTPUT
     -DENABLE_AUDIO_OUTPUT_SPDIF
     -DLOGBUFSIZE=8192
 
-; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
-; Part of the BlueSCSI_RP2040 platform, but with different pins.
-[env:BlueSCSI_Pico]
-extends = env:BlueSCSI_RP2MCU
-board = rpipico
-program_flash_allocation = 360448
-linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp2040-template.ld
-ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp2040_btldr.ld
-build_flags =
-    ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_PICO
-    -DBLUESCSI_MCU_RP20XX
-    -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico.program_flash_allocation}
-
 ; Build for the BlueSCSI Pico carrier board with a Pico-W
 ; for SCSI DaynaPORT emulation
 [env:BlueSCSI_Pico_DaynaPORT]
@@ -216,7 +98,7 @@ debug_build_flags =
     -DNETWORK_DEBUG_LOGGING
 build_flags =
     ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_PICO
+    -DBLUESCSI_V2
     -DBLUESCSI_MCU_RP20XX
     -DBLUESCSI_NETWORK
     -DBLUESCSI_DAYNAPORT
@@ -234,20 +116,6 @@ build_flags =
     ; -DNETWORK_DEBUG_LOGGING
 
 
-; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
-; Differs in pinout from BlueSCSI_RP2040 platform, but shares most of the code.
-[env:BlueSCSI_BS2]
-extends = env:BlueSCSI_RP2MCU
-board = rpipico
-program_flash_allocation = 360448
-linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp2040-template.ld
-ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp2040_btldr.ld
-build_flags =
-    ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_BS2
-    -DBLUESCSI_MCU_RP20XX
-    -DROMDRIVE_OFFSET=${env:BlueSCSI_BS2.program_flash_allocation}
-
 ; BlueSCSI Pico2 hardware platform, based on the Raspberry Pi foundation RP2350A microcontroller
 [env:BlueSCSI_Pico_2]
 extends = env:BlueSCSI_RP2MCU
@@ -262,80 +130,10 @@ debug_build_flags =
     ${env:BlueSCSI_RP2MCU.debug_build_flags}
 build_flags =
     ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_PICO_2
+    -DBLUESCSI_V2
     -DBLUESCSI_MCU_RP23XX
     -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico_2.program_flash_allocation}
 
-; BlueSCSI VF4 hardware platform with GD32F450ZET6 CPU.
-[env:BLUESCSIv1_4]
-platform = https://github.com/CommunityGD32Cores/platform-gd32.git
-board = genericGD32F450ZE
-board_build.mcu = gd32f450zet6
-board_build.core = gd32
-board_build.ldscript = lib/BlueSCSI_platform_GD32F450/bluescsi_gd32f450.ld
-lib_ignore = 
-    BlueSCSI_platform_GD32F205
-    BlueSCSI_platform_RP2040
-ldscript_bootloader = lib/BlueSCSI_platform_GD32F450/bluescsi_gd32f450_btldr.ld
-framework = spl
-lib_compat_mode = off
-lib_deps =
-    GD32F4xx_usbfs_library
-    SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
-    minIni
-    BlueSCSI_platform_GD32F450
-    SCSI2SD
-    CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
-upload_protocol = stlink
-platform_packages = 
-    toolchain-gccarmnoneeabi@1.90201.191206
-    framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
-extra_scripts = src/build_bootloader.py
-debug_tool = stlink
-debug_build_flags = -Os -ggdb -g3
-build_flags = 
-    ${env.build_flags}
-     -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
-     -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
-     -DSPI_DRIVER_SELECT=3
-     -DSD_CHIP_SELECT_MODE=2
-     -DENABLE_DEDICATED_SPI=1   
-     -DHAS_SDIO_CLASS
-     -DPIO_USBFS_DEVICE_CDC
-     -DBLUESCSI_V1_4
-;     -DPIO_USBFS_DEVICE_MSC
-     -DPLATFORM_MASS_STORAGE
-     -DSDFAT_NOARDUINO
-     -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
-
-;========================================
-; BlueSCSI RP2350 hardware platform, based on the Raspberry Pi foundation RP2350 microcontroller
-[env:BlueSCSI_Blaster]
-extends = env:BlueSCSI_RP2MCU
-board = bluescsi_blaster
-program_flash_allocation = 786432
-linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp23xx-template.ld
-ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp23xx_btldr.ld
-lib_deps =
-    ${env:BlueSCSI_RP2MCU.lib_deps}
-    BlueI2S
-    SDIO_RP2350=https://github.com/rabbitholecomputing/SDIO_RP2350#1.0.3
-build_flags =
-    ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_BLASTER
-    -DBLUESCSI_MCU_RP23XX
-    -DENABLE_AUDIO_OUTPUT
-    -DENABLE_AUDIO_OUTPUT_I2S
-    -DSD_USE_RP2350_SDIO
-    -DBLUESCSI_NETWORK
-    -DBLUESCSI_DAYNAPORT
-    -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
-    -DBLUESCSI_RM2
-    -DROMDRIVE_OFFSET=${env:BlueSCSI_Blaster.program_flash_allocation}
-; Use the -Wl line below as a "build_flags" entry if you wish to make a map file
-; to check memory locations of the compiled code.
-;    -Wl,-Map="${platformio.build_dir}/${this.__env__}/firmware.map"
-
 [env:BlueSCSI_Pico_2_DaynaPORT]
 extends = env:BlueSCSI_RP2MCU
 board = rpipico2w
@@ -347,7 +145,7 @@ linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp23xx-template.ld
 ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp23xx_btldr.ld
 build_flags =
     ${env:BlueSCSI_RP2MCU.build_flags}
-    -DBLUESCSI_PICO_2
+    -DBLUESCSI_V2
     -DBLUESCSI_MCU_RP23XX
     -DBLUESCSI_PICO_2_DAYNAPORT
     -DBLUESCSI_NETWORK