; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html [platformio] default_envs = BlueSCSI_Pico, BlueSCSI_Pico_DaynaPORT, BlueSCSI_Pico_2, BlueSCSI_Pico_2_DaynaPORT [env] build_flags = -DBUILD_ENV=$PIOENV ; 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 [env:BlueSCSI_RP2MCU] platform = https://github.com/maxgerhardt/platform-raspberrypi.git#39b90392af50585e429941bd2561a91949a2ba46 platform_packages = framework-arduinopico@https://github.com/BlueSCSI/arduino-pico-internal.git#v4.3.0-DaynaPORT extra_scripts = src/build_bootloader.py src/process-linker-script.py board_build.core = earlephilhower board_build.ldscript = ${BUILD_DIR}/rp_linker.ld ; created by src/process-linker-script.py framework = arduino lib_deps = SdFat=https://github.com/BlueSCSI/SdFat#2.2.3-gpt minIni SCSI2SD ; When updating git tag for CUEParser here, also update lib\BlueSCSI_platform_RP2MCU\library.json CUEParser=https://github.com/BlueSCSI/CUEParser#v2025.02.25 BlueSCSI_platform_RP2MCU upload_protocol = cmsis-dap debug_tool = cmsis-dap debug_build_flags = -O2 -ggdb -g3 build_flags = ${env.build_flags} -O2 -Isrc -ggdb -g3 -Wall -Wno-sign-compare -Wno-ignored-qualifiers -Wno-overloaded-virtual -DSPI_DRIVER_SELECT=3 -DSD_CHIP_SELECT_MODE=2 -DENABLE_DEDICATED_SPI=1 -DHAS_SDIO_CLASS -DUSE_ARDUINO=1 -DPICO_FLASH_SPI_CLKDIV=2 -DPLATFORM_MASS_STORAGE -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC -DDISABLE_FS_H_WARNING -DRECLOCKING_SUPPORTED -DPLATFORM_HAS_INITIATOR_MODE ; SWO detection handled at runtime -DDISABLE_SWO ; build flags mirroring the "framework-arduinopico#x.x.x-DaynaPORT" static library build -DPICO_CYW43_ARCH_POLL=1 -DCYW43_PIN_WL_DYNAMIC=1 -DCYW43_LWIP=0 -DCYW43_USE_OTP_MAC=0 ; 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_V2 -DBLUESCSI_MCU_RP20XX -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico.program_flash_allocation} ; BlueSCSI RP2040 hardware platform, as above, but with audio output support enabled [env:BlueSCSI_Pico_Audio] extends = env:BlueSCSI_RP2040 build_flags = ${env:BlueSCSI_Pico.build_flags} -DENABLE_AUDIO_OUTPUT -DENABLE_AUDIO_OUTPUT_SPDIF -DLOGBUFSIZE=8192 ; Build for the BlueSCSI Pico carrier board with a Pico-W ; for SCSI DaynaPORT emulation [env:BlueSCSI_Pico_DaynaPORT] extends = env:BlueSCSI_RP2MCU board = rpipicow ; 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 program_flash_allocation = 590936 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} -DLOGBUFSIZE=4096 -DPREFETCH_BUFFER_SIZE=0 -DSCSI2SD_BUFFER_SIZE=57344 ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes) ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes -DNETWORK_PACKET_QUEUE_SIZE=8 ; This flag enables verbose logging of TCP/IP traffic and other information ; it also takes up a bit of SRAM so it should be disabled with production code -DNETWORK_DEBUG_LOGGING build_flags = ${env:BlueSCSI_RP2MCU.build_flags} -DBLUESCSI_V2 -DBLUESCSI_MCU_RP20XX -DBLUESCSI_NETWORK -DBLUESCSI_DAYNAPORT -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1 -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico_DaynaPORT.program_flash_allocation} ; These take a large portion of the SRAM and can be adjusted -DLOGBUFSIZE=2048 -DPREFETCH_BUFFER_SIZE=4608 -DSCSI2SD_BUFFER_SIZE=57344 ; This controls the depth of NETWORK_PACKET_MAX_SIZE (1520 bytes) ; For example a queue size of 10 would be 10 x 1520 = 15200 bytes -DNETWORK_PACKET_QUEUE_SIZE=14 ; This flag enables verbose logging of TCP/IP traffic and other information ; it also takes up a bit of SRAM so it should be disabled with production code ; -DNETWORK_DEBUG_LOGGING ; BlueSCSI Pico2 hardware platform, based on the Raspberry Pi foundation RP2350A microcontroller [env:BlueSCSI_Pico_2] extends = env:BlueSCSI_RP2MCU board = rpipico2 ; 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 program_flash_allocation = 360448 linker_script_template = lib/BlueSCSI_platform_RP2MCU/rp23xx-template.ld ldscript_bootloader = lib/BlueSCSI_platform_RP2MCU/rp23xx_btldr.ld debug_build_flags = ${env:BlueSCSI_RP2MCU.debug_build_flags} build_flags = ${env:BlueSCSI_RP2MCU.build_flags} -DBLUESCSI_V2 -DBLUESCSI_MCU_RP23XX -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico_2.program_flash_allocation} [env:BlueSCSI_Pico_2_DaynaPORT] extends = env:BlueSCSI_RP2MCU board = rpipico2w ; 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 program_flash_allocation = 589824 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_V2 -DBLUESCSI_MCU_RP23XX -DBLUESCSI_PICO_2_DAYNAPORT -DBLUESCSI_NETWORK -DBLUESCSI_DAYNAPORT -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1 -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico_2_DaynaPORT.program_flash_allocation}