-
Notifications
You must be signed in to change notification settings - Fork 80
modules: hal_silabs: Add Silabs Gecko HAL for EFR32BG22C224F512IM40 SoC #19
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
Conversation
fbb0fa1 to
bc6e2a0
Compare
|
@fkokosinski When updating HAL code to version 4.1.1 of Gecko SDK I forgot to bump https://github.com/antmicro/hal_silabs/blob/bg22-minimal/gecko/service/device_init/src/brd4184b/sl_device_init_clocks.c file. This is now fixed. |
fkokosinski
left a comment
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.
LGTM
|
Changes look good to me. |
galak
left a comment
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.
can you remove the board code. Any board code should be handled in Zephyr.
81c3c5b to
2836615
Compare
@galak I removed the whole Please let me know if that change is OK. |
gecko/CMakeLists.txt
Outdated
| if (${CONFIG_BOARD} STREQUAL "efr32bg_sltb010a") | ||
| set(SILABS_GECKO_BOARD "brd4184b") | ||
| endif() |
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.
To me it looks like setting SILABS_GECKO_BOARD only effects which sl_device_init_clocks.c is compiled in.
To me the content in brd4184b/sl_device_init_clocks.c seems to be specific to SoC and not board specific.
We defined a new board which means ${CONFIG_BOARD} will not be efr32bg_stlb010a. That means without altering this CMakeLists.txt our project can not compile.
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.
Right, I removed the board specific code (sl_device_init_clocks.c) from HAL and implemented a separate clock init function in Zephyr PR as part of the board support. Now SILABS_GECKO_BOARD is not used anywhere so I deleted it. I believe that, from zephyr perspective, things like clock configuration are specific to given platform, not to whole SoC. That is why I placed the code in board init file.
2836615 to
8ff5330
Compare
gecko/CMakeLists.txt
Outdated
| ${ZEPHYR_BASE}/boards/arm/${CONFIG_BOARD} | ||
| ) |
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.
I think BOARD_ROOT is a better fit here. But this variable is a list.
A potential solution could be:
| ${ZEPHYR_BASE}/boards/arm/${CONFIG_BOARD} | |
| ) | |
| ) | |
| foreach(root ${BOARD_ROOT}) | |
| if(IS_DIRECTORY "${root}/boards/arm/${CONFIG_BOARD}") | |
| zephyr_include_directories(${root}/boards/arm/${CONFIG_BOARD}) | |
| endif() | |
| endforeach() |
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.
Right, that will allow us to handle out-of-tree development. Thank you for this, I added the change to the PR.
Origin: Silicon Labs Gecko SDK URL: https://www.silabs.com/products/development-tools/software/simplicity-studio Version: 3.1.2 Purpose: board configuration files are added. License: Zlib Maintained-by: External Co-authored-by: Pawel Czarnecki <[email protected]> Signed-off-by: Sateesh Kotapati <[email protected]> Signed-off-by: Paweł Czarnecki <[email protected]>
Origin: Silicon Labs Gecko SDK URL: https://www.silabs.com/products/development-tools/software/simplicity-studio Version: 4.1.1 Purpose: update HAL version from 3.1.2 to 4.1.1 License: Zlib Maintained-by: External Signed-off-by: Paweł Czarnecki <[email protected]>
It seems that throwing preprocessor error when __ARM_FEATURE_CMSE is not defined is not needed. Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
8ff5330 to
597f408
Compare
|
@galak I addressed your comment about removing the board code. Please have a look at this PR. |
Hi @galak, I'm dismissing your review because it looks like your comment had been addressed, and this PR has been stale for a while.
sateeshkotapati
left a comment
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.
Looks good to me
Hi, this PR supersedes #13. It is a minimal code that should be added to hal_silabs module in order to get initial support for
EFR32BG22SoCs. Added code is free of MSLA license which was a problem in #13.Although it is a minimal version of the previous PR, we still need to import code and headers for sleeptimer, power_manager, hfxo_manager together with device_init because we do need all of that for our initial support PR in Zephyr.
Origin: Silicon Labs Gecko SDK
URL:
https://www.silabs.com/products/development-tools/software/simplicity-studio Version: 3.1.2
Purpose: board configuration files are added.
License: Zlib
Maintained-by: External
Co-authored-by: Pawel Czarnecki [email protected]
Signed-off-by: Sateesh Kotapati [email protected]
Signed-off-by: Paweł Czarnecki [email protected]