#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

comment "RV32IM Configuration Options"

choice
	prompt "Toolchain Selection"
	default RV32IM_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS
	default RV32IM_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS

config RV32IM_TOOLCHAIN_GNU_RVGL
	bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)"
	select ARCH_TOOLCHAIN_GNU
	---help---
		This option should work for any modern GNU toolchain (GCC 5.2 or newer)
		configured for riscv32-unknown-elf.

config RV32IM_TOOLCHAIN_GNU_RVGW
	bool "Generic GNU RVG toolchain under Windows"
	depends on TOOLCHAIN_WINDOWS
	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
	select ARCH_TOOLCHAIN_GNU
	---help---
		This option should work for any modern GNU toolchain (GCC 5.2 or newer)
		configured for riscv32-unknown-elf.

config RI5CY_GAP8_TOOLCHAIN
	bool "toolchain from gap_riscv_toolchain"
	select ARCH_TOOLCHAIN_GNU
	---help---
			Choose the toolchain of riscv32-unknown-elf with full support
			for PULP extensions. gap_sdk also uses it.
			https://github.com/GreenWaves-Technologies/gap_riscv_toolchain/


endchoice

config RV32IM_HW_MULDIV
	bool "Supports Hardware MUL and DIV"
	default n
	---help---
		Specifies if the architecture supports hardware multiply and
		hardware division instructions.  Selecting this will cause the
		generated code to natively use mul / div instructions for any
		math operations.

config RV32IM_SYSTEM_CSRRS_SUPPORT
	bool "Supports RV core feature identification via CSRRS opcode"
	default n
	---help---
		Specifies if the architecture supports the SYSTEM opcode for reading
		Control Status Registers to obtain the RV core option flags.

config RV32IM_CUSTOM_IRQ_SUPPORT
	bool "Has custom implementation for IRQ handling"
	default n
	---help---
		Allows overriding the standard IRQ processing as described
		in the RISC-V architecture documents.  This allows architecture
		specific code to support non-standard IRQ processing in the core.
