; # 2024-10-09 ; # 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 ; # Default environments to be processed by pio. Multiple environments are allowed. ; default_envs = debug ; # 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_407 ; # 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 ; # 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 = agm_test_uart ; # 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 = ; # 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 = -Os ; # 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 the board default. ; logic_ve = test_uart.ve ; # Logic device that matches packaging, possible values: ; # * AGRV2KL100 ; # * AGRV2KL64 ; # * AGRV2KL64H ; # * AGRV2KL48 ; # * AGRV2KQ32 ; logic_device = AGRV2KL100 ; # 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 = multi_uart_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 = ; ; design.pre_asf = ; ; design.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 [setup] boards_dir = ./boards board = agrv2k_407 board_logic.ve = test_uart.ve #board_logic.compress = true #ips_dir = ../ips ip_name = multi_uart_ip logic_dir = logic ; logic_ve = top.ve board_logic.asf = test_uart.asf framework = agrv_sdk program = 2006_app_mcu_20063005 src_dir = src include_dir = src src_filter = "-<*> +<*.c>" lwip_imp_dir = tinyusb_imp_dir = #lwip_param = freertos #tinyusb_param = #board_build.boot_addr = upload #board_build.boot_mode = sram #board_upload.address = 0x20000000 #board_upload.logic_address = 0x80020000 #board_logic.device = AGRV2KL100 #board_logic.ve = my_board.ve board_upload.address = 0x80020000 board_build.boot_addr = 0x80020000 ; board_build.boot_mode = flash_sram build_unflags = -O2 build_flags = -Os -DLOGGER_BAUD_RATE=${setup.monitor_speed} -DAGRV_FP_STACK=0 -DDFU_FPGA_CONFIG=\"fpga_app.inc\" build_src_flags = -Wno-cast-align ; batch_user_bin = 0202_app_mcu_02023004.bin:0x80020000 fpga_app.bin:0x80031800 0x80020100:0x02023004 logger_if = UART0 #upload_port = /dev/ttyUSB0 #monitor_port = /dev/ttyUSB0 upload_port = COM3 monitor_port = COM3 monitor_speed = 57600 debug_speed = 10000 #debug_tools = cmsis-dap-openocd #upload_protocols = cmsis-dap-openocd debug_tool = cmsis-dap-openocd upload_protocol = cmsis-dap-openocd #debug_tool = jlink-openocd #upload_protocol = jlink-openocd #build_flags = #build_src_flags = #check_tool = cppcheck, clangtidy, pvs-studio #check_device = false #check_logic = 2 [setup_rtt] logger_if = RTT monitor_port = socket://localhost:19021 [platformio] boards_dir = ${setup.boards_dir} src_dir = ${setup.src_dir} include_dir = ${setup.include_dir} default_envs = dev ; board_upload.address = 0x80020000 [env] platform = AgRV extends = setup [env:dev] build_type = debug ; board_upload.address = 0x80020000 [env:release] build_type = release ; extra_scripts = ; pre:mcu_pre.py ; post:mcu_post.py ; board_upload.address = 0x80020000 ; board_upload.logic_address = 0x80060000 [env:rtt] build_type = debug extends = setup_rtt [env:serial] build_type = release ; board_upload.address = 0x80020000 upload_protocol = serial upload_speed = 460800 custom_speed = 115200