Tool/software: TI-RTOS
Hello Gurus,
I am migrating an application that runs on a Tiva C series TM4C129ENCPDT
Existing Tools:
- CCS 5.5.0.00077 compiler 6.2.11
- SYS/BIOS 6.37.5.35
- XDCTools 3.25.6.96
Migrating to:
- CCS 6.2.0.00050 compiler 15.12.4.LTS
- TI RTOS 2.16.1.14
- XDCTools 3.32.01.22_core
Migration issue:
- Upgrading to CCS 6.2 with compiler 15.12.4.LTS compiles and runs fine.
- Upgrading to XDCTools 3.32.01.22_core the application compiles but it does not link (See link errors below)
- The compile process creates this file Debug/configPkg/linker.cmd
- The SECTIONS definition in this file is different than what they used to be when using the previous tool chain
- If I cut and paste the SECTIONS definition generated with the previous tool chain the application links and runs fine, but this file is re-generated on each clean and compile
Linker Errors:
<Linking> "configPkg/linker.cmd", line 131: warning #10096-D: specified address lies outside memory map error #10264: DEFAULT memory range overlaps existing memory range INTVECS error #10264: DEFAULT memory range overlaps existing memory range APPHDR error #10264: DEFAULT memory range overlaps existing memory range FLASH error #10264: DEFAULT memory range overlaps existing memory range VTABLE error #10264: DEFAULT memory range overlaps existing memory range LOAD_TAG error #10264: DEFAULT memory range overlaps existing memory range SRAM error #10010: errors encountered during linking; "OurAppplication.out" not built
In our system we use the first sector of flash for a custom boot loader that allows us to do field firmware upgrades and application integrity check. Therefore we use a custom CMD file. If we use the original version of this file then the link works, but our application does not work as the custom boot loader expects the code to be located on the second sector of flash.
Our Custom CMD File:
/******************************************************************************
*
* Copyright (c) 2013-2014 Texas Instruments Incorporated. All rights reserved.
* Software License Agreement
*
* Texas Instruments (TI) is supplying this software for use solely and
* exclusively on TI's microcontroller products. The software is owned by
* TI and/or its suppliers, and is protected under applicable copyright
* laws. You may not combine this software with "viral" open-source
* software in order to form a larger program.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
* NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
* NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
* CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
* DAMAGES, FOR ANY REASON WHATSOEVER.
*
* This is part of revision 2.1.0.12573 of the DK-TM4C129X Firmware Package.
*
*****************************************************************************/
--retain=g_pfnVectors
--retain=g_appHeader
/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M4_T_le_eabi.lib */
/* The starting address of the application. Normally the interrupt vectors */
/* must be located at the beginning of the application. */
#define APP_BASE 0x00010000
#define RAM_BASE 0x20000000
#define INTVECS_LENGTH 0x00000400
#define APPHDR_LENGTH 0x0000001A
#define FLASH_LENGTH 0x00100000 - (INTVECS_LENGTH + APPHDR_LENGTH)
#define VTABLE_LENGTH 0x00000400
#define LOAD_TAG_LENGTH 0x00000040
#define SRAM_LENGTH 0x00040000 - (VTABLE_LENGTH + LOAD_TAG_LENGTH)
/* System memory map */
MEMORY
{
/* Application stored in and executes from internal flash */
INTVECS (RX) : origin = APP_BASE, length = INTVECS_LENGTH
APPHDR (RX) : origin = APP_BASE + INTVECS_LENGTH, length = APPHDR_LENGTH
FLASH (RX) : origin = APP_BASE + INTVECS_LENGTH + APPHDR_LENGTH, length = FLASH_LENGTH
/* Application uses internal RAM for data */
VTABLE (RWX) : origin = RAM_BASE, length = VTABLE_LENGTH
LOAD_TAG (RWX) : origin = RAM_BASE + VTABLE_LENGTH, length = LOAD_TAG_LENGTH
SRAM (RWX) : origin = RAM_BASE + VTABLE_LENGTH + LOAD_TAG_LENGTH, length = SRAM_LENGTH
}
/* Section allocation in memory */
SECTIONS
{
codestart: > INTVECS
.intvecs: > INTVECS { __INTVECS_START = .;}
.appheader: > APPHDR
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > VTABLE
.load_tag_section: > LOAD_TAG
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
.taskStack: > SRAM
}
__STACK_TOP = __stack + 1536;
The Original CMD File:
/******************************************************************************
*
* Default Linker Command file for the Texas Instruments TM4C129ENCPDT
*
* This is derived from revision 12770 of the TivaWare Library.
*
*****************************************************************************/
--retain=g_pfnVectors
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x00100000
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}
/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M4_T_le_eabi.lib */
/* Section allocation in memory */
SECTIONS
{
.intvecs: > 0x00000000
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > 0x20000000
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
}
__STACK_TOP = __stack + 512;