Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configurable RISC-V chip extension #773

Merged
merged 27 commits into from
Oct 27, 2023
Merged

Conversation

JoeBenczarski
Copy link
Contributor

@JoeBenczarski JoeBenczarski commented Sep 1, 2023

Support configurable RISC-V chip extension with cmake

Description

In this PR:

  • Added the FREERTOS_RISCV_EXTENSION option along with two port target GCC_RISC_V_GENERIC and IAR_RISC_V_GENERIC to allow the user to select which chip extension they want included.
  • Move the change to port cmake file to keep the root cmake file clean.
  • Developers use existing RISC-V ports with cmake won't have be effected

Existing RISC-V cmake port only support the following combinations:

  • FREERTOS_PORT = GCC_RISC_V, chip extension = RISCV_MTIME_CLINT_no_extensions
  • FREERTOS_PORT = GCC_RISC_V_PULPINO_VEGA_RV32M1RM, chip extension = Pulpino_Vega_RV32M1RM
  • FREERTOS_PORT = IAR_RISC_V, chip extension = RV32I_CLINT_no_extensions

To support other combinations, two generic port targets are created:

  • FREERTOS_PORT = GCC_RISC_V_GENERIC
  • FREERTOS_PORT = IAR_RISC_V_GENERIC

User has to specify FREERTOS_RISCV_EXTENSION in the cmake file to use these ports:

set( FREERTOS_PORT "GCC_RISC_V_GENERIC" CACHE STRING "" FORCE)
set( FREERTOS_RISCV_EXTENSION RISCV_MTIME_CLINT_no_extensions CACHE STRING "" FORCE )

Test Steps

n/a

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

#772

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.
@JoeBenczarski JoeBenczarski requested a review from a team as a code owner September 1, 2023 11:04
@kar-rahul-aws
Copy link
Member

Hi @JoeBenczarski
Thank you for your valuable contribution. We will review the PR and get back to you.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5281427) 93.64% compared to head (24cbfa2) 93.64%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #773   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files           6        6           
  Lines        2549     2549           
  Branches      608      608           
=======================================
  Hits         2387     2387           
  Misses        107      107           
  Partials       55       55           
Flag Coverage Δ
unittests 93.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chinglee-iot chinglee-iot self-assigned this Sep 4, 2023
* Add two rics-v generic ports to support FREERTOS_RISCV_EXTENSION
  config
@chinglee-iot chinglee-iot self-requested a review September 4, 2023 07:52
@chinglee-iot
Copy link
Member

@JoeBenczarski
Thank your for creating this PR.
It looks like the change will break existing rics-v project with cmake.
Suggest we create two new ports for FREERTOS_CHIP_EXTENSION

  • GCC_RISC_V_GENERIC
  • IAR_RISC_V_GENERIC

Please help to take a look at this [PR] suggestion(JoeBenczarski#1)

@JoeBenczarski
Copy link
Contributor Author

@JoeBenczarski Thank your for creating this PR. It looks like the change will break existing rics-v project with cmake. Suggest we create two new ports for FREERTOS_CHIP_EXTENSION

  • GCC_RISC_V_GENERIC
  • IAR_RISC_V_GENERIC

Please help to take a look at this [PR] suggestion(JoeBenczarski#1)

Good idea. I just merged that PR.

@chinglee-iot
Copy link
Member

@JoeBenczarski Thank your for creating this PR. It looks like the change will break existing rics-v project with cmake. Suggest we create two new ports for FREERTOS_CHIP_EXTENSION

  • GCC_RISC_V_GENERIC
  • IAR_RISC_V_GENERIC

Please help to take a look at this [PR] suggestion(JoeBenczarski#1)

Good idea. I just merged that PR.

Thank you. I will also update the description of this PR and ask for another reviewer's opinion.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@manvensh manvensh merged commit 37678b0 into FreeRTOS:main Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants