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

Update all MCUs to ChibiOS 21.11.x/master #310

Merged
merged 54 commits into from
Feb 6, 2022

Conversation

zykrah
Copy link
Contributor

@zykrah zykrah commented Jan 1, 2022

This PR updates ChibiOS-Contrib to be up to date with ChibiOS 21.11.x (the master branch, because there is no separate branch for 21.11.x currently). Additionally, I believe this is the first build to include the new Raspberry Pi Pico RP2040 MCU.

This is in response to qmk/qmk_firmware#14877. I assume by merging this PR, development on getting RP2040 officially supported by QMK (without having to use sekigon_gonnoc's RP2040 VIAL fork) will be allowed to continue

From @tzarc in the QMK discord:
image
image

Changes:

  • Modified build.yml to use master branch of ChibiOS. Also fixed a minor bug that didn't allow extension packages to export.
  • Updated chconf.h files of MCUs, adding new required definintions going from ChibiOS 20.3.x -> ChibiOS 21.11.x
  • Some halconf.h files were also updated
  • Updated some mcuconf.h files (mainly STM32F4xx)
  • Updated missing MCU definitions from some files (mainly some STM mcuconf.h files)
  • Updated some STM ffconf.h files
  • Updated some old/deprecated method names
  • Updated some other minor code deprecations
  • I have removed PACKED_VAR from some typedef structs in a file because of redefinition errors. I don't know if this is the correct way of resolving this.

Notes:

  • I actually do not have much experience with C. Pretty much all of this was trial and error, so I may have done some things wrong.
  • These changes will have to be merged into a new branch, ie chibios-21.11.x
  • MCUs may all need to be individually tested in real life to see if everything functions properly. All support is currently theoretical.
  • There are a lot of commits because I still don't actually know how to build locally. (A heads up on how to do this would be nice)
  • I chose the master branch of ChibiOS because no branch for 21.11.x (stable) yet exists (This will have to change in the future)
  • I'll have to remove some of those vscode files.
  • Some STM32F4XX mcuconf.h files may still need slight updating + checking (check against the ChibiOS demos)
  • I'm unsure if some of the changes made to some chconf.h files using ChibiOS NIL are necessary.
  • I did not go over any of the warnings/notes presented when building CI, i only fixed any errors that prevented CI from building. Hence, there may still be some glaring issues that may have to be fixed additionally.
  • RP2040 is still untested afaik. @hanya may have already tested their code before it was merged though.
  • After making this PR, I have looked and many of these changes mirror other PRs regarding updating MCUs to 21.6.x (However this PR seeks to update to master branch/21.11.x rather than just 21.6.x)
  • I forgot to add myself to AUTHORS.txt
  • Thank you to all who helped me out, both on the ChibiOS discord and the AusKeys discord server

…onf.h files to include missing definitions. Still a few more things to add.
@@ -56,7 +55,7 @@ int main(void)
*/
OnboardLED_Off();

chDbgSuspendTrace(CH_DBG_TRACE_MASK_SWITCH);
chTraceSuspend(CH_DBG_TRACE_MASK_SWITCH);
Copy link
Contributor Author

@zykrah zykrah Jan 2, 2022

Choose a reason for hiding this comment

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

Just to change to an updated method

@Snipeye
Copy link

Snipeye commented Jan 22, 2022

Hello! I've got a CS minor (and done plenty of C/C++) but I've got next to no familiarity with this library - that said, I'm a keyboard nerd and would love to see this PR completed so the RP2040 would be useable in QMK. Is there anything that I can do to help?

@zykrah
Copy link
Contributor Author

zykrah commented Jan 22, 2022

Hello! I've got a CS minor (and done plenty of C/C++) but I've got next to no familiarity with this library - that said, I'm a keyboard nerd and would love to see this PR completed so the RP2040 would be useable in QMK. Is there anything that I can do to help?

Hey thanks for the expression of interest! As far as I know, all the work has already been done for the PR to be merged, however it's just waiting on a review from a maintainer. But feel free to go over the code and review it yourself if you want to check. I've already gone over all the file changes myself and everything looked good to me, apart from the few things i mentioned in the Notes section in the original PR message.

@zykrah zykrah mentioned this pull request Feb 1, 2022
@rusefillc
Copy link
Contributor

@fpoussin poke :)

@nodupe
Copy link

nodupe commented Feb 6, 2022

Hi, kindly, can we have some updates on this? Thank you!

@fpoussin
Copy link
Member

fpoussin commented Feb 6, 2022

Having a look

@@ -25,11 +25,11 @@ jobs:
- name: decompress ChibiOS ext resources
run: |
cd $CH_PATH/ext
for i in *.7z; do 7z x -y $i; done
for i in *.7z; do 7z x -y "$i"; done
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

pull_request:
branches: [ chibios-21.6.x ]
branches: [ chibios-21.11.x-dev ]
Copy link
Member

@fpoussin fpoussin Feb 6, 2022

Choose a reason for hiding this comment

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

I've pushed a chibios-21.11.x branch, you can use that

@@ -16,7 +16,7 @@ jobs:
release: '10-2020-q4'
- name: setup vars
run: |
echo "CH_VER=stable_20.3.x" >> $GITHUB_ENV
echo "CH_VER=master" >> $GITHUB_ENV
Copy link
Member

@fpoussin fpoussin Feb 6, 2022

Choose a reason for hiding this comment

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

I've added stable_21.11.x, please use that, master is a no go

@@ -15,7 +15,7 @@
*/

#include "fault_handlers.h"
#include <hal.h>
#include "hal.h"
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@fpoussin
Copy link
Member

fpoussin commented Feb 6, 2022

New stable branch added to ChibiOS repo, you can add the requested changes now:
https://github.com/ChibiOS/ChibiOS/tree/stable_21.11.x

@fpoussin fpoussin changed the base branch from chibios-21.6.x to chibios-21.11.x February 6, 2022 18:37
@fpoussin
Copy link
Member

fpoussin commented Feb 6, 2022

I've changed the merge branch to 21.11.x

Changed some branches
@zykrah
Copy link
Contributor Author

zykrah commented Feb 6, 2022

Thanks for that @fpoussin, requested changes implemented. I forgot to rename my branch before pushing so CI didn't run, but I only changed the build.yml as is evident in the commit. Do you want me to still run a test CI?

EDIT: Nevermind I just renamed the branch now. CI is running as I type this.

EDIT 2: Looks like my lack of git experience has put this in a tricky spot. Oops. Restored the branch but the CI should still be running in the 21.11.x branch in my fork. Hope that's okay.

EDIT 3: Looks like CI passed :) 🎉

@zykrah zykrah closed this Feb 6, 2022
@zykrah zykrah deleted the chibios-21.11.x-dev branch February 6, 2022 20:38
@zykrah zykrah restored the chibios-21.11.x-dev branch February 6, 2022 20:40
@zykrah zykrah reopened this Feb 6, 2022
@fpoussin
Copy link
Member

fpoussin commented Feb 6, 2022

Yes that's fine, CI should pass then I'll merge.
We can do more cleanup in another PR.

@zykrah
Copy link
Contributor Author

zykrah commented Feb 6, 2022

Yes that's fine, CI should pass then I'll merge. We can do more cleanup in another PR.

CI passed 👍 Thanks for the review fpoussin

@fpoussin fpoussin merged commit 47b1ce6 into ChibiOS:chibios-21.11.x Feb 6, 2022
@fpoussin
Copy link
Member

fpoussin commented Feb 6, 2022

It's done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants