Skip to content

Conversation

tnmysh
Copy link
Collaborator

@tnmysh tnmysh commented Sep 27, 2025

Xlnx BSP was moved out of libmetal to new library module maintained in downstream repo: libmetal_xlnx_extension.a

Modify zynqmp_r5 platform to use interrupt controller defined in this new library module.

In the process fix freertos compilation on zynqmp_r5 platform as well.

@tnmysh tnmysh requested review from arnopo and edmooring September 27, 2025 00:15
if (FIND_FREERTOS)
collect(PROJECT_LIB_DEPS freertos)
endif(FIND_FREERTOS)
collect(PROJECT_LIB_DEPS "libfreertos.a")
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems strange that you have to change the Freertos integration method. the original declaration seems to me more generic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@arnopo
Actually you are right. collect(PROJECT_LIB_DEPS <text>) ends up as linker flags -l<text> I should keep it as before. Other places as well. I will fix it.

tnmysh added 3 commits October 3, 2025 11:04
xlnx bsp implementation of some libmetal interfaces was moved from
libmetal library repo to vendor repo. Application should use this new
vendor specific library via libmetal API for platform specific
configuration. For example, GIC configuration on cortex-R cores on xlnx
platforms. Do required changes in legacy apps to use this new extension
module for xlnx cortex-R port.

Signed-off-by: Tanmay Shah <[email protected]>
Add cmake file for freertos. This assigns project system variable.
Current build on freertos fails due to undefined API used. Also,
suspend.c file declares extern variable that is not found during compile
time. Solve this by getting current task handle in suspend resume APIs
instead passing an argument to the function.

Signed-off-by: Tanmay Shah <[email protected]>
PROJECT_SYSTEM variable was added based on CMAKE_SYSTEM_NAME, however
cmake doesn't support some RTOS names such as FreeRTOS. So,
PROJECT_SYSTEM value can be different than CMAKE_SYSTEM_NAME.
Toolchain file includes these cmake files. So PROJECT_SYSTEM variable
assignment from options.cmake can be removed safely.
Instead assign value to PROJECT_SYSTEM variable in relative OS cmake
file.

Signed-off-by: Tanmay Shah <[email protected]>
@tnmysh tnmysh force-pushed the xlnx_use_libmetal_extension_module branch from 993a302 to ffc2cc6 Compare October 3, 2025 18:08
Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

just a minor remark else LGTM

#ifndef RPMSG_NO_IPI
.irq_num = 1,
#ifdef FREERTOS_BSP
.irq_info = (void *)(IPI_IRQ_VECT_ID - 32),
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpicking : The value 32 seems a magic number here. I could be better to use a define or a config linked to FreeRTOS.

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

Successfully merging this pull request may close these issues.

2 participants