Skip to content

Commit

Permalink
[variant] Update Generic H7xx
Browse files Browse the repository at this point in the history
Fixes stm32duino#1276 and stm32duino#1277

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Feb 12, 2021
1 parent 008d077 commit c225c81
Show file tree
Hide file tree
Showing 13 changed files with 2,225 additions and 1,235 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32H750IB | [Daisy ](https://www.electro-smith.com/daisy/daisy) | *1.9.0* | |
| :yellow_heart: | STM32H743ZG<br>STM32H743ZI | Generic Board | **2.0.0** | |

### Generic STM32L0 boards

Expand Down
20 changes: 18 additions & 2 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.flags.fp=-mfpu=fpv4-sp-d16 -mfloat-abi=
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.board=NUCLEO_H743ZI
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.series=STM32H7xx
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.product_line=STM32H743xx
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.variant=STM32H7xx/NUCLEO_H743ZI
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.variant=STM32H7xx/Generic_H743Zx
Nucleo_144.menu.pnum.NUCLEO_H743ZI.build.cmsis_lib_gcc=arm_cortexM7lfsp_math

Nucleo_144.menu.pnum.NUCLEO_H743ZI2=Nucleo H743ZI2
Expand All @@ -106,7 +106,7 @@ Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.flags.fp=-mfpu=fpv4-sp-d16 -mfloat-abi
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.board=NUCLEO_H743ZI2
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.series=STM32H7xx
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.product_line=STM32H743xx
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.variant=STM32H7xx/NUCLEO_H743ZI
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.variant=STM32H7xx/Generic_H743Zx
Nucleo_144.menu.pnum.NUCLEO_H743ZI2.build.cmsis_lib_gcc=arm_cortexM7lfsp_math

# NUCLEO_L496ZG board
Expand Down Expand Up @@ -1996,6 +1996,22 @@ GenH7.menu.pnum.DAISY_SEED.build.board=DAISY_SEED
GenH7.menu.pnum.DAISY_SEED.build.product_line=STM32H750xx
GenH7.menu.pnum.DAISY_SEED.build.variant=STM32H7xx/DAISY_SEED

# Generic H743ZG board
GenH7.menu.pnum.GENERIC_H743ZG=Generic H743ZG
GenH7.menu.pnum.GENERIC_H743ZG.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H743ZG.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743ZG.build.board=GENERIC_H743ZG
GenH7.menu.pnum.GENERIC_H743ZG.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743ZG.build.variant=STM32H7xx/Generic_H743Zx

# Generic H743ZI board
GenH7.menu.pnum.GENERIC_H743ZI=Generic H743ZI
GenH7.menu.pnum.GENERIC_H743ZI.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H743ZI.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743ZI.build.board=GENERIC_H743ZI
GenH7.menu.pnum.GENERIC_H743ZI.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743ZI.build.variant=STM32H7xx/Generic_H743Zx

# Upload menu
GenH7.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
GenH7.menu.upload_method.swdMethod.upload.protocol=0
Expand Down
591 changes: 591 additions & 0 deletions variants/STM32H7xx/Generic_H743Zx/PeripheralPins.c

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions variants/STM32H7xx/Generic_H743Zx/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/* Dual pad pin name */
PC_2_C = PC_2 | PDUAL,
PC_3_C = PC_3 | PDUAL,

/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,
PF_8_ALT1 = PF_8 | ALT1,
PF_9_ALT1 = PF_9 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0, /* SYS_WKUP0 */
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = PA_2, /* SYS_WKUP1 */
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = PC_13, /* SYS_WKUP2 */
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = PI_8, /* SYS_WKUP3 - Manually added */
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = PI_11, /* SYS_WKUP4 - Manually added */
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = PC_1, /* SYS_WKUP5 */
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif

/* USB */
#ifdef USBCON
USB_OTG_FS_DM = PA_11,
USB_OTG_FS_DP = PA_12,
USB_OTG_FS_ID = PA_10,
USB_OTG_FS_SOF = PA_8,
USB_OTG_FS_VBUS = PA_9,
USB_OTG_HS_DM = PB_14,
USB_OTG_HS_DP = PB_15,
USB_OTG_HS_ID = PB_12,
USB_OTG_HS_SOF = PA_4,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
USB_OTG_HS_ULPI_DIR = PC_2_C,
USB_OTG_HS_ULPI_NXT = PC_3_C,
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PB_13,
#endif
Original file line number Diff line number Diff line change
@@ -1,76 +1,51 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : Auto-generated by STM32CubeIDE
**
** Abstract : Linker script for NUCLEO-H743ZI(2) Board embedding STM32H743ZITx Device from STM32H7 series
** 2048Kbytes FLASH
** 128Kbytes DTCMRAM
** 64Kbytes ITCMRAM
** 512Kbytes RAM_D1
** 288Kbytes RAM_D2
** 64Kbytes RAM_D3
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** 3. Neither the name of STMicroelectronics nor the names of its contributors
** may be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************************
*/
/**
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
* @brief Linker script for STM32H743ZITx Device from STM32H7 series
* 2048Kbytes FLASH
* 128Kbytes DTCMRAM
* 64Kbytes ITCMRAM
* 512Kbytes RAM_D1
* 288Kbytes RAM_D2
* 64Kbytes RAM_D3
*
* Set heap size, stack size and stack location according
* to application requirements.
*
* Set memory bank area and size if external memory is used
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/

/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = 0x24080000; /* end of "RAM_D1" Ram type memory */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */

_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */

/* Memories definition */
MEMORY
{
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = LD_MAX_DATA_SIZE
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}

/* Sections */
Expand Down Expand Up @@ -110,12 +85,12 @@ SECTIONS
. = ALIGN(4);
} >FLASH

.ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
.ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH

.ARM : {
. = ALIGN(4);
__exidx_start = .;
Expand All @@ -132,7 +107,7 @@ SECTIONS
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH

.init_array :
{
. = ALIGN(4);
Expand All @@ -142,7 +117,7 @@ SECTIONS
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH

.fini_array :
{
. = ALIGN(4);
Expand All @@ -157,7 +132,7 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections into "RAM_D1" Ram type memory */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
Expand All @@ -166,14 +141,14 @@ SECTIONS

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

} >RAM_D1 AT> FLASH

/* Uninitialized data section into "RAM_D1" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
Expand Down
Loading

0 comments on commit c225c81

Please sign in to comment.