platformio.ini 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. # 2025-02-23
  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. boards_dir = ./boards
  13. # Default environments to be processed by pio. Multiple environments are allowed.
  14. default_envs = debug
  15. ; board_upload.address = 0x80000000
  16. ; board_build.boot_addr = 0x80000000
  17. # Main setup section. Used in all environments. More can be found here:
  18. # https://docs.platformio.org/en/latest/projectconf/sections/env/index.html
  19. [setup]
  20. # Board name. Predefined boards:
  21. # * agrv2k_103
  22. # * agrv2k_303
  23. # * agrv2k_407
  24. board = agrv2k_303
  25. # Supported frameworks:
  26. # * agrv_sdk: Basic SDK
  27. # * agrv_lwip: lwIP, A Lightweight TCP/IP stack
  28. # * agrv_tinyusb: TinyUSB, a USB Host/Device stack
  29. # * agrv_embos: embOS, a real-time OS by Segger
  30. # * agrv_freertos: FreeRTOS, an open source real-time OS
  31. # * agrv_rtthread: RT-Thread, an open source real-time OS
  32. # * agrv_ucos: uC/OS, an open source real-time OS
  33. # * agrv_nmsis: A DSP and neural network library
  34. # Multiple frameworks can be specified, like:
  35. # framework = agrv_sdk, agrv_tinyusb
  36. framework = agrv_sdk
  37. inline_framework_dir = ./frameworks
  38. # Program name. This determines the .elf and .bin file names.
  39. program = 9102_app_mcu_91023001
  40. # Tool chain used, supported values:
  41. # * gnu (default)
  42. # * clang
  43. ; toolchain = clang
  44. # Source files to be compiled, relative to src_dir defined in the platformio section.
  45. # * "+<PATH>" means to include
  46. # * "-<PATH>" means to exclude
  47. # * "**" means any path, including all sub directories
  48. build_src_filter = "-<*> +<./src/**/*.c>"
  49. # Extra compiler flags.
  50. build_flags = -DBOARD_HSE_BYPASS=SYS_HSE_NONE
  51. board_logic.compress = true
  52. # Compiler flags for debug build. The default is "-g3 -ggdb3 -gdwarf-4".
  53. ; debug_build_flags = -Og -g
  54. # Compiler flags for release build. The default is "-Os".
  55. ; release_build_flags = -O3
  56. # RISC-V ISA support. Default is rv32imafc.
  57. ; board_build.march = rv32imac # Disable floating point
  58. # RISC-V ABI support. Default is ilp32f
  59. ; board_build.mabi = ilp32 # Disable floating point
  60. # By default device ID and flash size are checked before upload. Uncomment to disabled the check.
  61. ; check_device = 0
  62. # By default a valid logic configuration is checked before upload. Uncomment to disable the check.
  63. ; check_logic = 0
  64. # Entry address for MCU program. Default is the base value of flash address, 0x80000000. Can be set to a non-default
  65. # value, e.g. 0x80008000, when using a custom boot loader.
  66. ; board_build.boot_addr = 0x80000000
  67. board_upload.address = 0x80020000
  68. board_build.boot_addr = 0x80020000
  69. # Boot mode. Supported values:
  70. # * flash: Default, boot from flash.
  71. # * flash_sram: Boot from flash and run in SRAM. Suitable for developing custom boot loaders.
  72. # * sram: Boot from SRAM.
  73. ; board_build.boot_mode = flash
  74. # To add additional settings to the default linker script:
  75. ; board_build.ldscript = user.ld
  76. # To overwrite the default linker script defined in SDK:
  77. ; board_build.ldscript = user.ld-
  78. # Logic configuration section
  79. [setup_logic]
  80. # Logic settings and pin map. Leave empty to use board default.
  81. logic_ve = example_board.ve
  82. # Logic device that matches packaging, possible values:
  83. # * AGRV2KL100
  84. # * AGRV2KL64
  85. # * AGRV2KL64H
  86. # * AGRV2KL48
  87. # * AGRV2KQ32
  88. logic_device = AGRV2KQ32
  89. # Whether logic bin will be compressed. Size of uncompressed logic bin: 100KB. Size of compressed logic bin: < 48KB.
  90. # Compressed logic takes an extra 30-50 ms during boot.
  91. ; logic_compress = true
  92. # Whether logic configuration will be embedded in mcu program. Default is false.
  93. ; logic_embed = true
  94. # User defined address for logic bin. The default address is at the last 100KB for uncompressed logic and the last 48KB
  95. # for compressed logic.
  96. ; board_upload.logic_address = 0x80027000
  97. # IP name, can be either predefined or user defined.
  98. ip_name = analog_ip
  99. ; ip_name = analog_ip
  100. # Logic directory. Required for user defined IP.
  101. logic_dir = logic
  102. # For portable user defined IP.
  103. ; logic_ip = true
  104. # User defined IP directory.
  105. ; ips_dir = ips
  106. # Extra design level settings for Supra. These are additional to board level settings.
  107. design.asf = ./example_board.asf
  108. ; design.pre_asf = ./example_board.pre.asf
  109. ; design.post_asf = ./example_board.post.asf
  110. # Debug and upload configuration
  111. [setup_upload]
  112. # The debug and upload protocol. Supported values:
  113. # * jlink-openocd
  114. # * jlink-openocd-jtag
  115. # * cmsis-dap-openocd
  116. # * cmsis-dap-openocd-jtag
  117. # * stlink-dap-openocd-dapdirect_swd
  118. # * serial (debugging through serial is supported by AGM DAPLink only, ver31 and above)
  119. protocol = cmsis-dap-openocd
  120. debug_tool = ${this.protocol}
  121. upload_protocol = ${this.protocol}
  122. # Debug and upload speed, in KHz
  123. ; debug_speed = 10000
  124. ; upload_speed = 10000
  125. # Reset the device before uploading. Can be used when device is not responding due to erroneous flash.
  126. ; upload_srst = true
  127. # For upload using serial port. No debug is available.
  128. [setup_upload_serial]
  129. upload_protocol = serial
  130. # Set the upload port. Similar to monitor_port.
  131. upload_port = COM*
  132. # Upload baud rate
  133. upload_speed = 115200
  134. # Monitor with printf through UART
  135. [setup_monitor]
  136. # Logger interface. Can be any internal UART. Note that the TX pin is decided by the .ve file in setup_logic section.
  137. logger_if = UART0
  138. # Set the port to be used. Supported values:
  139. # * COM*: Windows, any COM port
  140. # * COMx: Windows, a specific port like COM11
  141. # * /dev/ttyACMx: Linux CDC device
  142. # * /dev/ttyUSBx: Linux USB to UART device
  143. monitor_port = COM*
  144. # Monitor baud rate
  145. monitor_speed = 115200
  146. # Monitor with printf through Segger RTT
  147. [setup_monitor_rtt]
  148. logger_if = RTT
  149. monitor_port = socket://localhost:19021
  150. # Configuration for batch binary file.
  151. [setup_batch]
  152. # By default, the "Create Batch" command will create a batch binary file, including logic bin and MCU program bin.
  153. # Additionally, other user binary files can be specified. An integer number can also be specified instead of a .bin file
  154. # name, in which case the specified value will be directly put into the given address.
  155. ; batch_user_bin = user0.bin:0x80008000 user1.bin:0x8000f000 0x12345678:0x81000060
  156. # A user defined logic bin can be specified. This will replace the default logic bin in current project.
  157. ; batch_user_logic = user_logic.bin
  158. # This can overwrite the default batch output file name, which is {program name}_{env name}_batch.bin
  159. ; batch_output = user_batch_output.bin
  160. # Lock the flash and turn on read protection for the generated batch bin.
  161. ; lock_flash = true
  162. # Extra arguments for creating batch.
  163. ; batch_arg = --misc 0x0f
  164. # Base environment. Shared in both debug and release.
  165. [env]
  166. # Development platform. Do not change.
  167. platform = AgRV
  168. extends =
  169. setup # Common settings.
  170. setup_logic # Logic settings, include pin map, IP, etc.
  171. setup_upload # Debug and upload settings. Replace with setup_upload_serial to use serial upload.
  172. setup_monitor # Monitor settings. Replace with setup_monitor_rtt to use Segger RTT.
  173. setup_batch # Batch binary settings.
  174. [env:debug]
  175. build_type = debug
  176. [env:release]
  177. build_type = release
  178. ; [env:serial]
  179. ; build_type = release
  180. ; ; board_upload.address = 0x80020000
  181. ; upload_protocol = serial
  182. ; upload_speed = 460800
  183. ; custom_speed = 115200