-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix support for NRF52 #442
Conversation
Any particular reason this is still marked as draft? |
It needs to support soft devices before it's ready for prime time. I'm not sure how to specify in the target parameters whether and which soft device you want. And the makefile generation needs to be tuned. We also need to verify that these changes don't break the Zepher support for nRF52. |
WalkthroughThe changes focus on improving code efficiency, consistency, and documentation across various files. In Changes
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
platform/impl/CMakeLists.txt (1)
20-29
: Introducedplatform_define
macro for flexible compile-time configurations.The new macro
platform_define
enhances flexibility by allowing compile-time configurations based on defined variables. This approach should simplify the management of platform-specific settings and is a welcome improvement. Ensure that this macro is well-documented to aid future developers in understanding its usage.Consider adding detailed comments in the CMakeLists.txt file explaining the purpose and usage of the
platform_define
macro to improve maintainability.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- lib/schedule.c (2 hunks)
- low_level_platform/api/CMakeLists.txt (1 hunks)
- low_level_platform/api/platform/lf_nrf52_support.h (2 hunks)
- low_level_platform/impl/CMakeLists.txt (3 hunks)
- low_level_platform/impl/src/lf_nrf52_support.c (5 hunks)
- platform/impl/CMakeLists.txt (1 hunks)
Files skipped from review due to trivial changes (2)
- low_level_platform/api/platform/lf_nrf52_support.h
- low_level_platform/impl/CMakeLists.txt
Additional comments not posted (3)
low_level_platform/api/CMakeLists.txt (1)
6-6
: Standardized platform naming convention.The change from "Nrf52" to "nRF52" aligns with the standard naming conventions and improves readability. Ensure that all references to the platform name are updated across the entire project to maintain consistency.
low_level_platform/impl/src/lf_nrf52_support.c (1)
Line range hint
76-97
: Refactored interrupt handling and critical section management.The changes in interrupt handling and critical section management, including the renaming of
_lf_nested_region
to_lf_nested_count
, are appropriate and enhance the clarity and correctness of the code. Ensure that these changes are thoroughly tested, especially in scenarios involving nested interrupts and critical sections.Also applies to: 195-266
lib/schedule.c (1)
Line range hint
237-254
: Optimized event scheduling and conflict handling.The changes to how events are scheduled and conflicts are handled, particularly with the introduction of the
dummy
andfound
variables outside the switch block, optimize the performance and maintainability of the code. Ensure that these changes are covered by comprehensive tests to verify their correctness under various scenarios.
@edwardalee what should we do with this PR? Include it in |
Yes, let's merge this. It needs an approving review. There is still work to do, but it is now usable. There is a PR in the lf-lang web page to point to this capability. |
With the refactoring of platform support, code generation for NRF52 stopped working. This gets it working again, albeit with quite a few limitations. To program an nRF52 board, we suggest starting with the lf-nRF52 repository. The limitations are documented there.
Summary by CodeRabbit
Bug Fixes
Refactor
Documentation
Enhancements
platform_define
to apply preprocessor definitions based on defined variables.