platformio.ini 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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
  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#2.2.0-gpt
  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. ; ZuluSCSI RP2040 hardware platform, as above, but with audio output support enabled
  129. [env:ZuluSCSI_RP2040_Audio]
  130. extends = env:ZuluSCSI_RP2040
  131. build_flags =
  132. ${env:ZuluSCSI_RP2040.build_flags}
  133. -DENABLE_AUDIO_OUTPUT
  134. -DLOGBUFSIZE=8192
  135. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  136. ; Part of the ZuluSCSI_RP2040 platform, but with different pins.
  137. [env:ZuluSCSI_Pico]
  138. extends = env:ZuluSCSI_RP2040
  139. build_flags =
  140. -O2 -Isrc -ggdb -g3
  141. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  142. -DSPI_DRIVER_SELECT=3
  143. -DSD_CHIP_SELECT_MODE=2
  144. -DENABLE_DEDICATED_SPI=1
  145. -DHAS_SDIO_CLASS
  146. -DUSE_ARDUINO=1
  147. -DZULUSCSI_PICO
  148. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  149. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  150. -DPICO_CYW43_ARCH_POLL=1
  151. -DCYW43_LWIP=0
  152. -DCYW43_USE_OTP_MAC=0
  153. -DPLATFORM_MASS_STORAGE
  154. ; Build for the ZuluSCSI Pico carrier board with a Pico-W
  155. ; for SCSI DaynaPORT emulation
  156. [env:ZuluSCSI_Pico_DaynaPORT]
  157. platform = https://github.com/maxgerhardt/platform-raspberrypi.git
  158. platform_packages =
  159. framework-arduinopico@https://github.com/rabbitholecomputing/arduino-pico.git#v3.6.0-DaynaPORT
  160. framework = arduino
  161. board = rpipicow
  162. board_build.core = earlephilhower
  163. ; How much flash in bytes the bootloader and main app will be allocated
  164. ; It is used as the starting point for a ROM image saved in flash
  165. program_flash_allocation = 589824
  166. extra_scripts =
  167. src/build_bootloader.py
  168. lib/ZuluSCSI_platform_RP2040/process-linker-script.py
  169. ldscript_bootloader = lib/ZuluSCSI_platform_RP2040/rp2040_btldr.ld
  170. board_build.ldscript = ${BUILD_DIR}/rp2040.ld
  171. debug_tool = cmsis-dap
  172. debug_build_flags =
  173. -O2 -ggdb -g3
  174. -DLOGBUFSIZE=4096
  175. -DPREFETCH_BUFFER_SIZE=0
  176. -DSCSI2SD_BUFFER_SIZE=57344
  177. ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes)
  178. ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes
  179. -DNETWORK_PACKET_QUEUE_SIZE=10
  180. ; This flag enables verbose logging of TCP/IP traffic and other information
  181. ; it also takes up a bit of SRAM so it should be disabled with production code
  182. -DNETWORK_DEBUG_LOGGING
  183. -DPLATFORM_MASS_STORAGE
  184. lib_deps =
  185. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.0-gpt
  186. minIni
  187. ZuluSCSI_platform_RP2040
  188. SCSI2SD
  189. CUEParser
  190. build_flags =
  191. -O2 -Isrc
  192. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  193. -DSPI_DRIVER_SELECT=3
  194. -DSD_CHIP_SELECT_MODE=2
  195. -DENABLE_DEDICATED_SPI=1
  196. -DHAS_SDIO_CLASS
  197. -DUSE_ARDUINO=1
  198. -DZULUSCSI_PICO
  199. -DZULUSCSI_NETWORK
  200. -DZULUSCSI_DAYNAPORT
  201. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_DaynaPORT.program_flash_allocation}
  202. ; These take a large portion of the SRAM and can be adjusted
  203. -DLOGBUFSIZE=8192
  204. -DPREFETCH_BUFFER_SIZE=5632
  205. -DSCSI2SD_BUFFER_SIZE=57344
  206. ; This controls the depth of NETWORK_PACKET_MAX_SIZE (1520 bytes)
  207. ; For example a queue size of 10 would be 10 x 1520 = 15200 bytes
  208. -DNETWORK_PACKET_QUEUE_SIZE=14
  209. ; This flag enables verbose logging of TCP/IP traffic and other information
  210. ; it also takes up a bit of SRAM so it should be disabled with production code
  211. ;-DNETWORK_DEBUG_LOGGING
  212. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  213. -DPICO_CYW43_ARCH_POLL=1
  214. -DCYW43_LWIP=0
  215. -DCYW43_USE_OTP_MAC=0
  216. ; -DPIO_FRAMEWORK_ARDUINO_NO_USB
  217. -DPLATFORM_MASS_STORAGE
  218. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  219. ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.
  220. [env:ZuluSCSI_BS2]
  221. extends = env:ZuluSCSI_RP2040
  222. build_flags =
  223. -O2 -Isrc -ggdb -g3
  224. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  225. -DSPI_DRIVER_SELECT=3
  226. -DSD_CHIP_SELECT_MODE=2
  227. -DENABLE_DEDICATED_SPI=1
  228. -DHAS_SDIO_CLASS
  229. -DUSE_ARDUINO=1
  230. -DZULUSCSI_BS2
  231. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  232. ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
  233. -DPICO_CYW43_ARCH_POLL=1
  234. -DCYW43_LWIP=0
  235. -DCYW43_USE_OTP_MAC=0
  236. -DPLATFORM_MASS_STORAGE
  237. ; ZuluSCSI VF4 hardware platform with GD32F450ZET6 CPU.
  238. [env:ZULUSCSIv1_4]
  239. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  240. board = genericGD32F450ZE
  241. board_build.mcu = gd32f450zet6
  242. board_build.core = gd32
  243. board_build.ldscript = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450.ld
  244. lib_ignore =
  245. ZuluSCSI_platform_GD32F205
  246. ZuluSCSI_platform_RP2040
  247. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450_btldr.ld
  248. framework = spl
  249. lib_compat_mode = off
  250. lib_deps =
  251. GD32F4xx_usbfs_library
  252. SdFat_NoArduino
  253. minIni
  254. ZuluSCSI_platform_GD32F450
  255. SCSI2SD
  256. CUEParser
  257. upload_protocol = stlink
  258. platform_packages =
  259. toolchain-gccarmnoneeabi@1.90201.191206
  260. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  261. extra_scripts = src/build_bootloader.py
  262. debug_tool = stlink
  263. debug_build_flags = -Os -ggdb -g3
  264. build_flags =
  265. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  266. -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
  267. -DSPI_DRIVER_SELECT=3
  268. -DSD_CHIP_SELECT_MODE=2
  269. -DENABLE_DEDICATED_SPI=1
  270. -DHAS_SDIO_CLASS
  271. -DPIO_USBFS_DEVICE_CDC
  272. -DZULUSCSI_V1_4