platformio.ini 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. ; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html
  2. [platformio]
  3. default_envs = ZuluSCSIv1_0, ZuluSCSIv1_0_mini, ZuluSCSIv1_1_plus, ZuluSCSI_RP2040, ZuluSCSI_RP2040_Audio, ZuluSCSI_Pico, ZuluSCSI_Pico_DaynaPORT, ZuluSCSI_Pico_2, ZuluSCSI_Pico_2_DaynaPORT, ZuluSCSI_Blaster
  4. [env]
  5. build_flags =
  6. -DBUILD_ENV=$PIOENV
  7. ; Example platform to serve as a base for porting efforts
  8. [env:template]
  9. platform = ststm32
  10. framework = arduino
  11. board = bluepill_f103c8
  12. build_flags =
  13. ${env.build_flags}
  14. -Os -Isrc
  15. -DLOGBUFSIZE=512
  16. -DPREFETCH_BUFFER_SIZE=0
  17. -DMAX_SECTOR_SIZE=2048
  18. -DSCSI2SD_BUFFER_SIZE=4096
  19. -DINI_CACHE_SIZE=0
  20. -DUSE_ARDUINO=1
  21. lib_deps =
  22. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  23. minIni
  24. ZuluSCSI_platform_template
  25. SCSI2SD
  26. CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
  27. ; ZuluSCSI V1.0 hardware platform with GD32F205 CPU.
  28. [env:ZuluSCSIv1_0]
  29. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  30. board = genericGD32F205VC
  31. board_build.mcu = gd32f205vct6
  32. board_build.core = gd32
  33. board_build.ldscript = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205.ld
  34. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205_btldr.ld
  35. framework = spl
  36. lib_compat_mode = off
  37. lib_ldf_mode = chain+
  38. lib_deps =
  39. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  40. minIni
  41. ZuluSCSI_platform_GD32F205
  42. SCSI2SD
  43. CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
  44. GD32F20x_usbfs_library
  45. upload_protocol = stlink
  46. platform_packages = platformio/toolchain-gccarmnoneeabi@1.100301.220327
  47. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  48. debug_tool = stlink
  49. extra_scripts = src/build_bootloader.py
  50. debug_build_flags =
  51. -Os -Wall -Wno-sign-compare -ggdb -g3
  52. build_flags =
  53. ${env.build_flags}
  54. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  55. -DBUILD_ENV=$PIOENV
  56. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  57. -DSPI_DRIVER_SELECT=3
  58. -DSD_CHIP_SELECT_MODE=2
  59. -DENABLE_DEDICATED_SPI=1
  60. -DPIO_USBFS_DEVICE_CDC
  61. -DZULUSCSI_V1_0
  62. -DPLATFORM_MASS_STORAGE
  63. -DSDFAT_NOARDUINO
  64. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  65. ; ZuluSCSI V1.0 mini hardware platform with GD32F205 CPU.
  66. [env:ZuluSCSIv1_0_mini]
  67. extends = env:ZuluSCSIv1_0
  68. build_flags =
  69. ${env.build_flags}
  70. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  71. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  72. -DSPI_DRIVER_SELECT=3
  73. -DSD_CHIP_SELECT_MODE=2
  74. -DENABLE_DEDICATED_SPI=1
  75. -DPIO_USBFS_DEVICE_CDC
  76. -DZULUSCSI_V1_0
  77. -DZULUSCSI_V1_0_mini
  78. -DPLATFORM_MASS_STORAGE
  79. -DSDFAT_NOARDUINO
  80. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  81. ; ZuluSCSI V1.1+ hardware platforms, this support v1.1, v1.1 ODE, and vl.2
  82. [env:ZuluSCSIv1_1_plus]
  83. extends = env:ZuluSCSIv1_0
  84. build_flags =
  85. ${env.build_flags}
  86. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  87. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  88. -DSPI_DRIVER_SELECT=3
  89. -DSD_CHIP_SELECT_MODE=2
  90. -DENABLE_DEDICATED_SPI=1
  91. -DPIO_USBFS_DEVICE_CDC
  92. -DHAS_SDIO_CLASS
  93. -DENABLE_AUDIO_OUTPUT
  94. -DENABLE_AUDIO_OUTPUT_I2S
  95. -DZULUSCSI_V1_1_plus
  96. -DPLATFORM_MASS_STORAGE
  97. -DSDFAT_NOARDUINO
  98. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  99. -DLOGBUFSIZE=8192
  100. ; ZuluSCSI settings shared among Raspberry Pi microcontroller like the RP2040 and RP2350
  101. ; Note: getting the code to break on main, check the comments in the rp2040-template.ld or rp23xx-template.ld
  102. ; They should instruct you on the changes needed to move code out of SRAM and back to flash
  103. [env:ZuluSCSI_RP2MCU]
  104. platform = https://github.com/maxgerhardt/platform-raspberrypi.git#39b90392af50585e429941bd2561a91949a2ba46
  105. platform_packages =
  106. framework-arduinopico@https://github.com/rabbitholecomputing/arduino-pico.git#v4.3.0-DaynaPORT
  107. extra_scripts =
  108. src/build_bootloader.py
  109. src/process-linker-script.py
  110. board_build.core = earlephilhower
  111. board_build.ldscript = ${BUILD_DIR}/rp_linker.ld ; created by src/process-linker-script.py
  112. framework = arduino
  113. lib_deps =
  114. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  115. minIni
  116. SCSI2SD
  117. ; When updating git tag for CUEParser here, also update lib\ZuluSCSI_platform_RP2MCU\library.json
  118. CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
  119. ZuluSCSI_platform_RP2MCU
  120. upload_protocol = cmsis-dap
  121. debug_tool = cmsis-dap
  122. debug_build_flags =
  123. -O2 -ggdb -g3
  124. build_flags =
  125. ${env.build_flags}
  126. -O2 -Isrc -ggdb -g3
  127. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  128. -DSPI_DRIVER_SELECT=3
  129. -DSD_CHIP_SELECT_MODE=2
  130. -DENABLE_DEDICATED_SPI=1
  131. -DHAS_SDIO_CLASS
  132. -DUSE_ARDUINO=1
  133. -DPICO_FLASH_SPI_CLKDIV=2
  134. -DPLATFORM_MASS_STORAGE
  135. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  136. -DRECLOCKING_SUPPORTED
  137. ; build flags mirroring the "framework-arduinopico#x.x.x-DaynaPORT" static library build
  138. -DPICO_CYW43_ARCH_POLL=1
  139. -DCYW43_LWIP=0
  140. -DCYW43_USE_OTP_MAC=0
  141. ; ZuluSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
  142. [env:ZuluSCSI_RP2040]
  143. extends = env:ZuluSCSI_RP2MCU
  144. board = zuluscsi_rp2040
  145. ; How much flash in bytes the bootloader and main app will be allocated
  146. ; It is used as the starting point for a ROM image saved in flash
  147. ; Changing this will cause issues with boards that already have a ROM drive in flash
  148. program_flash_allocation = 360448
  149. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  150. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  151. debug_build_flags =
  152. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  153. ; The values can be adjusted down to get a debug build to fit in to SRAM
  154. -DLOGBUFSIZE=4096
  155. build_flags =
  156. ${env:ZuluSCSI_RP2MCU.build_flags}
  157. -DZULUSCSI_V2_0
  158. -DZULUSCSI_MCU_RP20XX
  159. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  160. ; ZuluSCSI RP2040 hardware platform, as above, but with audio output support enabled
  161. [env:ZuluSCSI_RP2040_Audio]
  162. extends = env:ZuluSCSI_RP2040
  163. build_flags =
  164. ${env:ZuluSCSI_RP2040.build_flags}
  165. -DENABLE_AUDIO_OUTPUT
  166. -DENABLE_AUDIO_OUTPUT_SPDIF
  167. -DLOGBUFSIZE=8192
  168. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  169. ; Part of the ZuluSCSI_RP2040 platform, but with different pins.
  170. [env:ZuluSCSI_Pico]
  171. extends = env:ZuluSCSI_RP2MCU
  172. board = rpipico
  173. program_flash_allocation = 360448
  174. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  175. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  176. build_flags =
  177. ${env:ZuluSCSI_RP2MCU.build_flags}
  178. -DZULUSCSI_PICO
  179. -DZULUSCSI_MCU_RP20XX
  180. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico.program_flash_allocation}
  181. ; Build for the ZuluSCSI Pico carrier board with a Pico-W
  182. ; for SCSI DaynaPORT emulation
  183. [env:ZuluSCSI_Pico_DaynaPORT]
  184. extends = env:ZuluSCSI_RP2MCU
  185. board = rpipicow
  186. ; How much flash in bytes the bootloader and main app will be allocated
  187. ; It is used as the starting point for a ROM image saved in flash
  188. program_flash_allocation = 589824
  189. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  190. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  191. debug_build_flags =
  192. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  193. -DLOGBUFSIZE=4096
  194. -DPREFETCH_BUFFER_SIZE=0
  195. -DSCSI2SD_BUFFER_SIZE=57344
  196. ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes)
  197. ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes
  198. -DNETWORK_PACKET_QUEUE_SIZE=8
  199. ; This flag enables verbose logging of TCP/IP traffic and other information
  200. ; it also takes up a bit of SRAM so it should be disabled with production code
  201. -DNETWORK_DEBUG_LOGGING
  202. build_flags =
  203. ${env:ZuluSCSI_RP2MCU.build_flags}
  204. -DZULUSCSI_PICO
  205. -DZULUSCSI_MCU_RP20XX
  206. -DZULUSCSI_NETWORK
  207. -DZULUSCSI_DAYNAPORT
  208. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  209. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_DaynaPORT.program_flash_allocation}
  210. ; These take a large portion of the SRAM and can be adjusted
  211. -DLOGBUFSIZE=8192
  212. -DPREFETCH_BUFFER_SIZE=4608
  213. -DSCSI2SD_BUFFER_SIZE=57344
  214. ; This controls the depth of NETWORK_PACKET_MAX_SIZE (1520 bytes)
  215. ; For example a queue size of 10 would be 10 x 1520 = 15200 bytes
  216. -DNETWORK_PACKET_QUEUE_SIZE=14
  217. ; This flag enables verbose logging of TCP/IP traffic and other information
  218. ; it also takes up a bit of SRAM so it should be disabled with production code
  219. ; -DNETWORK_DEBUG_LOGGING
  220. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  221. ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.
  222. [env:ZuluSCSI_BS2]
  223. extends = env:ZuluSCSI_RP2MCU
  224. board = rpipico
  225. program_flash_allocation = 360448
  226. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  227. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  228. build_flags =
  229. ${env:ZuluSCSI_RP2MCU.build_flags}
  230. -DZULUSCSI_BS2
  231. -DZULUSCSI_MCU_RP20XX
  232. -DROMDRIVE_OFFSET=${env:ZuluSCSI_BS2.program_flash_allocation}
  233. ; ZuluSCSI Pico2 hardware platform, based on the Raspberry Pi foundation RP2350A microcontroller
  234. [env:ZuluSCSI_Pico_2]
  235. extends = env:ZuluSCSI_RP2MCU
  236. board = rpipico2
  237. ; How much flash in bytes the bootloader and main app will be allocated
  238. ; It is used as the starting point for a ROM image saved in flash
  239. ; Changing this will cause issues with boards that already have a ROM drive in flash
  240. program_flash_allocation = 360448
  241. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  242. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  243. debug_build_flags =
  244. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  245. build_flags =
  246. ${env:ZuluSCSI_RP2MCU.build_flags}
  247. -DZULUSCSI_PICO_2
  248. -DZULUSCSI_MCU_RP23XX
  249. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2.program_flash_allocation}
  250. ; ZuluSCSI VF4 hardware platform with GD32F450ZET6 CPU.
  251. [env:ZULUSCSIv1_4]
  252. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  253. board = genericGD32F450ZE
  254. board_build.mcu = gd32f450zet6
  255. board_build.core = gd32
  256. board_build.ldscript = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450.ld
  257. lib_ignore =
  258. ZuluSCSI_platform_GD32F205
  259. ZuluSCSI_platform_RP2040
  260. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450_btldr.ld
  261. framework = spl
  262. lib_compat_mode = off
  263. lib_deps =
  264. GD32F4xx_usbfs_library
  265. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  266. minIni
  267. ZuluSCSI_platform_GD32F450
  268. SCSI2SD
  269. CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
  270. upload_protocol = stlink
  271. platform_packages =
  272. toolchain-gccarmnoneeabi@1.90201.191206
  273. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  274. extra_scripts = src/build_bootloader.py
  275. debug_tool = stlink
  276. debug_build_flags = -Os -ggdb -g3
  277. build_flags =
  278. ${env.build_flags}
  279. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  280. -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
  281. -DSPI_DRIVER_SELECT=3
  282. -DSD_CHIP_SELECT_MODE=2
  283. -DENABLE_DEDICATED_SPI=1
  284. -DHAS_SDIO_CLASS
  285. -DPIO_USBFS_DEVICE_CDC
  286. -DZULUSCSI_V1_4
  287. ; -DPIO_USBFS_DEVICE_MSC
  288. -DPLATFORM_MASS_STORAGE
  289. -DSDFAT_NOARDUINO
  290. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  291. ;========================================
  292. ; ZuluSCSI RP2350 hardware platform, based on the Raspberry Pi foundation RP2350 microcontroller
  293. [env:ZuluSCSI_Blaster]
  294. extends = env:ZuluSCSI_RP2MCU
  295. board = zuluscsi_blaster
  296. program_flash_allocation = 589824
  297. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  298. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  299. lib_deps =
  300. ${env:ZuluSCSI_RP2MCU.lib_deps}
  301. ZuluI2S
  302. build_flags =
  303. ${env:ZuluSCSI_RP2MCU.build_flags}
  304. -DZULUSCSI_BLASTER
  305. -DZULUSCSI_MCU_RP23XX
  306. -DENABLE_AUDIO_OUTPUT
  307. -DENABLE_AUDIO_OUTPUT_I2S
  308. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Blaster.program_flash_allocation}
  309. ; Use the -Wl line below as a "build_flags" entry if you wish to make a map file
  310. ; to check memory locations of the compiled code.
  311. ; -Wl,-Map="${platformio.build_dir}/${this.__env__}/firmware.map"
  312. [env:ZuluSCSI_Pico_2_DaynaPORT]
  313. extends = env:ZuluSCSI_RP2MCU
  314. board = rpipico2w
  315. ; How much flash in bytes the bootloader and main app will be allocated
  316. ; It is used as the starting point for a ROM image saved in flash
  317. ; Changing this will cause issues with boards that already have a ROM drive in flash
  318. program_flash_allocation = 589824
  319. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  320. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  321. build_flags =
  322. ${env:ZuluSCSI_RP2MCU.build_flags}
  323. -DZULUSCSI_PICO_2
  324. -DZULUSCSI_MCU_RP23XX
  325. -DZULUSCSI_PICO_2_DAYNAPORT
  326. -DZULUSCSI_NETWORK
  327. -DZULUSCSI_DAYNAPORT
  328. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  329. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2_DaynaPORT.program_flash_allocation}