platformio.ini 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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 -Wno-overloaded-virtual
  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. -DDISABLE_FS_H_WARNING
  137. -DRECLOCKING_SUPPORTED
  138. ; build flags mirroring the "framework-arduinopico#x.x.x-DaynaPORT" static library build
  139. -DPICO_CYW43_ARCH_POLL=1
  140. -DCYW43_LWIP=0
  141. -DCYW43_USE_OTP_MAC=0
  142. ; ZuluSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
  143. [env:ZuluSCSI_RP2040]
  144. extends = env:ZuluSCSI_RP2MCU
  145. board = zuluscsi_rp2040
  146. ; How much flash in bytes the bootloader and main app will be allocated
  147. ; It is used as the starting point for a ROM image saved in flash
  148. ; Changing this will cause issues with boards that already have a ROM drive in flash
  149. program_flash_allocation = 360448
  150. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  151. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  152. debug_build_flags =
  153. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  154. ; The values can be adjusted down to get a debug build to fit in to SRAM
  155. -DLOGBUFSIZE=4096
  156. build_flags =
  157. ${env:ZuluSCSI_RP2MCU.build_flags}
  158. -DZULUSCSI_V2_0
  159. -DZULUSCSI_MCU_RP20XX
  160. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  161. ; ZuluSCSI RP2040 hardware platform, as above, but with audio output support enabled
  162. [env:ZuluSCSI_RP2040_Audio]
  163. extends = env:ZuluSCSI_RP2040
  164. build_flags =
  165. ${env:ZuluSCSI_RP2040.build_flags}
  166. -DENABLE_AUDIO_OUTPUT
  167. -DENABLE_AUDIO_OUTPUT_SPDIF
  168. -DLOGBUFSIZE=8192
  169. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  170. ; Part of the ZuluSCSI_RP2040 platform, but with different pins.
  171. [env:ZuluSCSI_Pico]
  172. extends = env:ZuluSCSI_RP2MCU
  173. board = rpipico
  174. program_flash_allocation = 360448
  175. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  176. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  177. build_flags =
  178. ${env:ZuluSCSI_RP2MCU.build_flags}
  179. -DZULUSCSI_PICO
  180. -DZULUSCSI_MCU_RP20XX
  181. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico.program_flash_allocation}
  182. ; Build for the ZuluSCSI Pico carrier board with a Pico-W
  183. ; for SCSI DaynaPORT emulation
  184. [env:ZuluSCSI_Pico_DaynaPORT]
  185. extends = env:ZuluSCSI_RP2MCU
  186. board = rpipicow
  187. ; How much flash in bytes the bootloader and main app will be allocated
  188. ; It is used as the starting point for a ROM image saved in flash
  189. program_flash_allocation = 589824
  190. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  191. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  192. debug_build_flags =
  193. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  194. -DLOGBUFSIZE=4096
  195. -DPREFETCH_BUFFER_SIZE=0
  196. -DSCSI2SD_BUFFER_SIZE=57344
  197. ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes)
  198. ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes
  199. -DNETWORK_PACKET_QUEUE_SIZE=8
  200. ; This flag enables verbose logging of TCP/IP traffic and other information
  201. ; it also takes up a bit of SRAM so it should be disabled with production code
  202. -DNETWORK_DEBUG_LOGGING
  203. build_flags =
  204. ${env:ZuluSCSI_RP2MCU.build_flags}
  205. -DZULUSCSI_PICO
  206. -DZULUSCSI_MCU_RP20XX
  207. -DZULUSCSI_NETWORK
  208. -DZULUSCSI_DAYNAPORT
  209. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  210. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_DaynaPORT.program_flash_allocation}
  211. ; These take a large portion of the SRAM and can be adjusted
  212. -DLOGBUFSIZE=8192
  213. -DPREFETCH_BUFFER_SIZE=4608
  214. -DSCSI2SD_BUFFER_SIZE=57344
  215. ; This controls the depth of NETWORK_PACKET_MAX_SIZE (1520 bytes)
  216. ; For example a queue size of 10 would be 10 x 1520 = 15200 bytes
  217. -DNETWORK_PACKET_QUEUE_SIZE=14
  218. ; This flag enables verbose logging of TCP/IP traffic and other information
  219. ; it also takes up a bit of SRAM so it should be disabled with production code
  220. ; -DNETWORK_DEBUG_LOGGING
  221. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  222. ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.
  223. [env:ZuluSCSI_BS2]
  224. extends = env:ZuluSCSI_RP2MCU
  225. board = rpipico
  226. program_flash_allocation = 360448
  227. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  228. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  229. build_flags =
  230. ${env:ZuluSCSI_RP2MCU.build_flags}
  231. -DZULUSCSI_BS2
  232. -DZULUSCSI_MCU_RP20XX
  233. -DROMDRIVE_OFFSET=${env:ZuluSCSI_BS2.program_flash_allocation}
  234. ; ZuluSCSI Pico2 hardware platform, based on the Raspberry Pi foundation RP2350A microcontroller
  235. [env:ZuluSCSI_Pico_2]
  236. extends = env:ZuluSCSI_RP2MCU
  237. board = rpipico2
  238. ; How much flash in bytes the bootloader and main app will be allocated
  239. ; It is used as the starting point for a ROM image saved in flash
  240. ; Changing this will cause issues with boards that already have a ROM drive in flash
  241. program_flash_allocation = 360448
  242. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  243. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  244. debug_build_flags =
  245. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  246. build_flags =
  247. ${env:ZuluSCSI_RP2MCU.build_flags}
  248. -DZULUSCSI_PICO_2
  249. -DZULUSCSI_MCU_RP23XX
  250. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2.program_flash_allocation}
  251. ; ZuluSCSI VF4 hardware platform with GD32F450ZET6 CPU.
  252. [env:ZULUSCSIv1_4]
  253. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  254. board = genericGD32F450ZE
  255. board_build.mcu = gd32f450zet6
  256. board_build.core = gd32
  257. board_build.ldscript = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450.ld
  258. lib_ignore =
  259. ZuluSCSI_platform_GD32F205
  260. ZuluSCSI_platform_RP2040
  261. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450_btldr.ld
  262. framework = spl
  263. lib_compat_mode = off
  264. lib_deps =
  265. GD32F4xx_usbfs_library
  266. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  267. minIni
  268. ZuluSCSI_platform_GD32F450
  269. SCSI2SD
  270. CUEParser=https://github.com/rabbitholecomputing/CUEParser#v2025.02.25
  271. upload_protocol = stlink
  272. platform_packages =
  273. toolchain-gccarmnoneeabi@1.90201.191206
  274. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  275. extra_scripts = src/build_bootloader.py
  276. debug_tool = stlink
  277. debug_build_flags = -Os -ggdb -g3
  278. build_flags =
  279. ${env.build_flags}
  280. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  281. -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
  282. -DSPI_DRIVER_SELECT=3
  283. -DSD_CHIP_SELECT_MODE=2
  284. -DENABLE_DEDICATED_SPI=1
  285. -DHAS_SDIO_CLASS
  286. -DPIO_USBFS_DEVICE_CDC
  287. -DZULUSCSI_V1_4
  288. ; -DPIO_USBFS_DEVICE_MSC
  289. -DPLATFORM_MASS_STORAGE
  290. -DSDFAT_NOARDUINO
  291. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  292. ;========================================
  293. ; ZuluSCSI RP2350 hardware platform, based on the Raspberry Pi foundation RP2350 microcontroller
  294. [env:ZuluSCSI_Blaster]
  295. extends = env:ZuluSCSI_RP2MCU
  296. board = zuluscsi_blaster
  297. program_flash_allocation = 589824
  298. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  299. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  300. lib_deps =
  301. ${env:ZuluSCSI_RP2MCU.lib_deps}
  302. ZuluI2S
  303. SDIO_RP2350=https://github.com/rabbitholecomputing/SDIO_RP2350
  304. build_flags =
  305. ${env:ZuluSCSI_RP2MCU.build_flags}
  306. -DZULUSCSI_BLASTER
  307. -DZULUSCSI_MCU_RP23XX
  308. -DENABLE_AUDIO_OUTPUT
  309. -DENABLE_AUDIO_OUTPUT_I2S
  310. -DSD_USE_RP2350_SDIO
  311. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Blaster.program_flash_allocation}
  312. ; Use the -Wl line below as a "build_flags" entry if you wish to make a map file
  313. ; to check memory locations of the compiled code.
  314. ; -Wl,-Map="${platformio.build_dir}/${this.__env__}/firmware.map"
  315. [env:ZuluSCSI_Pico_2_DaynaPORT]
  316. extends = env:ZuluSCSI_RP2MCU
  317. board = rpipico2w
  318. ; How much flash in bytes the bootloader and main app will be allocated
  319. ; It is used as the starting point for a ROM image saved in flash
  320. ; Changing this will cause issues with boards that already have a ROM drive in flash
  321. program_flash_allocation = 589824
  322. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  323. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  324. build_flags =
  325. ${env:ZuluSCSI_RP2MCU.build_flags}
  326. -DZULUSCSI_PICO_2
  327. -DZULUSCSI_MCU_RP23XX
  328. -DZULUSCSI_PICO_2_DAYNAPORT
  329. -DZULUSCSI_NETWORK
  330. -DZULUSCSI_DAYNAPORT
  331. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  332. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2_DaynaPORT.program_flash_allocation}