forked from zephyrproject-rtos/hal_silabs
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Wiseconnect 3.4 #12
Draft
jerome-pouiller
wants to merge
20
commits into
SiliconLabsSoftware:silabs
Choose a base branch
from
jerome-pouiller:wiseconnect-3.4
base: silabs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Wiseconnect 3.4 #12
jerome-pouiller
wants to merge
20
commits into
SiliconLabsSoftware:silabs
from
jerome-pouiller:wiseconnect-3.4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Upgrading Wiseconnect is a tedious task. This new script simplifies upgrade and track of changes between the upstream and the HAL. Signed-off-by: Jérôme Pouiller <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
Zephyr CI raise errors for misspelled words. So, the Zephyr code uses "EXTENSION" while HAL still use "EXTENTION". Signed-off-by: Jérôme Pouiller <[email protected]>
Wiseconnect provides its own version (and its own definitions) of socket.h. These conflict with the ones provided by Zephyr. So, change Wiseconnect to use the Zephyr socket definition. Signed-off-by: Jérôme Pouiller <[email protected]>
Zephyr also export its version of fd_set. The two definitions are incompatible. This patch can be partly automated with: sed -i -e 's/\bFD_/SL_SI91X_FD_/' -e 's/\bfd_set/sl_si91x_fd_set/' **/*.[ch] Signed-off-by: Jérôme Pouiller <[email protected]>
Wiseconnect define the "ETHERNET" macro. This causes failures during Zephyr compilation. However "ETHERNET" symbol is not use by Wiseconnect, so it can be safely removed. Signed-off-by: Jérôme Pouiller <[email protected]>
ROUND_UP() is also defined in Zephyr. However, it is not referenced by Wiseconnect. So we can safely drop it. Signed-off-by: Jérôme Pouiller <[email protected]>
MIN() is also defined in Zephyr with the same definition. Signed-off-by: Jérôme Pouiller <[email protected]>
IS_POWER_OF_TWO() is also defined in Zephyr with the same definition. Signed-off-by: Jérôme Pouiller <[email protected]>
Signed-off-by: Jérôme Pouiller <[email protected]>
sl_component_catalog.h should be included only if SL_COMPONENT_CATALOG_PRESENT is set. Signed-off-by: Jérôme Pouiller <[email protected]>
Wiseconnect relies on an extension of CMSIS API to store the status of the firmware. This API does not exist on Zephyr. Fortunately, the firmware status is never read. So we can drop this code without breaking anything. Signed-off-by: Jérôme Pouiller <[email protected]>
Wiseconnect has been original developed for FreeRTOS. sl_si91x_trigger_sleep() directly relies of FreeRTOS services. This function does not compile. However, it is never called and can be safely removed. Signed-off-by: Jérôme Pouiller <[email protected]>
configTICK_RATE_HZ is specific to Wiseconnect. Equivalent in Zephyr is CONFIG_SYS_CLOCK_TICKS_PER_SEC. Note usually, configTICK_RATE_HZ == 1000 while CONFIG_SYS_CLOCK_TICKS_PER_SEC == 1024. Signed-off-by: Jérôme Pouiller <[email protected]>
Nothing from os_tick.h was used. Signed-off-by: Jérôme Pouiller <[email protected]>
Compiler complain with: .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c: In function 'sli_si91x_accept_async': .../modules/hal/silabs/wiseconnect/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c:243:5: error: implicit declaration of function 'close'; did you mean 'fclose'? [-Werror=implicit-function-declaration] 243 | close(client_socket_id); | ^~~~~ | fclose close() is indeed declared in the BSD socket abstraction provided by Wiseconnect: int close(int socket_id) { errno = 0; // Clear any existing error return sli_si91x_shutdown(socket_id, SHUTDOWN_BY_ID); } To avoid any confusion between BSD sockets and Wiseconnect API, this patch just call the underlying function (sli_si91x_shutdown()) instead of close(). Signed-off-by: Jérôme Pouiller <[email protected]>
Wiseconnect allows to use an alternative clock if the temperature during the start up is too high. However: - this feature relies on ADC and we don't want to import it for now - this kind of magic feature should be exposed to the user rather than hidden in the HAL (especially since use can also use ADC hardware) Signed-off-by: Jérôme Pouiller <[email protected]>
ble_config.h is expected to contain the specific configuration for the board. However, this does not fit very well with Zephyr board definitions. In the other hand, rsi_bt_common_config.h mostly contains all the necessary definition. This patch just add a few missing definition. These definitions are more or less arbitrary and we hope it will fit all the use cases. Signed-off-by: Jérôme Pouiller <[email protected]>
sl_strlen() and sl_strnlen() can be safely replaced by Posix equivalents. Signed-off-by: Jérôme Pouiller <[email protected]>
Zephyr linker script does not define .common_ipmu_ram section. This reverts the change introduced on Wiseconnect 3.4 Signed-off-by: Jérôme Pouiller <[email protected]>
jerome-pouiller
force-pushed
the
wiseconnect-3.4
branch
from
December 5, 2024 16:24
0b7aa30
to
2713aaf
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to the use of the last version of WiseConnect. I split the change I made on Wiseconnect in atomic patches. I hope some of these could be included in the upstream.