platformio.ini 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. ; # 2024-10-09
  2. ; # All comments begin with '#', and all commented out settings begin with ';'.
  3. ; # PlatformIO configuration section. This is a predefined section. These settings cannot be moved to other sections. More
  4. ; # details can be found here: https://docs.platformio.org/en/latest/projectconf/sections/platformio/index.html
  5. ; [platformio]
  6. ; # Directory for any custom boards
  7. ; boards_dir = ./boards
  8. ; # Path to directory for source code. Can be absolute path or relative path.
  9. ; src_dir = .
  10. ; # Path to directory for header files.
  11. ; include_dir = ./src
  12. ; # Default environments to be processed by pio. Multiple environments are allowed.
  13. ; default_envs = debug
  14. ; # Main setup section. Used in all environments. More can be found here:
  15. ; # https://docs.platformio.org/en/latest/projectconf/sections/env/index.html
  16. ; [setup]
  17. ; # Board name. Predefined boards:
  18. ; # * agrv2k_103
  19. ; # * agrv2k_303
  20. ; # * agrv2k_407
  21. ; board = agrv2k_407
  22. ; # Supported frameworks:
  23. ; # * agrv_sdk: Basic SDK
  24. ; # * agrv_lwip: lwIP, A Lightweight TCP/IP stack
  25. ; # * agrv_tinyusb: TinyUSB, a USB Host/Device stack
  26. ; # * agrv_embos: embOS, a real-time OS by Segger
  27. ; # * agrv_freertos: FreeRTOS, an open source real-time OS
  28. ; # * agrv_rtthread: RT-Thread, an open source real-time OS
  29. ; # * agrv_ucos: uC/OS, an open source real-time OS
  30. ; # Multiple frameworks can be specified, like:
  31. ; # framework = agrv_sdk, agrv_tinyusb
  32. ; framework = agrv_sdk
  33. ; inline_framework_dir = ./frameworks
  34. ; # Program name. This determines the .elf and .bin file names.
  35. ; program = agm_test_uart
  36. ; # Tool chain used, supported values:
  37. ; # * gnu (default)
  38. ; # * clang
  39. ; ; toolchain = clang
  40. ; # Source files to be compiled, relative to src_dir defined in the platformio section.
  41. ; # * "+<PATH>" means to include
  42. ; # * "-<PATH>" means to exclude
  43. ; # * "**" means any path, including all sub directories
  44. ; build_src_filter = "-<*> +<./src/**/*.c>"
  45. ; # Extra compiler flags.
  46. ; ; build_flags =
  47. ; # Compiler flags for debug build. The default is "-g3 -ggdb3 -gdwarf-4".
  48. ; ; debug_build_flags = -Og -g
  49. ; # Compiler flags for release build. The default is "-Os".
  50. ; ; release_build_flags = -Os
  51. ; # RISC-V ISA support. Default is rv32imafc.
  52. ; ; board_build.march = rv32imac # Disable floating point
  53. ; # RISC-V ABI support. Default is ilp32f
  54. ; ; board_build.mabi = ilp32 # Disable floating point
  55. ; # By default device ID and flash size are checked before upload. Uncomment to disabled the check.
  56. ; ; check_device = 0
  57. ; # By default a valid logic configuration is checked before upload. Uncomment to disable the check.
  58. ; ; check_logic = 0
  59. ; # Entry address for MCU program. Default is the base value of flash address, 0x80000000. Can be set to a non-default
  60. ; # value, e.g. 0x80008000, when using a custom boot loader.
  61. ; ; board_build.boot_addr = 0x80000000
  62. ; board_upload.address = 0x80020000
  63. ; board_build.boot_addr = 0x80020000
  64. ; # Boot mode. Supported values:
  65. ; # * flash: Default, boot from flash.
  66. ; # * flash_sram: Boot from flash and run in SRAM. Suitable for developing custom boot loaders.
  67. ; # * sram: Boot from SRAM.
  68. ; ; board_build.boot_mode = flash
  69. ; # To add additional settings to the default linker script:
  70. ; ; board_build.ldscript = user.ld
  71. ; # To overwrite the default linker script defined in SDK:
  72. ; ; board_build.ldscript = user.ld-
  73. ; # Logic configuration section
  74. ; [setup_logic]
  75. ; # Logic settings and pin map. Leave empty to use the board default.
  76. ; logic_ve = test_uart.ve
  77. ; # Logic device that matches packaging, possible values:
  78. ; # * AGRV2KL100
  79. ; # * AGRV2KL64
  80. ; # * AGRV2KL64H
  81. ; # * AGRV2KL48
  82. ; # * AGRV2KQ32
  83. ; logic_device = AGRV2KL100
  84. ; # Whether logic bin will be compressed. Size of uncompressed logic bin: 100KB. Size of compressed logic bin: < 48KB.
  85. ; # Compressed logic takes an extra 30-50 ms during boot.
  86. ; ; logic_compress = true
  87. ; # Whether logic configuration will be embedded in mcu program. Default is false.
  88. ; ; logic_embed = true
  89. ; # User defined address for logic bin. The default address is at the last 100KB for uncompressed logic and the last 48KB
  90. ; # for compressed logic.
  91. ; ; board_upload.logic_address = 0x80027000
  92. ; # IP name, can be either predefined or user defined.
  93. ; ip_name = multi_uart_ip
  94. ; # Logic directory. Required for user defined IP.
  95. ; logic_dir = logic
  96. ; # For portable user defined IP.
  97. ; ; logic_ip = true
  98. ; # User defined IP directory.
  99. ; ; ips_dir = ips
  100. ; # Extra design level settings for Supra. These are additional to board level settings.
  101. ; # design.asf =
  102. ; ; design.pre_asf =
  103. ; ; design.post_asf =
  104. ; # Debug and upload configuration
  105. ; [setup_upload]
  106. ; # The debug and upload protocol. Supported values:
  107. ; # * jlink-openocd
  108. ; # * jlink-openocd-jtag
  109. ; # * cmsis-dap-openocd
  110. ; # * cmsis-dap-openocd-jtag
  111. ; # * stlink-dap-openocd-dapdirect_swd
  112. ; # * serial (debugging through serial is supported by AGM DAPLink only, ver31 and above)
  113. ; protocol = cmsis-dap-openocd
  114. ; debug_tool = ${this.protocol}
  115. ; upload_protocol = ${this.protocol}
  116. ; # Debug and upload speed, in KHz
  117. ; ; debug_speed = 10000
  118. ; ; upload_speed = 10000
  119. ; # Reset the device before uploading. Can be used when device is not responding due to erroneous flash.
  120. ; ; upload_srst = true
  121. ; # For upload using serial port. No debug is available.
  122. ; [setup_upload_serial]
  123. ; upload_protocol = serial
  124. ; # Set the upload port. Similar to monitor_port.
  125. ; upload_port = COM*
  126. ; # Upload baud rate
  127. ; upload_speed = 115200
  128. ; # Monitor with printf through UART
  129. ; [setup_monitor]
  130. ; # Logger interface. Can be any internal UART. Note that the TX pin is decided by the .ve file in setup_logic section.
  131. ; logger_if = UART0
  132. ; # Set the port to be used. Supported values:
  133. ; # * COM*: Windows, any COM port
  134. ; # * COMx: Windows, a specific port like COM11
  135. ; # * /dev/ttyACMx: Linux CDC device
  136. ; # * /dev/ttyUSBx: Linux USB to UART device
  137. ; monitor_port = COM*
  138. ; # Monitor baud rate
  139. ; monitor_speed = 115200
  140. ; # Monitor with printf through Segger RTT
  141. ; [setup_monitor_rtt]
  142. ; logger_if = RTT
  143. ; monitor_port = socket://localhost:19021
  144. ; # Configuration for batch binary file.
  145. ; [setup_batch]
  146. ; # By default, the "Create Batch" command will create a batch binary file, including logic bin and MCU program bin.
  147. ; # Additionally, other user binary files can be specified. An integer number can also be specified instead of a .bin file
  148. ; # name, in which case the specified value will be directly put into the given address.
  149. ; ; batch_user_bin = user0.bin:0x80008000 user1.bin:0x8000f000 0x12345678:0x81000060
  150. ; # A user defined logic bin can be specified. This will replace the default logic bin in current project.
  151. ; ; batch_user_logic = user_logic.bin
  152. ; # This can overwrite the default batch output file name, which is {program name}_{env name}_batch.bin
  153. ; ; batch_output = user_batch_output.bin
  154. ; # Lock the flash and turn on read protection for the generated batch bin.
  155. ; ; lock_flash = true
  156. ; # Extra arguments for creating batch.
  157. ; ; batch_arg = --misc 0x0f
  158. ; # Base environment. Shared in both debug and release.
  159. ; [env]
  160. ; # Development platform. Do not change.
  161. ; platform = AgRV
  162. ; extends =
  163. ; setup # Common settings.
  164. ; setup_logic # Logic settings, include pin map, IP, etc.
  165. ; setup_upload # Debug and upload settings. Replace with setup_upload_serial to use serial upload.
  166. ; setup_monitor # Monitor settings. Replace with setup_monitor_rtt to use Segger RTT.
  167. ; setup_batch # Batch binary settings.
  168. ; [env:debug]
  169. ; build_type = debug
  170. ; [env:release]
  171. ; build_type = release
  172. [setup]
  173. boards_dir = ./boards
  174. board = agrv2k_407
  175. board_logic.ve = test_uart.ve
  176. #board_logic.compress = true
  177. #ips_dir = ../ips
  178. ip_name = multi_uart_ip
  179. logic_dir = logic
  180. ; logic_ve = top.ve
  181. board_logic.asf = test_uart.asf
  182. framework = agrv_sdk
  183. program = 2006_app_mcu_20063005
  184. src_dir = src
  185. include_dir = src
  186. src_filter = "-<*> +<*.c>"
  187. lwip_imp_dir =
  188. tinyusb_imp_dir =
  189. #lwip_param = freertos
  190. #tinyusb_param =
  191. #board_build.boot_addr = upload
  192. #board_build.boot_mode = sram
  193. #board_upload.address = 0x20000000
  194. #board_upload.logic_address = 0x80020000
  195. #board_logic.device = AGRV2KL100
  196. #board_logic.ve = my_board.ve
  197. board_upload.address = 0x80020000
  198. board_build.boot_addr = 0x80020000
  199. ; board_build.boot_mode = flash_sram
  200. build_unflags = -O2
  201. build_flags = -Os
  202. -DLOGGER_BAUD_RATE=${setup.monitor_speed}
  203. -DAGRV_FP_STACK=0
  204. -DDFU_FPGA_CONFIG=\"fpga_app.inc\"
  205. build_src_flags = -Wno-cast-align
  206. ; batch_user_bin = 0202_app_mcu_02023004.bin:0x80020000 fpga_app.bin:0x80031800 0x80020100:0x02023004
  207. logger_if = UART0
  208. #upload_port = /dev/ttyUSB0
  209. #monitor_port = /dev/ttyUSB0
  210. upload_port = COM3
  211. monitor_port = COM3
  212. monitor_speed = 57600
  213. debug_speed = 10000
  214. #debug_tools = cmsis-dap-openocd
  215. #upload_protocols = cmsis-dap-openocd
  216. debug_tool = cmsis-dap-openocd
  217. upload_protocol = cmsis-dap-openocd
  218. #debug_tool = jlink-openocd
  219. #upload_protocol = jlink-openocd
  220. #build_flags =
  221. #build_src_flags =
  222. #check_tool = cppcheck, clangtidy, pvs-studio
  223. #check_device = false
  224. #check_logic = 2
  225. [setup_rtt]
  226. logger_if = RTT
  227. monitor_port = socket://localhost:19021
  228. [platformio]
  229. boards_dir = ${setup.boards_dir}
  230. src_dir = ${setup.src_dir}
  231. include_dir = ${setup.include_dir}
  232. default_envs = dev
  233. ; board_upload.address = 0x80020000
  234. [env]
  235. platform = AgRV
  236. extends = setup
  237. [env:dev]
  238. build_type = debug
  239. ; board_upload.address = 0x80020000
  240. [env:release]
  241. build_type = release
  242. ; extra_scripts =
  243. ; pre:mcu_pre.py
  244. ; post:mcu_post.py
  245. ; board_upload.address = 0x80020000
  246. ; board_upload.logic_address = 0x80060000
  247. [env:rtt]
  248. build_type = debug
  249. extends = setup_rtt
  250. [env:serial]
  251. build_type = release
  252. ; board_upload.address = 0x80020000
  253. upload_protocol = serial
  254. upload_speed = 460800
  255. custom_speed = 115200