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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stm32cube/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ elseif(CONFIG_CPU_CORTEX_M55)
zephyr_compile_definitions( -DCORE_CM55 )
elseif(CONFIG_CPU_CORTEX_A7)
zephyr_compile_definitions( -DCORE_CA7 )
elseif(CONFIG_CPU_CORTEX_A35)
zephyr_compile_definitions( -DCORE_CA35 )
elseif(CONFIG_CPU_CORTEX_M33)
zephyr_compile_definitions( -DCORE_CM33 )
endif()
Expand Down
8 changes: 7 additions & 1 deletion stm32cube/stm32mp2xx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
#
# SPDX-License-Identifier: Apache-2.0

zephyr_library_sources(soc/system_stm32mp2xx_m33.c)
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()
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()```

zephyr_library_sources(drivers/src/stm32mp2xx_hal.c)
zephyr_library_sources(drivers/src/stm32mp2xx_hal_rcc.c)
zephyr_library_sources(drivers/src/stm32mp2xx_hal_rcc_ex.c)
Expand Down
9 changes: 9 additions & 0 deletions stm32cube/stm32mp2xx/README
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,13 @@ Patch List:
- The stm32cube/stm32mp2xx/drivers/src/stm32mp2xx_ll_rcc.c file was modified
for retrieving the clock configuration of the I2C8 peripheral.

* Fix the use of virtual timer call
- The stm32cube/stm32mp2xx/soc/system_stm32mp2xx_a35.c file use VL1_*
functions which are not yet supported in the CMSIS version for Cortex A.
These calls have been removed if the used CMSIS version is older than 6.x.

* HAL_A35_WRAPPER_ENABLED disabled
- Disabled the HAL_A35_WRAPPER_ENABLED macro to prevent build warnings when compiling
Zephyr for the Cortex-A35.

See release_note.html from STM32Cube
2 changes: 1 addition & 1 deletion stm32cube/stm32mp2xx/drivers/include/stm32mp2xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" {
*/
#define HAL_MODULE_ENABLED
#if defined (CORE_CA35)
#define HAL_A35_WRAPPER_ENABLED
/* #define HAL_A35_WRAPPER_ENABLED */
#endif /* CORE_CA35 */
#define HAL_ADC_MODULE_ENABLED
#define HAL_BSEC_MODULE_ENABLED
Expand Down
44,526 changes: 44,526 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp211axx_ca35.h

Large diffs are not rendered by default.

45,803 changes: 45,803 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp211cxx_ca35.h

Large diffs are not rendered by default.

44,526 changes: 44,526 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp211dxx_ca35.h

Large diffs are not rendered by default.

45,803 changes: 45,803 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp211fxx_ca35.h

Large diffs are not rendered by default.

46,078 changes: 46,078 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp213axx_ca35.h

Large diffs are not rendered by default.

47,355 changes: 47,355 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp213cxx_ca35.h

Large diffs are not rendered by default.

46,078 changes: 46,078 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp213dxx_ca35.h

Large diffs are not rendered by default.

47,355 changes: 47,355 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp213fxx_ca35.h

Large diffs are not rendered by default.

47,205 changes: 47,205 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp215axx_ca35.h

Large diffs are not rendered by default.

48,482 changes: 48,482 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp215cxx_ca35.h

Large diffs are not rendered by default.

47,205 changes: 47,205 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp215dxx_ca35.h

Large diffs are not rendered by default.

48,482 changes: 48,482 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp215fxx_ca35.h

Large diffs are not rendered by default.

48,837 changes: 48,837 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp231axx_ca35.h

Large diffs are not rendered by default.

50,080 changes: 50,080 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp231cxx_ca35.h

Large diffs are not rendered by default.

48,837 changes: 48,837 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp231dxx_ca35.h

Large diffs are not rendered by default.

50,080 changes: 50,080 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp231fxx_ca35.h

Large diffs are not rendered by default.

50,389 changes: 50,389 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp233axx_ca35.h

Large diffs are not rendered by default.

51,632 changes: 51,632 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp233cxx_ca35.h

Large diffs are not rendered by default.

50,389 changes: 50,389 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp233dxx_ca35.h

Large diffs are not rendered by default.

51,632 changes: 51,632 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp233fxx_ca35.h

Large diffs are not rendered by default.

54,850 changes: 54,850 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp235axx_ca35.h

Large diffs are not rendered by default.

56,093 changes: 56,093 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp235cxx_ca35.h

Large diffs are not rendered by default.

54,850 changes: 54,850 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp235dxx_ca35.h

Large diffs are not rendered by default.

56,093 changes: 56,093 additions & 0 deletions stm32cube/stm32mp2xx/soc/stm32mp235fxx_ca35.h

Large diffs are not rendered by default.

Loading