platformio.ini 12 KB

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