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

Feature/freertos singlecore #407

Open
wants to merge 17 commits into
base: v2-staging
Choose a base branch
from

Conversation

Known4225
Copy link
Contributor

@Known4225 Known4225 commented Jul 10, 2024

I have gotten the command system up and running with FreeRTOS.

List of changes/features:

  • Changed FreeRTOS internal tick rate to 10KHz (max rate for a FreeRTOS task)
  • Brought over a bunch of driver files (serial, pwm, analog, many more)
  • Implemented command system with the FreeRTOS scheduler
  • stats collection through the FreeRTOS run time statistics
  • user_config.h file (somewhat misaligned reality given the coexistence of FreeRTOSConfig.h)
  • counter commands
  • hw commands
  • user apps framework
  • blink app
  • game app

Notable absences:

  • commands/data over ethernet
  • logging
  • icc-related systems

It's a little bit "quick and dirty" as I went through and just commented out anything to do with icc in the commands source file. It's more of a "now it works" than a "this is the correct way to do it". Luckily the structure of the apps have only minor changes (FreeRTOS task handles, loops instead of callback functions, etc).

I think next steps are getting ethernet working, moving over the rest of the drv files, and (maybe) enabling icc stuff for the commands (to put them on par with the v1.2 implementation). Though the icc system is something of a mystery to me currently.

I have also not tested the hardware commands with the real world!

@codecubepi codecubepi added driver Involves the drivers which interface between C firmware and hardware. v2 For FreeRTOS codebase labels Jul 15, 2024
Copy link
Collaborator

@npetersen2 npetersen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Known4225 !

Before we try to review this PR, can you work on reducing the amount of files changed a bit? For example, it looks like you deleted everything..? then added some stuff back.

Can you try to do one of these things? 1) explain what you did so we can follow the story better; 2) put back changed files that you don't need to change; 3) make multiple PRs which make these full changes in smaller sets so we can easily review them

@npetersen2
Copy link
Collaborator

Hi @Known4225 , per our conversation yesterday, please try to do the following:

  • Fix the basic/ folder files so they do not appear as changed in git. Looks like it is a file permission issue, i.e., you somehow changed these from 755 to 644 permissions (see this link for example)
  • Split this PR is multiple PRs
    • Example: you added most/all of the remaining drv/ modules to the shared folder, but they appear as new files, so it is nearly impossible to truly review the changeset to see if you modified anything in these files. Please make a new PR which does this, but as git file renames so it can easily be reviewed
    • Make a new PR/branch off this other PR you will make above which adds your new code and actual file changes.

Keep in mind, to get the CLI working, i.e., commands.c, you do not need to "install" all the currently supported commanded.. You can keep the hw command for later to remove the need to get the drivers working. Instead, make just the counter command work, etc.

@codecubepi codecubepi self-requested a review July 29, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Involves the drivers which interface between C firmware and hardware. v2 For FreeRTOS codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants