bsp/tms570: Add linkcmds.memory

Remove obsolete tms570ls3137_hdk_with_loader BSP variant.  With the new
memory origin/size build options this variant is no longer required.

Update #4982.
This commit is contained in:
Sebastian Huber
2023-12-21 15:16:48 +01:00
parent 1b7a8af575
commit 437da01f80
19 changed files with 172 additions and 111 deletions

View File

@@ -14,9 +14,6 @@ Drivers:
BSP variants:
tms570ls3137_hdk_intram - place code and data into internal SRAM
tms570ls3137_hdk_sdram - place code into external SDRAM and data to SRAM
tms570ls3137_hdk_with_loader - reserve 256kB at Flash start for loader
and place RTEMS application from address
0x00040000
tms570ls3137_hdk - variant for stand-alone RTEMS application stored
and running directly from flash. This variant
requires initialization of hardware to be integrated

View File

@@ -1,9 +0,0 @@
#
# tms570ls3137_hdk_with_loader RTEMS Test Database.
#
# Format is one line per test that is _NOT_ built.
#
include: testdata/small-memory-testsuite.tcfg
exclude: linpack

View File

@@ -43,11 +43,21 @@
#ifndef LIBBSP_ARM_TMS570_HWINIT_H
#define LIBBSP_ARM_TMS570_HWINIT_H
#define TMS570_TCRAM_START_PTR ( (void *) ( 0x08000000U ) )
#define TMS570_TCRAM_WINDOW_END_PTR ( (void *) ( 0x08080000U ) )
#include <bspopts.h>
#include <stdint.h>
#include <bsp/start.h>
#define TMS570_SDRAM_START_PTR ( (void *) ( 0x80000000U ) )
#define TMS570_SDRAM_WINDOW_END_PTR ( (void *) ( 0xA0000000U ) )
static inline bool tms570_running_from_tcram( void )
{
uintptr_t fncptr = (uintptr_t)bsp_start_hook_0;
return (fncptr - TMS570_MEMORY_SRAM_ORIGIN) < TMS570_MEMORY_SRAM_SIZE;
}
static inline bool tms570_running_from_sdram( void )
{
uintptr_t fncptr = (uintptr_t)bsp_start_hook_0;
return (fncptr - TMS570_MEMORY_SDRAM_ORIGIN) < TMS570_MEMORY_SDRAM_SIZE;
}
/* Ti TMS570 core setup implemented in assembly */
void _esmCcmErrorsClear_( void );

View File

@@ -47,22 +47,6 @@
#include <bsp/tms570_selftest_parity.h>
#include <bsp/tms570_hwinit.h>
static inline
int tms570_running_from_tcram( void )
{
void *fncptr = (void*)bsp_start_hook_0;
return ( fncptr >= (void*)TMS570_TCRAM_START_PTR ) &&
( fncptr < (void*)TMS570_TCRAM_WINDOW_END_PTR );
}
static inline
int tms570_running_from_sdram( void )
{
void *fncptr = (void*)bsp_start_hook_0;
return ( ( (void*)fncptr >= (void*)TMS570_SDRAM_START_PTR ) &&
( (void*)fncptr < (void*)TMS570_SDRAM_WINDOW_END_PTR ) );
}
#define PBIST_March13N_SP 0x00000008U /**< March13 N Algo for 1 Port mem */
BSP_START_TEXT_SECTION void bsp_start_hook_0( void )

View File

@@ -50,8 +50,7 @@ void tms570_emif_sdram_init( void )
uint32_t sdcr = 0;
/* Do not run attempt to initialize SDRAM when code is running from it */
if ( ( (void*)tms570_emif_sdram_init >= (void*)TMS570_SDRAM_START_PTR ) &&
( (void*)tms570_emif_sdram_init <= (void*)TMS570_SDRAM_WINDOW_END_PTR ) )
if ( tms570_running_from_sdram() )
return;
sdtimr = TMS570_EMIF_SDTIMR_T_RFC_SET( sdtimr, 6 - 1 );
@@ -88,7 +87,7 @@ void tms570_emif_sdram_init( void )
TMS570_EMIF.SDCR = sdcr;
dummy = *(volatile uint32_t*)TMS570_SDRAM_START_PTR;
dummy = *(volatile uint32_t*)TMS570_MEMORY_SDRAM_ORIGIN;
(void) dummy;
TMS570_EMIF.SDRCR = 31;

View File

@@ -1,9 +1,4 @@
MEMORY {
ROM_INT (RX) : ORIGIN = 0x00000000, LENGTH = 3M
RAM_INT (AIWX) : ORIGIN = 0x08000000, LENGTH = 256k
RAM_EXT (AIWX) : ORIGIN = 0x80000000, LENGTH = 8M
}
INCLUDE linkcmds.memory
REGION_ALIAS ("REGION_START", ROM_INT);
REGION_ALIAS ("REGION_VECTOR", RAM_INT);

View File

@@ -1,9 +1,4 @@
MEMORY {
ROM_INT (RX) : ORIGIN = 0x00000000, LENGTH = 3M
RAM_INT (AIWX) : ORIGIN = 0x08000100, LENGTH = 256k
RAM_EXT (AIW) : ORIGIN = 0x80000000, LENGTH = 8M
}
INCLUDE linkcmds.memory
REGION_ALIAS ("REGION_START", RAM_INT);
REGION_ALIAS ("REGION_VECTOR", RAM_INT);

View File

@@ -1,9 +1,4 @@
MEMORY {
ROM_INT (RX) : ORIGIN = 0x00000000, LENGTH = 3M
RAM_INT (AIWX) : ORIGIN = 0x08000100, LENGTH = 256k
RAM_EXT (AIWX) : ORIGIN = 0x80000000, LENGTH = 8M
}
INCLUDE linkcmds.memory
REGION_ALIAS ("REGION_START", RAM_EXT);
REGION_ALIAS ("REGION_VECTOR", RAM_EXT);

View File

@@ -1,36 +0,0 @@
MEMORY {
ROM_BOOT(RX) : ORIGIN = 0x00000000, LENGTH = 256k
ROM_INT (RX) : ORIGIN = 0x00040000, LENGTH = 3M-256k
RAM_INT (AIWX) : ORIGIN = 0x08000100, LENGTH = 256k
RAM_EXT (AIWX) : ORIGIN = 0x80000000, LENGTH = 8M
}
REGION_ALIAS ("REGION_START", ROM_INT);
REGION_ALIAS ("REGION_VECTOR", RAM_INT);
REGION_ALIAS ("REGION_TEXT", ROM_INT);
REGION_ALIAS ("REGION_TEXT_LOAD", ROM_INT);
REGION_ALIAS ("REGION_RODATA", ROM_INT);
REGION_ALIAS ("REGION_RODATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_DATA", RAM_INT);
REGION_ALIAS ("REGION_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_FAST_TEXT", RAM_INT);
REGION_ALIAS ("REGION_FAST_TEXT_LOAD", ROM_INT);
REGION_ALIAS ("REGION_FAST_DATA", RAM_INT);
REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_vector_table_in_start_section = 1;
SECTIONS {
.int_vec_overlay : ALIGN_WITH_INPUT {
bsp_int_vec_overlay_start = .;
. += 256;
} > RAM_INT AT > RAM_INT
}
INCLUDE linkcmds.armv4