platformio.ini 9.7 KB

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