Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,8 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
}
}

// Blank, non-weak-override function to make sure the linker pulls in this file
void stm32_eth_init_weak_symbol_helper()
{}

#endif /* USE_USER_DEFINED_HAL_ETH_MSPINIT */
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#error [NOT_SUPPORTED] No network configuration found for this target.
#endif

#if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI
/*
* Read the MBED_GREENTEA_WIFI_SECURE_PROTOCOL define from CMake and get the type of wifi
* security in use
Expand Down Expand Up @@ -58,6 +59,7 @@ inline WiFiInterface *get_wifi_interface()

return wifi_interface;
}
#endif

/*
* Get the default network interface for this board.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
******************************************************************************
* @file partition_stm32h5xx.h
* @author MCD Application Team
* @brief CMSIS STM32H5xx Device Header File for Initial Setup for Secure /
* Non-Secure Zones for ARMCM33 based on CMSIS CORE partition_ARMCM33.h
* Template.
*
* The file is included in system_stm32h5xx_s.c in secure application.
* It includes the configuration section that allows to select the
* STM32H5xx device partitioning file for system core secure attributes
* and interrupt secure and non-secure assignment.
*
******************************************************************************
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
* Copyright (c) 2023 STMicroelectronics. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
*/

/** @addtogroup CMSIS
* @{
*/

/** @addtogroup stm32h5xx
* @{
*/

#ifndef PARTITION_STM32H5XX_H
#define PARTITION_STM32H5XX_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/** @addtogroup Secure_configuration_section
* @{
*/

#if defined(STM32H573xx)
#include "partition_stm32h573xx.h"
#elif defined(STM32H563xx)
#include "partition_stm32h563xx.h"
#elif defined(STM32H562xx)
#include "partition_stm32h562xx.h"
#elif defined(STM32H533xx)
#include "partition_stm32h533xx.h"
#elif defined(STM32H523xx)
#include "partition_stm32h523xx.h"
#else
#error "Please select first the target STM32H5xx device used in your application (in stm32h5xx.h file)"
#endif


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* PARTITION_STM32H5XX_H */
/**
* @}
*/

/**
* @}
*/
608 changes: 95 additions & 513 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h503xx.h

Large diffs are not rendered by default.

20,175 changes: 20,175 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h523xx.h

Large diffs are not rendered by default.

20,774 changes: 20,774 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h533xx.h

Large diffs are not rendered by default.

567 changes: 482 additions & 85 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h562xx.h

Large diffs are not rendered by default.

567 changes: 482 additions & 85 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h563xx.h

Large diffs are not rendered by default.

219 changes: 133 additions & 86 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h573xx.h

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h5xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select:
* - The STM32H5xx device used in the target application
* - To use or not the peripheral's drivers in application code(i.e.
* code will be based on direct access to peripheral's registers
* - To use or not the peripheral drivers in application code(i.e.
* code will be based on direct access to peripherals' registers
* rather than drivers API), this option is controlled by
* "#define USE_HAL_DRIVER"
*
Expand Down Expand Up @@ -57,12 +57,15 @@
application
*/

#if !defined (STM32H573xx) && !defined (STM32H563xx) \
&& !defined (STM32H562xx) && !defined (STM32H503xx)
/* #define STM32H573xx */ /*!< STM32H5753xx Devices */
#if !defined (STM32H573xx) && !defined (STM32H563xx) \
&& !defined (STM32H562xx) && !defined (STM32H503xx) \
&& !defined (STM32H533xx) && !defined (STM32H523xx)
/* #define STM32H573xx */ /*!< STM32H573xx Devices */
/* #define STM32H563xx */ /*!< STM32H563xx Devices */
/* #define STM32H562xx */ /*!< STM32H562xx Devices */
/* #define STM32H503xx */ /*!< STM32H503xx Devices */
/* #define STM32H503xx */ /*!< STM32H503xx Devices */
/* #define STM32H533xx */ /*!< STM32H533xx Devices */
/* #define STM32H523xx */ /*!< STM32H523xx Devices */
#endif

/* Tip: To avoid modifying this file each time you need to switch between these
Expand All @@ -78,12 +81,12 @@
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number 1.1.0
* @brief CMSIS Device version number 1.3.0
*/
#define __STM32H5_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
#define __STM32H5_CMSIS_VERSION_SUB1 (0x01) /*!< [23:16] sub1 version */
#define __STM32H5_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
#define __STM32H5_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32H5_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32H5_CMSIS_VERSION_SUB1 (0x03U) /*!< [23:16] sub1 version */
#define __STM32H5_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32H5_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32H5_CMSIS_VERSION ((__STM32H5_CMSIS_VERSION_MAIN << 24U)\
|(__STM32H5_CMSIS_VERSION_SUB1 << 16U)\
|(__STM32H5_CMSIS_VERSION_SUB2 << 8U )\
Expand All @@ -96,7 +99,6 @@
/** @addtogroup Device_Included
* @{
*/

#if defined(STM32H573xx)
#include "stm32h573xx.h"
#elif defined(STM32H563xx)
Expand All @@ -105,6 +107,10 @@
#include "stm32h562xx.h"
#elif defined(STM32H503xx)
#include "stm32h503xx.h"
#elif defined(STM32H523xx)
#include "stm32h523xx.h"
#elif defined(STM32H533xx)
#include "stm32h533xx.h"
#else
#error "Please select first the target STM32H5xx device used in your application (in stm32h5xx.h file)"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ target_sources(mbed-stm32h5cube-fw
STM32H5xx_HAL_Driver/stm32h5xx_ll_fmc.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_gpio.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_i2c.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_i3c.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_icache.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_lptim.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_lpuart.c
Expand All @@ -114,6 +113,9 @@ target_sources(mbed-stm32h5cube-fw
STM32H5xx_HAL_Driver/stm32h5xx_ll_usb.c
STM32H5xx_HAL_Driver/stm32h5xx_ll_utils.c
STM32H5xx_HAL_Driver/stm32h5xx_util_i3c.c

# NOTE: Don't compile stm32h5xx_ll_i3c.c, it does not build if the
# HAL driver for i3c is enabled due to a circular include issue.
)

target_include_directories(mbed-stm32h5cube-fw
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# How to add new STM32 family
1. In path mbed-os\targets\TARGET_STM\ add new family folder, in our my case TARGET_STM32H5, and also do not forget add same name into CmakeLists.txt in same folder level.
2. In path mbed-os\targets\TARGET_STM\TARGET_STM32H5\ prepare another folders. First is STM32Cube_FW and second CMSIS
3. Visit https://github.com/STMicroelectronics. Select package for your family and chose latest tag. Then download it as a zip.
For example https://github.com/STMicroelectronics/STM32CubeH5/tree/v1.1.0
4. Exctract the STM32CubeH5-1.1.0.zip
6. From STM32CubeH5-1.1.0\STM32CubeH5-1.1.0\Drivers\CMSIS\Device\ST\STM32H5xx\Source\Templates copy system_stm32h5xx.c into mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\
5. From STM32CubeH5-1.1.0\Drivers\CMSIS\Device\ST\STM32H5xx\Include\ copy all .h files into mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\CMSIS\
6. From STM32CubeH5-1.1.0\Drivers copy dolder STM32H5xx_HAL_Driver folder into mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\
8. In mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\STM32H5xx_HAL_Driver could be deleted everyting exclude folders Include and Source.
9. Whole content of folders Include and Source (from previous point) move to from their folder to one level up. Then delete both folders.
10. From folder STM32Cube_FW\STM32H5xx_HAL_Driver move file stm32h5xx_hal_conf_template.h to one folder level up.
3. Clone or download the [stm32h5xx_hal_driver](https://github.com/STMicroelectronics/stm32h5xx_hal_driver) repository
4. Copy `stm32h5xx_hal_driver/*.h` and `stm32h5xx_hal_driver/*.c` (but not the _template files) into `mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\STM32H5xx_HAL_Driver`
5. Clone or download [cmsis_device_h5](https://github.com/STMicroelectronics/cmsis_device_h5/tree/main)
6. Copy `cmsis_device_h5\Include\*.h` to mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\CMSIS\
6. From `cmsis_device_h5\Source\Templates` copy system_stm32h5xx.c into mbed-os\targets\TARGET_STM\TARGET_STM32H5\STM32Cube_FW\
10. From `stm32h5xx_hal_driver\Inc` move file stm32h5xx_hal_conf_template.h to one folder level up.
- Rest of templates could be deleted.
- The moved file stm32h5xx_hal_conf_template.h should be renamed to stm32h5xx_hal_conf.h
- inside of stm32h5xx_hal_conf_template.h file should be all macros #define USE_HAL_XXXXXXXXX covered by macro #if !defined(USE_HAL_XXXXXXXXX) statement
Expand Down
Loading
Loading