# 2025-02-23 # All comments begin with '#', and all commented out settings begin with ';'. # PlatformIO configuration section. This is a predefined section. These settings cannot be moved to other sections. More # details can be found here: https://docs.platformio.org/en/latest/projectconf/sections/platformio/index.html [platformio] # Directory for any custom boards ; boards_dir = boards # Path to directory for source code. Can be absolute path or relative path. src_dir = . # Path to directory for header files. include_dir = ./src boards_dir = ./boards # Default environments to be processed by pio. Multiple environments are allowed. default_envs = debug ; board_upload.address = 0x80000000 ; board_build.boot_addr = 0x80000000 # Main setup section. Used in all environments. More can be found here: # https://docs.platformio.org/en/latest/projectconf/sections/env/index.html [setup] # Board name. Predefined boards: # * agrv2k_103 # * agrv2k_303 # * agrv2k_407 board = agrv2k_303 # Supported frameworks: # * agrv_sdk: Basic SDK # * agrv_lwip: lwIP, A Lightweight TCP/IP stack # * agrv_tinyusb: TinyUSB, a USB Host/Device stack # * agrv_embos: embOS, a real-time OS by Segger # * agrv_freertos: FreeRTOS, an open source real-time OS # * agrv_rtthread: RT-Thread, an open source real-time OS # * agrv_ucos: uC/OS, an open source real-time OS # * agrv_nmsis: A DSP and neural network library # Multiple frameworks can be specified, like: # framework = agrv_sdk, agrv_tinyusb framework = agrv_sdk inline_framework_dir = ./frameworks # Program name. This determines the .elf and .bin file names. program = 9102_app_mcu_91023001 # Tool chain used, supported values: # * gnu (default) # * clang ; toolchain = clang # Source files to be compiled, relative to src_dir defined in the platformio section. # * "+" means to include # * "-" means to exclude # * "**" means any path, including all sub directories build_src_filter = "-<*> +<./src/**/*.c>" # Extra compiler flags. build_flags = -DBOARD_HSE_BYPASS=SYS_HSE_NONE board_logic.compress = true # Compiler flags for debug build. The default is "-g3 -ggdb3 -gdwarf-4". ; debug_build_flags = -Og -g # Compiler flags for release build. The default is "-Os". ; release_build_flags = -O3 # RISC-V ISA support. Default is rv32imafc. ; board_build.march = rv32imac # Disable floating point # RISC-V ABI support. Default is ilp32f ; board_build.mabi = ilp32 # Disable floating point # By default device ID and flash size are checked before upload. Uncomment to disabled the check. ; check_device = 0 # By default a valid logic configuration is checked before upload. Uncomment to disable the check. ; check_logic = 0 # Entry address for MCU program. Default is the base value of flash address, 0x80000000. Can be set to a non-default # value, e.g. 0x80008000, when using a custom boot loader. ; board_build.boot_addr = 0x80000000 board_upload.address = 0x80020000 board_build.boot_addr = 0x80020000 # Boot mode. Supported values: # * flash: Default, boot from flash. # * flash_sram: Boot from flash and run in SRAM. Suitable for developing custom boot loaders. # * sram: Boot from SRAM. ; board_build.boot_mode = flash # To add additional settings to the default linker script: ; board_build.ldscript = user.ld # To overwrite the default linker script defined in SDK: ; board_build.ldscript = user.ld- # Logic configuration section [setup_logic] # Logic settings and pin map. Leave empty to use board default. logic_ve = example_board.ve # Logic device that matches packaging, possible values: # * AGRV2KL100 # * AGRV2KL64 # * AGRV2KL64H # * AGRV2KL48 # * AGRV2KQ32 logic_device = AGRV2KQ32 # Whether logic bin will be compressed. Size of uncompressed logic bin: 100KB. Size of compressed logic bin: < 48KB. # Compressed logic takes an extra 30-50 ms during boot. ; logic_compress = true # Whether logic configuration will be embedded in mcu program. Default is false. ; logic_embed = true # User defined address for logic bin. The default address is at the last 100KB for uncompressed logic and the last 48KB # for compressed logic. ; board_upload.logic_address = 0x80027000 # IP name, can be either predefined or user defined. ip_name = analog_ip ; ip_name = analog_ip # Logic directory. Required for user defined IP. logic_dir = logic # For portable user defined IP. ; logic_ip = true # User defined IP directory. ; ips_dir = ips # Extra design level settings for Supra. These are additional to board level settings. design.asf = ./example_board.asf ; design.pre_asf = ./example_board.pre.asf ; design.post_asf = ./example_board.post.asf # Debug and upload configuration [setup_upload] # The debug and upload protocol. Supported values: # * jlink-openocd # * jlink-openocd-jtag # * cmsis-dap-openocd # * cmsis-dap-openocd-jtag # * stlink-dap-openocd-dapdirect_swd # * serial (debugging through serial is supported by AGM DAPLink only, ver31 and above) protocol = cmsis-dap-openocd debug_tool = ${this.protocol} upload_protocol = ${this.protocol} # Debug and upload speed, in KHz ; debug_speed = 10000 ; upload_speed = 10000 # Reset the device before uploading. Can be used when device is not responding due to erroneous flash. ; upload_srst = true # For upload using serial port. No debug is available. [setup_upload_serial] upload_protocol = serial # Set the upload port. Similar to monitor_port. upload_port = COM* # Upload baud rate upload_speed = 115200 # Monitor with printf through UART [setup_monitor] # Logger interface. Can be any internal UART. Note that the TX pin is decided by the .ve file in setup_logic section. logger_if = UART0 # Set the port to be used. Supported values: # * COM*: Windows, any COM port # * COMx: Windows, a specific port like COM11 # * /dev/ttyACMx: Linux CDC device # * /dev/ttyUSBx: Linux USB to UART device monitor_port = COM* # Monitor baud rate monitor_speed = 115200 # Monitor with printf through Segger RTT [setup_monitor_rtt] logger_if = RTT monitor_port = socket://localhost:19021 # Configuration for batch binary file. [setup_batch] # By default, the "Create Batch" command will create a batch binary file, including logic bin and MCU program bin. # Additionally, other user binary files can be specified. An integer number can also be specified instead of a .bin file # name, in which case the specified value will be directly put into the given address. ; batch_user_bin = user0.bin:0x80008000 user1.bin:0x8000f000 0x12345678:0x81000060 # A user defined logic bin can be specified. This will replace the default logic bin in current project. ; batch_user_logic = user_logic.bin # This can overwrite the default batch output file name, which is {program name}_{env name}_batch.bin ; batch_output = user_batch_output.bin # Lock the flash and turn on read protection for the generated batch bin. ; lock_flash = true # Extra arguments for creating batch. ; batch_arg = --misc 0x0f # Base environment. Shared in both debug and release. [env] # Development platform. Do not change. platform = AgRV extends = setup # Common settings. setup_logic # Logic settings, include pin map, IP, etc. setup_upload # Debug and upload settings. Replace with setup_upload_serial to use serial upload. setup_monitor # Monitor settings. Replace with setup_monitor_rtt to use Segger RTT. setup_batch # Batch binary settings. [env:debug] build_type = debug [env:release] build_type = release ; [env:serial] ; build_type = release ; ; board_upload.address = 0x80020000 ; upload_protocol = serial ; upload_speed = 460800 ; custom_speed = 115200