platformio.ini 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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, ZuluSCSI_Pico_2, ZuluSCSI_Pico_2_DaynaPORT
  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
  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
  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. -DZULUSCSI_V1_1_plus
  95. -DPLATFORM_MASS_STORAGE
  96. -DSDFAT_NOARDUINO
  97. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  98. ; ZuluSCSI settings shared among Raspberry Pi microcontroller like the RP2040 and RP2350
  99. [env:ZuluSCSI_RP2MCU]
  100. platform = https://github.com/maxgerhardt/platform-raspberrypi.git#19e30129fb1428b823be585c787dcb4ac0d9014c
  101. platform_packages =
  102. framework-arduinopico@https://github.com/rabbitholecomputing/arduino-pico.git#v4.3.0-DaynaPORT
  103. extra_scripts =
  104. src/build_bootloader.py
  105. src/process-linker-script.py
  106. board_build.core = earlephilhower
  107. board_build.ldscript = ${BUILD_DIR}/rp_linker.ld ; created by src/process-linker-script.py
  108. framework = arduino
  109. lib_deps =
  110. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  111. minIni
  112. SCSI2SD
  113. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  114. ZuluSCSI_platform_RP2MCU
  115. upload_protocol = cmsis-dap
  116. debug_tool = cmsis-dap
  117. debug_build_flags =
  118. -O2 -ggdb -g3
  119. build_flags =
  120. ${env.build_flags}
  121. -O2 -Isrc -ggdb -g3
  122. -Wall -Wno-sign-compare -Wno-ignored-qualifiers
  123. -DSPI_DRIVER_SELECT=3
  124. -DSD_CHIP_SELECT_MODE=2
  125. -DENABLE_DEDICATED_SPI=1
  126. -DHAS_SDIO_CLASS
  127. -DUSE_ARDUINO=1
  128. -DPICO_FLASH_SPI_CLKDIV=2
  129. -DPLATFORM_MASS_STORAGE
  130. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  131. ; build flags mirroring the "framework-arduinopico#x.x.x-DaynaPORT" static library build
  132. -DPICO_CYW43_ARCH_POLL=1
  133. -DCYW43_LWIP=0
  134. -DCYW43_USE_OTP_MAC=0
  135. ; ZuluSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
  136. [env:ZuluSCSI_RP2040]
  137. extends = env:ZuluSCSI_RP2MCU
  138. board = zuluscsi_rp2040
  139. ; How much flash in bytes the bootloader and main app will be allocated
  140. ; It is used as the starting point for a ROM image saved in flash
  141. ; Changing this will cause issues with boards that already have a ROM drive in flash
  142. program_flash_allocation = 360448
  143. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  144. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  145. debug_build_flags =
  146. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  147. ; The values can be adjusted down to get a debug build to fit in to SRAM
  148. -DLOGBUFSIZE=4096
  149. build_flags =
  150. ${env:ZuluSCSI_RP2MCU.build_flags}
  151. -DZULUSCSI_V2_0
  152. -DZULUSCSI_MCU_RP20XX
  153. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2040.program_flash_allocation}
  154. ; ZuluSCSI RP2040 hardware platform, as above, but with audio output support enabled
  155. [env:ZuluSCSI_RP2040_Audio]
  156. extends = env:ZuluSCSI_RP2040
  157. build_flags =
  158. ${env:ZuluSCSI_RP2040.build_flags}
  159. -DENABLE_AUDIO_OUTPUT
  160. -DLOGBUFSIZE=8192
  161. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  162. ; Part of the ZuluSCSI_RP2040 platform, but with different pins.
  163. [env:ZuluSCSI_Pico]
  164. extends = env:ZuluSCSI_RP2MCU
  165. board = rpipico
  166. program_flash_allocation = 360448
  167. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  168. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  169. build_flags =
  170. ${env:ZuluSCSI_RP2MCU.build_flags}
  171. -DZULUSCSI_PICO
  172. -DZULUSCSI_MCU_RP20XX
  173. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico.program_flash_allocation}
  174. ; Build for the ZuluSCSI Pico carrier board with a Pico-W
  175. ; for SCSI DaynaPORT emulation
  176. [env:ZuluSCSI_Pico_DaynaPORT]
  177. extends = env:ZuluSCSI_RP2MCU
  178. board = rpipicow
  179. ; How much flash in bytes the bootloader and main app will be allocated
  180. ; It is used as the starting point for a ROM image saved in flash
  181. program_flash_allocation = 589824
  182. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  183. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  184. debug_build_flags =
  185. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  186. -DLOGBUFSIZE=4096
  187. -DPREFETCH_BUFFER_SIZE=0
  188. -DSCSI2SD_BUFFER_SIZE=57344
  189. ; This controls the depth NETWORK_PACKET_MAX_SIZE (1520 bytes)
  190. ; For example a queue size of 10 would be 10 x 1520 = 30400 bytes
  191. -DNETWORK_PACKET_QUEUE_SIZE=8
  192. ; This flag enables verbose logging of TCP/IP traffic and other information
  193. ; it also takes up a bit of SRAM so it should be disabled with production code
  194. -DNETWORK_DEBUG_LOGGING
  195. build_flags =
  196. ${env:ZuluSCSI_RP2MCU.build_flags}
  197. -DZULUSCSI_PICO
  198. -DZULUSCSI_MCU_RP20XX
  199. -DZULUSCSI_NETWORK
  200. -DZULUSCSI_DAYNAPORT
  201. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  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. ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
  214. ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.
  215. [env:ZuluSCSI_BS2]
  216. extends = env:ZuluSCSI_RP2MCU
  217. board = rpipico
  218. program_flash_allocation = 360448
  219. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  220. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp2040_btldr.ld
  221. build_flags =
  222. ${env:ZuluSCSI_RP2MCU.build_flags}
  223. -DZULUSCSI_BS2
  224. -DZULUSCSI_MCU_RP20XX
  225. -DROMDRIVE_OFFSET=${env:ZuluSCSI_BS2.program_flash_allocation}
  226. ; ZuluSCSI Pico2 hardware platform, based on the Raspberry Pi foundation RP2350A microcontroller
  227. [env:ZuluSCSI_Pico_2]
  228. extends = env:ZuluSCSI_RP2MCU
  229. board = rpipico2
  230. ; How much flash in bytes the bootloader and main app will be allocated
  231. ; It is used as the starting point for a ROM image saved in flash
  232. ; Changing this will cause issues with boards that already have a ROM drive in flash
  233. program_flash_allocation = 360448
  234. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  235. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  236. debug_build_flags =
  237. ${env:ZuluSCSI_RP2MCU.debug_build_flags}
  238. build_flags =
  239. ${env:ZuluSCSI_RP2MCU.build_flags}
  240. -DZULUSCSI_PICO_2
  241. -DZULUSCSI_MCU_RP23XX
  242. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2.program_flash_allocation}
  243. ; ZuluSCSI VF4 hardware platform with GD32F450ZET6 CPU.
  244. [env:ZULUSCSIv1_4]
  245. platform = https://github.com/CommunityGD32Cores/platform-gd32.git
  246. board = genericGD32F450ZE
  247. board_build.mcu = gd32f450zet6
  248. board_build.core = gd32
  249. board_build.ldscript = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450.ld
  250. lib_ignore =
  251. ZuluSCSI_platform_GD32F205
  252. ZuluSCSI_platform_RP2040
  253. ldscript_bootloader = lib/ZuluSCSI_platform_GD32F450/zuluscsi_gd32f450_btldr.ld
  254. framework = spl
  255. lib_compat_mode = off
  256. lib_deps =
  257. GD32F4xx_usbfs_library
  258. SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.3-gpt
  259. minIni
  260. ZuluSCSI_platform_GD32F450
  261. SCSI2SD
  262. CUEParser=https://github.com/rabbitholecomputing/CUEParser
  263. upload_protocol = stlink
  264. platform_packages =
  265. toolchain-gccarmnoneeabi@1.90201.191206
  266. framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
  267. extra_scripts = src/build_bootloader.py
  268. debug_tool = stlink
  269. debug_build_flags = -Os -ggdb -g3
  270. build_flags =
  271. ${env.build_flags}
  272. -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
  273. -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
  274. -DSPI_DRIVER_SELECT=3
  275. -DSD_CHIP_SELECT_MODE=2
  276. -DENABLE_DEDICATED_SPI=1
  277. -DHAS_SDIO_CLASS
  278. -DPIO_USBFS_DEVICE_CDC
  279. -DZULUSCSI_V1_4
  280. ; -DPIO_USBFS_DEVICE_MSC
  281. -DPLATFORM_MASS_STORAGE
  282. -DSDFAT_NOARDUINO
  283. -DFILE_COPY_CONSTRUCTOR_SELECT=FILE_COPY_CONSTRUCTOR_PUBLIC
  284. ;========================================
  285. ; ZuluSCSI RP2350 hardware platform, based on the Raspberry Pi foundation RP2350 microcontroller
  286. [env:ZuluSCSI_RP2350A]
  287. extends = env:ZuluSCSI_RP2MCU
  288. board = zuluscsi_RP2350A
  289. ; How much flash in bytes the bootloader and main app will be allocated
  290. ; It is used as the starting point for a ROM image saved in flash
  291. ; Changing this will cause issues with boards that already have a ROM drive in flash
  292. program_flash_allocation = 360448
  293. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  294. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  295. build_flags =
  296. ${env:ZuluSCSI_RP2MCU.build_flags}
  297. -DZULUSCSI_RP2350A
  298. -DZULUSCSI_MCU_RP23XX
  299. -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2350A.program_flash_allocation}
  300. [env:ZuluSCSI_Pico_2_DaynaPORT]
  301. extends = env:ZuluSCSI_RP2MCU
  302. board = rpipico2w
  303. ; How much flash in bytes the bootloader and main app will be allocated
  304. ; It is used as the starting point for a ROM image saved in flash
  305. ; Changing this will cause issues with boards that already have a ROM drive in flash
  306. program_flash_allocation = 589824
  307. linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
  308. ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
  309. build_flags =
  310. ${env:ZuluSCSI_RP2MCU.build_flags}
  311. -DZULUSCSI_PICO_2
  312. -DZULUSCSI_MCU_RP23XX
  313. -DZULUSCSI_PICO_2_DAYNAPORT
  314. -DZULUSCSI_NETWORK
  315. -DZULUSCSI_DAYNAPORT
  316. -DCYW43_PIO_CLOCK_DIV_DYNAMIC=1
  317. -DROMDRIVE_OFFSET=${env:ZuluSCSI_Pico_2_DaynaPORT.program_flash_allocation}