platformio.ini 13 KB

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