platformio.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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_BS2
  4. ; Example platform to serve as a base for porting efforts
  5. [env:template]
  6. platform = ststm32
  7. framework = arduino
  8. board = bluepill_f103c8
  9. build_flags =
  10. -Os -Isrc
  11. -DLOGBUFSIZE=512
  12. -DPREFETCH_BUFFER_SIZE=0
  13. -DMAX_SECTOR_SIZE=2048
  14. -DSCSI2SD_BUFFER_SIZE=4096
  15. -DINI_CACHE_SIZE=0
  16. -DUSE_ARDUINO=1
  17. lib_deps =
  18. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  19. minIni
  20. ZuluSCSI_platform_template
  21. SCSI2SD
  22. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  23. ; ZuluSCSI V1.0 hardware platform with GD32F205 CPU.
  24. [env:ZuluSCSIv1_0]
  25. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  26. board = genericGD32F205VC
  27. board_build.mcu = gd32f205vct6
  28. board_build.core = gd32
  29. board_build.ldscript = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205.ld
  30. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F205/zuluscsi_gd32f205_btldr.ld
  31. framework = spl
  32. lib_compat_mode = off
  33. lib_ldf_mode = chain+
  34. lib_deps =
  35. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  36. minIni
  37. ZuluSCSI_platform_GD32F205
  38. SCSI2SD
  39. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  40. GD32F20x_usbfs_library
  41. upload_protocol = stlink
  42. platform_packages = platformio/toolchain-gccarmnoneeabi@1.100301.220327
  43. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  44. debug_tool = stlink
  45. extra_scripts = src/build_bootloader.py
  46. debug_build_flags =
  47. -Os -Wall -Wno-sign-compare -ggdb -g3
  48. build_flags =
  49. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  50. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  51. -DSPI_DRIVER_SELECT=3
  52. -DSD_CHIP_SELECT_MODE=2
  53. -DENABLE_DEDICATED_SPI=1
  54. -DPIO_USBFS_DEVICE_CDC
  55. -DZULUSCSI_V1_0
  56. -DPLATFORM_MASS_STORAGE
  57. -DSDFAT_NOARDUINO
  58. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  59. ; ZuluSCSI V1.0 mini hardware platform with GD32F205 CPU.
  60. [env:ZuluSCSIv1_0_mini]
  61. extends = env:ZuluSCSIv1_0
  62. build_flags =
  63. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  64. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  65. -DSPI_DRIVER_SELECT=3
  66. -DSD_CHIP_SELECT_MODE=2
  67. -DENABLE_DEDICATED_SPI=1
  68. -DPIO_USBFS_DEVICE_CDC
  69. -DZULUSCSI_V1_0
  70. -DZULUSCSI_V1_0_mini
  71. -DPLATFORM_MASS_STORAGE
  72. -DSDFAT_NOARDUINO
  73. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  74. ; ZuluSCSI V1.1+ hardware platforms, this support v1.1, v1.1 ODE, and vl.2
  75. [env:ZuluSCSIv1_1_plus]
  76. extends = env:ZuluSCSIv1_0
  77. build_flags =
  78. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  79. -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000
  80. -DSPI_DRIVER_SELECT=3
  81. -DSD_CHIP_SELECT_MODE=2
  82. -DENABLE_DEDICATED_SPI=1
  83. -DPIO_USBFS_DEVICE_CDC
  84. -DHAS_SDIO_CLASS
  85. -DENABLE_AUDIO_OUTPUT
  86. -DZULUSCSI_V1_1_plus
  87. -DPLATFORM_MASS_STORAGE
  88. -DSDFAT_NOARDUINO
  89. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  90. ; ZuluSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
  91. [env:ZuluSCSI_RP2040]
  92. platform = https://github.com/maxgerhardt/platform-raspberrypi.git#5e87ae34ca025274df25b3303e9e9cb6c120123c
  93. platform_packages =
  94. framework-arduinopico@https://github.com/rabbitholecomputing/arduino-pico.git#v3.6.0-DaynaPORT
  95. board_build.core = earlephilhower
  96. board = zuluscsi_rp2040
  97. framework = arduino
  98. ; How much flash in bytes the bootloader and main app will be allocated
  99. ; It is used as the starting point for a ROM image saved in flash
  100. ; Changing this will cause issues with boards that already have a ROM drive in flash
  101. program_flash_allocation = 360448
  102. extra_scripts =
  103. src/build_bootloader.py
  104. lib/ZuluSCSI_platform_RP2040/process-linker-script.py
  105. board_build.ldscript = ${BUILD_DIR}/rp2040.ld
  106. ldscript_bootloader = lib/ZuluSCSI_platform_RP2040/rp2040_btldr.ld
  107. lib_deps =
  108. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  109. minIni
  110. ZuluSCSI_platform_RP2040
  111. SCSI2SD
  112. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  113. upload_protocol = cmsis-dap
  114. debug_tool = cmsis-dap
  115. debug_build_flags =
  116. -O2 -ggdb -g3
  117. ; The values can be adjusted down to get a debug build to fit in to SRAM
  118. -DLOGBUFSIZE=4096
  119. build_flags =
  120. -O2 -Isrc -ggdb -g3
  121. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  122. -DSPI_DRIVER_SELECT=3
  123. -DSD_CHIP_SELECT_MODE=2
  124. -DENABLE_DEDICATED_SPI=1
  125. -DHAS_SDIO_CLASS
  126. -DUSE_ARDUINO=1
  127. -DPICO_FLASH_SPI_CLKDIV=2
  128. -DZULUSCSI_V2_0
  129. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  130. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  131. -DPICO_CYW43_ARCH_POLL=1
  132. -DCYW43_LWIP=0
  133. -DCYW43_USE_OTP_MAC=0
  134. -DPLATFORM_MASS_STORAGE
  135. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  136. ; ZuluSCSI RP2040 hardware platform, as above, but with audio output support enabled
  137. [env:ZuluSCSI_RP2040_Audio]
  138. extends = env:ZuluSCSI_RP2040
  139. build_flags =
  140. ${env:ZuluSCSI_RP2040.build_flags}
  141. -DENABLE_AUDIO_OUTPUT
  142. -DLOGBUFSIZE=8192
  143. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  144. ; Part of the ZuluSCSI_RP2040 platform, but with different pins.
  145. [env:ZuluSCSI_Pico]
  146. extends = env:ZuluSCSI_RP2040
  147. build_flags =
  148. -O2 -Isrc -ggdb -g3
  149. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  150. -DSPI_DRIVER_SELECT=3
  151. -DSD_CHIP_SELECT_MODE=2
  152. -DENABLE_DEDICATED_SPI=1
  153. -DHAS_SDIO_CLASS
  154. -DUSE_ARDUINO=1
  155. -DZULUSCSI_PICO
  156. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  157. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  158. -DPICO_CYW43_ARCH_POLL=1
  159. -DCYW43_LWIP=0
  160. -DCYW43_USE_OTP_MAC=0
  161. -DPLATFORM_MASS_STORAGE
  162. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  163. ; Build for the ZuluSCSI Pico carrier board with a Pico-W
  164. ; for SCSI DaynaPORT emulation
  165. [env:ZuluSCSI_Pico_DaynaPORT]
  166. platform = https://github.com/maxgerhardt/platform-raspberrypi.git#5e87ae34ca025274df25b3303e9e9cb6c120123c
  167. platform_packages =
  168. framework-arduinopico@https://github.com/rabbitholecomputing/arduino-pico.git#v3.6.0-DaynaPORT
  169. framework = arduino
  170. board = rpipicow
  171. board_build.core = earlephilhower
  172. ; How much flash in bytes the bootloader and main app will be allocated
  173. ; It is used as the starting point for a ROM image saved in flash
  174. program_flash_allocation = 589824
  175. extra_scripts =
  176. src/build_bootloader.py
  177. lib/ZuluSCSI_platform_RP2040/process-linker-script.py
  178. ldscript_bootloader = lib/ZuluSCSI_platform_RP2040/rp2040_btldr.ld
  179. board_build.ldscript = ${BUILD_DIR}/rp2040.ld
  180. debug_tool = cmsis-dap
  181. debug_build_flags =
  182. -O2 -ggdb -g3
  183. -DLOGBUFSIZE=4096
  184. -DPREFETCH_BUFFER_SIZE=0
  185. -DSCSI2SD_BUFFER_SIZE=57344
  186. ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes)
  187. ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes
  188. -DNETWORK_PACKET_QUEUE_SIZE=10
  189. ; This flag enables verbose logging of TCP/IP traffic and other information
  190. ; it also takes up a bit of SRAM so it should be disabled with production code
  191. -DNETWORK_DEBUG_LOGGING
  192. -DPLATFORM_MASS_STORAGE
  193. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  194. lib_deps =
  195. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  196. minIni
  197. ZuluSCSI_platform_RP2040
  198. SCSI2SD
  199. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  200. build_flags =
  201. -O2 -Isrc
  202. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  203. -DSPI_DRIVER_SELECT=3
  204. -DSD_CHIP_SELECT_MODE=2
  205. -DENABLE_DEDICATED_SPI=1
  206. -DHAS_SDIO_CLASS
  207. -DUSE_ARDUINO=1
  208. -DZULUSCSI_PICO
  209. -DZULUSCSI_NETWORK
  210. -DZULUSCSI_DAYNAPORT
  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. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  223. -DPICO_CYW43_ARCH_POLL=1
  224. -DCYW43_LWIP=0
  225. -DCYW43_USE_OTP_MAC=0
  226. ; -DPIO_FRAMEWORK_ARDUINO_NO_USB
  227. -DPLATFORM_MASS_STORAGE
  228. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  229. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  230. ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.
  231. [env:ZuluSCSI_BS2]
  232. extends = env:ZuluSCSI_RP2040
  233. build_flags =
  234. -O2 -Isrc -ggdb -g3
  235. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  236. -DSPI_DRIVER_SELECT=3
  237. -DSD_CHIP_SELECT_MODE=2
  238. -DENABLE_DEDICATED_SPI=1
  239. -DHAS_SDIO_CLASS
  240. -DUSE_ARDUINO=1
  241. -DZULUSCSI_BS2
  242. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  243. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  244. -DPICO_CYW43_ARCH_POLL=1
  245. -DCYW43_LWIP=0
  246. -DCYW43_USE_OTP_MAC=0
  247. -DPLATFORM_MASS_STORAGE
  248. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  249. ; ZuluSCSI VF4 hardware platform with GD32F450ZET6 CPU.
  250. [env:ZULUSCSIv1_4]
  251. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  252. board = genericGD32F450ZE
  253. board_build.mcu = gd32f450zet6
  254. board_build.core = gd32
  255. board_build.ldscript = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450.ld
  256. lib_ignore =
  257. ZuluSCSI_platform_GD32F205
  258. ZuluSCSI_platform_RP2040
  259. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450_btldr.ld
  260. framework = spl
  261. lib_compat_mode = off
  262. lib_deps =
  263. GD32F4xx_usbfs_library
  264. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  265. minIni
  266. ZuluSCSI_platform_GD32F450
  267. SCSI2SD
  268. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  269. upload_protocol = stlink
  270. platform_packages =
  271. toolchain-gccarmnoneeabi@1.90201.191206
  272. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  273. extra_scripts = src/build_bootloader.py
  274. debug_tool = stlink
  275. debug_build_flags = -Os -ggdb -g3
  276. build_flags =
  277. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  278. -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
  279. -DSPI_DRIVER_SELECT=3
  280. -DSD_CHIP_SELECT_MODE=2
  281. -DENABLE_DEDICATED_SPI=1
  282. -DHAS_SDIO_CLASS
  283. -DPIO_USBFS_DEVICE_CDC
  284. -DZULUSCSI_V1_4
  285. ; -DPIO_USBFS_DEVICE_MSC
  286. -DPLATFORM_MASS_STORAGE
  287. -DSDFAT_NOARDUINO
  288. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC