Skip to content

Add Cube for STM32MP2 Cortex-A35 #298

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

juickar
Copy link
Contributor

@juickar juickar commented Jul 21, 2025

This PR adds support for the Cortex-A35 of the STM32MP2x boards

@erwango
Copy link
Member

erwango commented Jul 22, 2025

@juickar Please rebase

Provide the stm32cube header files for the stm32mp2xx cortex A35

Signed-off-by: Julien Racki <[email protected]>
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Looks ok, but a PR using it is required before approval.

@@ -1047,10 +1047,10 @@ void VirtualTimer_IRQHandler(void)
/* the corrected value in a readable variable. */
/***************************************************************************/
#ifdef DEBUG_TIMER2
RELOAD_VAL2 = TimerPeriod + VL1_GetCurrentTimerValue();
VL1_SetCurrentTimerValue(RELOAD_VAL2);
//RELOAD_VAL2 = TimerPeriod + VL1_GetCurrentTimerValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

could you use cmsis_V6 instead? seems that it defines the functions for the armv7 also
else it would be more flexible to put it under #ifdef

zephyr_library_sources(soc/system_stm32mp2xx_a35.c)
else()
zephyr_library_sources(soc/system_stm32mp2xx_m33.c)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

perhapse use

if(CONFIG_CPU_CORTEX_A35)
    zephyr_library_sources(soc/system_stm32mp2xx_a35.c)
elseif(CONFIG_CPU_CORTEX_M33)
    zephyr_library_sources(soc/system_stm32mp2xx_m33.c)
else()
    message(FATAL_ERROR "Unsupported CPU configuration: Please define CONFIG_CPU_CORTEX_A35 or CONFIG_CPU_CORTEX_M33")
endif()```

Removed VL1_* calls as it is not yet supported in
the Zephyr CMSIS version for cortex A

Signed-off-by: Julien Racki <[email protected]>
disable the HAL_A35_WRAPPER_ENABLED include to avoid build warnings

Signed-off-by: Julien Racki <[email protected]>
Add Cortex A35 sources in the CMakeLists.txt to enable support
of the hal and ll files for the stm32mp2x Cortex A35.

Signed-off-by: Julien Racki <[email protected]>
Add the compile definition for the Cortex A35

Signed-off-by: Julien Racki <[email protected]>
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.

3 participants