platformio.ini 12 KB

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