Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
[variant] Update Generic MP1xx
As STM32MP1 is particular, the generic target have to be customized
by end user based on the used device tree.
So, currently, generic menu will not be deployed.

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Apr 12, 2021
commit 34daa0b5d501842f016046b0cf6958cb967df48c
9 changes: 6 additions & 3 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ STM32MP1.build.mcu=cortex-m4
STM32MP1.build.flags.fp=-mfpu=fpv4-sp-d16 -mfloat-abi=hard
STM32MP1.build.series=STM32MP1xx
STM32MP1.build.cmsis_lib_gcc=arm_cortexM4l_math
STM32MP1.build.variant_h=variant_STM32MP157_DK.h
STM32MP1.build.extra_flags=-DCORE_CM4 -D{build.product_line} {build.enable_virtio} {build.xSerial}

# STM32MP157A-DK1 board
Expand All @@ -831,15 +830,19 @@ STM32MP1.menu.pnum.STM32MP157A_DK1.upload.maximum_size=131072
STM32MP1.menu.pnum.STM32MP157A_DK1.upload.maximum_data_size=131072
STM32MP1.menu.pnum.STM32MP157A_DK1.build.board=STM32MP157A_DK1
STM32MP1.menu.pnum.STM32MP157A_DK1.build.product_line=STM32MP157Axx
STM32MP1.menu.pnum.STM32MP157A_DK1.build.variant=STM32MP1xx/STM32MP157_DK
STM32MP1.menu.pnum.STM32MP157A_DK1.build.variant=STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC
STM32MP1.menu.pnum.STM32MP157A_DK1.build.variant_h=variant_STM32MP157_DK.h
STM32MP1.menu.pnum.STM32MP157A_DK1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS

# STM32MP157C-DK2 board
STM32MP1.menu.pnum.STM32MP157C_DK2=STM32MP157C-DK2
STM32MP1.menu.pnum.STM32MP157C_DK2.upload.maximum_size=131072
STM32MP1.menu.pnum.STM32MP157C_DK2.upload.maximum_data_size=131072
STM32MP1.menu.pnum.STM32MP157C_DK2.build.board=STM32MP157C_DK2
STM32MP1.menu.pnum.STM32MP157C_DK2.build.product_line=STM32MP157Cxx
STM32MP1.menu.pnum.STM32MP157C_DK2.build.variant=STM32MP1xx/STM32MP157_DK
STM32MP1.menu.pnum.STM32MP157C_DK2.build.variant=STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC
STM32MP1.menu.pnum.STM32MP157C_DK2.build.variant_h=variant_STM32MP157_DK.h
STM32MP1.menu.pnum.STM32MP157C_DK2.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS

# Upload menu
STM32MP1.menu.upload_method.MassStorage=Generate run_arduino.sh (You need to copy this manually)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,69 +1,64 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Abstract : Linker script for STM32MP1 series
**
** 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.
** 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
**
*****************************************************************************
*/
/**
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
* @brief Linker script for STM32MP157xAC series
* 128Kbytes FLASH
* 128Kbytes RAM1
* 128Kbytes RAM2
*
* 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) 2021 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 = 0x10040000; /* end of RAM */
_estack = ORIGIN(RAM1_data) + LENGTH(RAM1_data); /* end of "RAM1_data" Ram type memory */

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

/* Memories definition */
MEMORY
{
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000298
m_text (RX) : ORIGIN = 0x10000000, LENGTH = 0x00020000
m_data (RW) : ORIGIN = 0x10020000, LENGTH = 0x00020000
m_ipc_shm (RW) : ORIGIN = 0x10040000, LENGTH = 0x00008000
RETRAM_interrupts (xrw) : ORIGIN = 0x00000000, LENGTH = 0x00000298
FLASH_text (rx) : ORIGIN = 0x10000000, LENGTH = 128K
RAM1_data (xrw) : ORIGIN = 0x10020000, LENGTH = 128K
RAM2_ipc_shm (xrw) : ORIGIN = 0x10040000, LENGTH = 0x00008000
}

/* Symbols needed for OpenAMP to enable rpmsg */
__OPENAMP_region_start__ = ORIGIN(m_ipc_shm);
__OPENAMP_region_end__ = ORIGIN(m_ipc_shm)+LENGTH(m_ipc_shm);
__OPENAMP_region_start__ = ORIGIN(RAM2_ipc_shm);
__OPENAMP_region_end__ = ORIGIN(RAM2_ipc_shm)+LENGTH(RAM2_ipc_shm);

/* Sections */
SECTIONS
{
/* The startup code into ROM memory */
/* The startup code into "RETRAM_interrupts" Ram type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} > m_interrupts

} >RETRAM_interrupts

/* The program code and other data into ROM memory */
/* The program code and other data into "FLASH_text" Rom type memory */
.text :
{
. = ALIGN(4);
Expand All @@ -78,30 +73,30 @@ SECTIONS

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

/* Constant data into ROM memory*/
/* Constant data into "FLASH_text" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} > m_text
} >FLASH_text

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

.ARM : {
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} > m_text
} >FLASH_text

.preinit_array :
{
Expand All @@ -110,8 +105,8 @@ SECTIONS
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} > m_text
} >FLASH_text

.init_array :
{
. = ALIGN(4);
Expand All @@ -120,8 +115,8 @@ SECTIONS
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} > m_text
} >FLASH_text

.fini_array :
{
. = ALIGN(4);
Expand All @@ -130,13 +125,13 @@ SECTIONS
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} > m_text
} >FLASH_text

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

/* Initialized data sections */
/* Initialized data sections into "RAM1_data" Ram type memory */
.data : AT(__DATA_ROM)
{
. = ALIGN(4);
Expand All @@ -146,21 +141,21 @@ SECTIONS

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

__DATA_END = __DATA_ROM + (_edata - _sdata);
text_end = ORIGIN(FLASH_text) + LENGTH(FLASH_text);
ASSERT(__DATA_END <= text_end, "region FLASH_text overflowed with text and data")

__DATA_END = __DATA_ROM + (_edata - _sdata);
text_end = ORIGIN(m_text) + LENGTH(m_text);
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")

.resource_table :
{
. = ALIGN(4);
KEEP (*(.resource_table*))
. = ALIGN(4);
} > m_data

} >RAM1_data

/* Uninitialized data section into RAM memory */
/* Uninitialized data section into "RAM1_data" Ram type memory */
. = ALIGN(4);
.bss :
{
Expand All @@ -174,9 +169,9 @@ SECTIONS
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} > m_data
} >RAM1_data

/* User_heap_stack section, used to check that there is enough RAM left */
/* User_heap_stack section, used to check that there is enough "RAM1_data" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
Expand All @@ -185,9 +180,7 @@ SECTIONS
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} > m_data


} >RAM1_data

/* Remove information from the compiler libraries */
/DISCARD/ :
Expand All @@ -198,5 +191,4 @@ SECTIONS
}

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

}
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
/*
*******************************************************************************
* Copyright (c) 2017, STMicroelectronics
* Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 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
*
* 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.
*******************************************************************************
*/

#if defined(ARDUINO_STM32MP157A_DK1) || defined(ARDUINO_STM32MP157C_DK2)
#include "pins_arduino.h"

#ifdef __cplusplus
extern "C" {
#endif

// Pin number
// This array allows to wrap Arduino pin number(Dx or x)
// to STM32 PinName (PX_n)
Expand Down Expand Up @@ -122,10 +101,6 @@ const uint32_t analogInputPin[] = {
24 // A5
};

#ifdef __cplusplus
}
#endif

// ----------------------------------------------------------------------------

#ifdef __cplusplus
Expand Down Expand Up @@ -282,3 +257,4 @@ void SystemClock_Config(void)
#ifdef __cplusplus
}
#endif
#endif /* ARDUINO_STM32MP157* */
Loading