FreeRTOS-Kernel/portable/GCC/RISC-V/chip_extensions.cmake
Joe Benczarski 37678b0656
Support configurable RISC-V chip extension (#773)
* Support configurable RISC-V chip extension

Added the FREERTOS_RISCV_EXTENSION option to allow the user
to select which chip extension they want included. Removed the
port for pulpino to instead use the new option.

* Add port GCC_RISC_V_GENERIC and IAR_RISC_V_GENERIC

* Add two rics-v generic ports to support FREERTOS_RISCV_EXTENSION
  config

---------

Co-authored-by: Joe Benczarski <jbenczarski@trijicon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2023-10-27 11:57:52 -07:00

20 lines
945 B
CMake

if( FREERTOS_PORT STREQUAL "GCC_RISC_V_GENERIC" )
set( VALID_CHIP_EXTENSIONS
"Pulpino_Vega_RV32M1RM"
"RISCV_MTIME_CLINT_no_extensions"
"RISCV_no_extensions"
"RV32I_CLINT_no_extensions" )
if( ( NOT FREERTOS_RISCV_EXTENSION ) OR ( NOT ( ${FREERTOS_RISCV_EXTENSION} IN_LIST VALID_CHIP_EXTENSIONS ) ) )
message(FATAL_ERROR
"FREERTOS_RISCV_EXTENSION \"${FREERTOS_RISCV_EXTENSION}\" is not set or unsupported.\n"
"Please specify it from top-level CMake file (example):\n"
" set(FREERTOS_RISCV_EXTENSION RISCV_MTIME_CLINT_no_extensions CACHE STRING \"\")\n"
" or from CMake command line option:\n"
" -DFREERTOS_RISCV_EXTENSION=RISCV_MTIME_CLINT_no_extensions\n"
"\n"
" Available extension options:\n"
" ${VALID_CHIP_EXTENSIONS} \n")
endif()
endif()