platformio.ini 11 KB

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