Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qitas committed Mar 31, 2024
1 parent c044e2c commit 71f4c31
Show file tree
Hide file tree
Showing 24 changed files with 244 additions and 29 deletions.
4 changes: 2 additions & 2 deletions builder/frameworks/agrv_sdk.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
AgRV SDK Framework
Agm32 SDK Framework
Software for Developing on the AgRV Platform
Software for Developing on the Agm32 Platform
"""

import os, sys
Expand Down
2 changes: 1 addition & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
env.Execute(
env.VerboseAction(
"$PYTHONEXE -m pip install psutil",
"Installing AgRV SDK's Python dependencies",
"Installing Agm32 SDK's Python dependencies",
)
)

Expand Down
2 changes: 1 addition & 1 deletion examples/ahb_slave/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/analog/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_ip/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/dfu/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ include_dir = ${setup.include_dir}
default_envs = dev

[env]
platform = agm32rv
platform = Agm32
extends = setup_uart

[env:dev]
Expand Down
2 changes: 1 addition & 1 deletion examples/embOS/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
5 changes: 5 additions & 0 deletions examples/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
4 changes: 2 additions & 2 deletions examples/example/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default_envs = debug
# * agrv2k_103
# * agrv2k_303
# * agrv2k_407
board = agrv2k_103
board = agrv2k_407

# Supported frameworks:
# * agrv_sdk: Basic SDK
Expand Down Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/freeRTOS/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/lwip/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
210 changes: 210 additions & 0 deletions examples/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# 2023-12-08
# 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_103

# 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

# Program name. This determines the .elf and .bin file names.
program = agm_example

# Source files to be compiled, relative to src_dir defined in the platformio section.
# * "+<PATH>" means to include
# * "-<PATH>" means to exclude
# * "**" means any path, including all sub directories
build_src_filter = "-<*> +<./src/**/*.c>"

# Extra compiler flags.
; build_flags =

# 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

# 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.
board_logic.ve =

# Logic device that matches packaging, possible values:
# * AGRV2KL100
# * AGRV2KL64
# * AGRV2KL48
# * AGRV2KQ32
board_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.
; board_logic.compress = 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 = user_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
protocol = jlink-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

# Lock the flash and turn on read protection for the generated batch bin.
; lock_flash = true


# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = Agm32

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

# Compiler flags for debug build. The default is "-g3 -ggdb3 -gdwarf-4".
; debug_build_flags = -Og -g

[env:release]
build_type = release

# Compiler flags for release build. The default is "-Os".
; release_build_flags = -O3
2 changes: 1 addition & 1 deletion examples/rtthread/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/spi/fast_spi/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_envs = flash_fast

[common]
platform = agm32rv
platform = Agm32
board = agrv2k_407
framework = agrv_sdk
board_upload.logic_address = 0x80027000
Expand Down
2 changes: 1 addition & 1 deletion examples/spi/full_duplex_spi/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_envs = debug

[setup]
platform = agm32rv
platform = Agm32
board = agrv2k_407
framework = agrv_sdk

Expand Down
2 changes: 1 addition & 1 deletion examples/spi/psram/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_envs = debug

[setup]
platform = agm32rv
platform = Agm32
board = agrv2k_407
framework = agrv_sdk

Expand Down
2 changes: 1 addition & 1 deletion examples/uCOS/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/uart_master/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ src_dir = .
include_dir = ./src

[setup]
platform = agm32rv
platform = Agm32
framework = agrv_sdk
board = agrv2k_103
logic_compress = true
Expand Down
2 changes: 1 addition & 1 deletion examples/usb/cdc_msc/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/usb/host_cdc_msc_hid/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/usb/otg_host_hid_device_cdc/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ monitor_port = socket://localhost:19021
# Base environment. Shared in both debug and release.
[env]
# Development platform. Do not change.
platform = agm32rv
platform = Agm32

extends =
setup # Common settings.
Expand Down
Loading

0 comments on commit 71f4c31

Please sign in to comment.