Closed edwardalee closed 4 days ago
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.
The changes focus on improving code efficiency, consistency, and documentation across various files. In lib/schedule.c
, variables are better reused to enhance the efficiency of the lf_schedule_trigger
function. Various CMakeLists.txt files are updated to correct and consistently use the platform name "nRF52". Additionally, lf_nrf52_support.{h,c}
files are refactored for better interrupt handling and clearer documentation. Lastly, a macro is added to platform/impl/CMakeLists.txt
for streamlined preprocessor definitions.
Files | Change Summary |
---|---|
lib/schedule.c | Introduced external variable declarations for event_t to reuse across switch cases in lf_schedule_trigger . |
.../low_level_platform/api/CMakeLists.txt | Changed platform name comparison from "Nrf52" to "nRF52" for consistency. |
.../low_level_platform/api/platform/lf_nrf52_support.h | Updated documentation comments to correct platform name and author tags formatting. |
.../low_level_platform/impl/CMakeLists.txt | Corrected platform name in conditional statements and error messages, and updated status message. |
.../low_level_platform/impl/src/lf_nrf52_support.c | Refactored interrupt handling and critical sections, including renaming and changing variable types. |
.../platform/impl/CMakeLists.txt | Added a macro to apply preprocessor definitions based on defined variables. |
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
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?
@edwardalee what should we do with this PR? Include it in 0.8.0
or not?
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.