Skip to content

Commit

Permalink
Added Generic H743Vx
Browse files Browse the repository at this point in the history
Supersede stm32duino#1192

Signed-off-by: Vladimir Kozlov <vkozloff@gmail.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
vladkozlov69 and fpistm committed Apr 15, 2021
1 parent bf60740 commit 0c31a7d
Show file tree
Hide file tree
Showing 4 changed files with 329 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,18 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d

| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
| :yellow_heart: | STM32H742VG<br>STM32H742VI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H742ZG<br>STM32H742ZI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H743IG<br>STM32H743II | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H743VG<br>STM32H743VI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H743ZG<br>STM32H743ZI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H747AG<br>STM32H747AI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H747IG<br>STM32H747II | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H750ZB | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H750IB<br>STM32H750II | Generic Board | **2.0.0** | |
| :green_heart: | STM32H750IB | [Daisy ](https://www.electro-smith.com/daisy/daisy) | *1.9.0* | |
| :yellow_heart: | STM32H750VB | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H753VI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H753ZI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H757AI | Generic Board | **2.0.0** | |
| :yellow_heart: | STM32H757II | Generic Board | **2.0.0** | |
Expand Down
88 changes: 88 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2473,6 +2473,38 @@ GenH7.menu.pnum.DAISY_SEED.build.variant=STM32H7xx/H743I(G-I)(K-T)_H750IBK_H753I
GenH7.menu.pnum.DAISY_SEED.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
GenH7.menu.pnum.DAISY_SEED.build.ldscript=DAISY_SEED.ld

# Generic H742VGHx
GenH7.menu.pnum.GENERIC_H742VGHX=Generic H742VGHx
GenH7.menu.pnum.GENERIC_H742VGHX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H742VGHX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H742VGHX.build.board=GENERIC_H742VGHX
GenH7.menu.pnum.GENERIC_H742VGHX.build.product_line=STM32H742xx
GenH7.menu.pnum.GENERIC_H742VGHX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H742VIHx
GenH7.menu.pnum.GENERIC_H742VIHX=Generic H742VIHx
GenH7.menu.pnum.GENERIC_H742VIHX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H742VIHX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H742VIHX.build.board=GENERIC_H742VIHX
GenH7.menu.pnum.GENERIC_H742VIHX.build.product_line=STM32H742xx
GenH7.menu.pnum.GENERIC_H742VIHX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H742VGTx
GenH7.menu.pnum.GENERIC_H742VGTX=Generic H742VGTx
GenH7.menu.pnum.GENERIC_H742VGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H742VGTX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H742VGTX.build.board=GENERIC_H742VGTX
GenH7.menu.pnum.GENERIC_H742VGTX.build.product_line=STM32H742xx
GenH7.menu.pnum.GENERIC_H742VGTX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H742VITx
GenH7.menu.pnum.GENERIC_H742VITX=Generic H742VITx
GenH7.menu.pnum.GENERIC_H742VITX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H742VITX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H742VITX.build.board=GENERIC_H742VITX
GenH7.menu.pnum.GENERIC_H742VITX.build.product_line=STM32H742xx
GenH7.menu.pnum.GENERIC_H742VITX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H742ZGTx
GenH7.menu.pnum.GENERIC_H742ZGTX=Generic H742ZGTx
GenH7.menu.pnum.GENERIC_H742ZGTX.upload.maximum_size=1048576
Expand Down Expand Up @@ -2521,6 +2553,38 @@ GenH7.menu.pnum.GENERIC_H743IITX.build.board=GENERIC_H743IITX
GenH7.menu.pnum.GENERIC_H743IITX.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743IITX.build.variant=STM32H7xx/H743I(G-I)(K-T)_H750IBK_H753II(K-T)

# Generic H743VGHx
GenH7.menu.pnum.GENERIC_H743VGHX=Generic H743VGHx
GenH7.menu.pnum.GENERIC_H743VGHX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H743VGHX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743VGHX.build.board=GENERIC_H743VGHX
GenH7.menu.pnum.GENERIC_H743VGHX.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743VGHX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H743VIHx
GenH7.menu.pnum.GENERIC_H743VIHX=Generic H743VIHx
GenH7.menu.pnum.GENERIC_H743VIHX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H743VIHX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743VIHX.build.board=GENERIC_H743VIHX
GenH7.menu.pnum.GENERIC_H743VIHX.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743VIHX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H743VGTx
GenH7.menu.pnum.GENERIC_H743VGTX=Generic H743VGTx
GenH7.menu.pnum.GENERIC_H743VGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H743VGTX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743VGTX.build.board=GENERIC_H743VGTX
GenH7.menu.pnum.GENERIC_H743VGTX.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743VGTX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H743VITx
GenH7.menu.pnum.GENERIC_H743VITX=Generic H743VITx
GenH7.menu.pnum.GENERIC_H743VITX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H743VITX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H743VITX.build.board=GENERIC_H743VITX
GenH7.menu.pnum.GENERIC_H743VITX.build.product_line=STM32H743xx
GenH7.menu.pnum.GENERIC_H743VITX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H743ZGTx
GenH7.menu.pnum.GENERIC_H743ZGTX=Generic H743ZGTx
GenH7.menu.pnum.GENERIC_H743ZGTX.upload.maximum_size=1048576
Expand Down Expand Up @@ -2577,6 +2641,14 @@ GenH7.menu.pnum.GENERIC_H750IBKX.build.board=GENERIC_H750IBKX
GenH7.menu.pnum.GENERIC_H750IBKX.build.product_line=STM32H750xx
GenH7.menu.pnum.GENERIC_H750IBKX.build.variant=STM32H7xx/H743I(G-I)(K-T)_H750IBK_H753II(K-T)

# Generic H750VBTx
GenH7.menu.pnum.GENERIC_H750VBTX=Generic H750VBTx
GenH7.menu.pnum.GENERIC_H750VBTX.upload.maximum_size=131072
GenH7.menu.pnum.GENERIC_H750VBTX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H750VBTX.build.board=GENERIC_H750VBTX
GenH7.menu.pnum.GENERIC_H750VBTX.build.product_line=STM32H750xx
GenH7.menu.pnum.GENERIC_H750VBTX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H750ZBTx
GenH7.menu.pnum.GENERIC_H750ZBTX=Generic H750ZBTx
GenH7.menu.pnum.GENERIC_H750ZBTX.upload.maximum_size=131072
Expand All @@ -2601,6 +2673,22 @@ GenH7.menu.pnum.GENERIC_H753IITX.build.board=GENERIC_H753IITX
GenH7.menu.pnum.GENERIC_H753IITX.build.product_line=STM32H753xx
GenH7.menu.pnum.GENERIC_H753IITX.build.variant=STM32H7xx/H743I(G-I)(K-T)_H750IBK_H753II(K-T)

# Generic H753VIHx
GenH7.menu.pnum.GENERIC_H753VIHX=Generic H753VIHx
GenH7.menu.pnum.GENERIC_H753VIHX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H753VIHX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H753VIHX.build.board=GENERIC_H753VIHX
GenH7.menu.pnum.GENERIC_H753VIHX.build.product_line=STM32H753xx
GenH7.menu.pnum.GENERIC_H753VIHX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H753VITx
GenH7.menu.pnum.GENERIC_H753VITX=Generic H753VITx
GenH7.menu.pnum.GENERIC_H753VITX.upload.maximum_size=2097152
GenH7.menu.pnum.GENERIC_H753VITX.upload.maximum_data_size=524288
GenH7.menu.pnum.GENERIC_H753VITX.build.board=GENERIC_H753VITX
GenH7.menu.pnum.GENERIC_H753VITX.build.product_line=STM32H753xx
GenH7.menu.pnum.GENERIC_H753VITX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)

# Generic H753ZITx
GenH7.menu.pnum.GENERIC_H753ZITX=Generic H753ZITx
GenH7.menu.pnum.GENERIC_H753ZITX.upload.maximum_size=2097152
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,68 @@
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
RCC_OscInitTypeDef RCC_OscInitStruct = {};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};

/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);

while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 4;
RCC_OscInitStruct.PLL.PLLN = 60;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 4;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2
| RCC_CLOCKTYPE_D3PCLK1 | RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) {
Error_Handler();
}

PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_QSPI | RCC_PERIPHCLK_SDMMC | RCC_PERIPHCLK_USB;
PeriphClkInitStruct.QspiClockSelection = RCC_QSPICLKSOURCE_D1HCLK;
PeriphClkInitStruct.SdmmcClockSelection = RCC_SDMMCCLKSOURCE_PLL;
PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
Error_Handler();
}



/** Enable USB Voltage detector
*/
HAL_PWREx_EnableUSBVoltageDetector();

}

#endif /* ARDUINO_GENERIC_* */
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 2048Kbytes FLASH and 192Kbytes RAM
**
** 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
**
** Copyright (c) 2019 STMicroelectronics.
** All rights reserved.
**
** 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 = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM_D1 */
/* Generate a link error if heap and stack don't fit into RAM_D1 */
_Min_Heap_Size = 0x200 ; /* required amount of heap */
_Min_Stack_Size = 0x400 ; /* required amount of stack */

/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}

/* Define output sections */
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH

/* The program code and other data goes into FLASH */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH

/* Constant data goes into FLASH */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH

.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
.ARM : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >FLASH

.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >FLASH
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} >FLASH
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} >FLASH

/* used by the startup to initialize data */
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM_D1, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM_D1 AT> FLASH

/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)

. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM_D1

/* User_heap_stack section, used to check that there is enough RAM_D1 left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM_D1

/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}

.ARM.attributes 0 : { *(.ARM.attributes) }
}


0 comments on commit 0c31a7d

Please sign in to comment.