Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

.intvecs and .resetvecs colliding

$
0
0

Hi TI:

I was redirected to this forum.  I think this will be a pretty easy problem to resolve.

I am getting the following error and I do not know how to fix it.

 

"./configPkg/linker.cmd", line 203: error: placement fails for object

   ".resetVecs", size 0x3c (page 0).  Available ranges:

   FLASH        size: 0x40000      unused: 0x3ff10      max hole: 0x3ff10  

error: errors encountered during linking; "STMain.out" not built

 

Here is what I can shed light on.

Hardware: Stellaris LM3S6965 Eval board. 

Code Composer: Version: 4.2.4.00033

I started a project called STMain. 

I can NOT recall the project Template that I started off with although there are a LOT of

xdc and sysbios entries in the STMain.map file.

 

I “copied” two files from the “Timers” example.  They are:

Timers.c<- Cut and Paste the guts

Startup_ccs.c<- straight copy

 I think the initial Template and the startup_ccs.c file are conflicting with respect to .resetVecs and .intvecs.

 I am going to list out the partial contents of:

         startup_ccs.c,

lms3s6965.cmd,

linker.cmd and the

STMain.map files in order to allow you to provide comment on my analysis.

 I highlighted intvecs and resetvecs in Red.

 

*********************************************************************

startup_ccs.c - I see the lines of code:  (again, this is a cut & paste from the timers example)

 

// The vector table.  Note that the proper constructs must be placed on this

// to ensure that it ends up at physical address 0x0000.0000 or at the start of

// the program if located at a start address other than 0.

#pragma DATA_SECTION(g_pfnVectors, ".intvecs")

 

  

*********************************************************************

lms3s6965.cmd - Within the STMain project yields.

 

MEMORY

{

    FLASH (RX) : origin = 0x00000000, length = 0x00040000

    SRAM (RWX) : origin = 0x20000000, length = 0x00010000

}

 

SECTIONS

{

    .intvecs:   > 0x00000000 

    .text   :   > FLASH

    .const  :   > FLASH

    .cinit  :   > FLASH

    .pinit  :   > FLASH

 

    .vtable :   > 0x20000000

    .data   :   > SRAM

    .bss    :   > SRAM

    .sysmem :   > SRAM

    .stack  :   > SRAM

}

 

*********************************************************************

linker.cmd - Two interesting entries.

 

/* Content from ti.sysbios.family.arm.m3 ti/sysbios/family/arm/m3/linkcmd.xdt): */

--retain "*(.resetVecs)"

 

 SECTIONS

{

    .bootVecs:  type = DSECT

    .vecs:load > 0x20000000

    .resetVecs:load > 0x0

 

    xdc.meta:type = COPY

}

 

*********************************************************************

STMain.map

OUTPUT FILE NAME:   <STMain.out>

ENTRY POINT SYMBOL: "_c_int00"  address: 00004b31

MEMORY CONFIGURATION

 

         name            origin    length      used     unused   attr    fill

----------------------  --------  ---------  --------  --------  ----  --------

  FLASH                 00000000   00040000  00007b9f  00038461  R  X

  SRAM                  20000000   00010000  00004550  0000bab0  RW X

 

SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members

----------  ----------- ---------- ----------- ----- -------

00000000    00000000    0000003c   0000003c    r--

  00000000    00000000    0000003c   0000003c    r-- .resetVecs

00000000    00000000    00007ba8   00007ba8    r-x

  00000000    00000000    000000f0   000000f0    r-- .intvecs

 

output                                  attributes/

section   page    origin      length       input sections

--------  ----  ----------  ----------   ----------------

.resetVecs

*          0    00000000    0000003c     FAILED TO ALLOCATE

xdc.meta   0    00000000    000000e3     COPY SECTION

                  00000000    000000e3     app_pem3.oem3 (xdc.meta)

.intvecs   0    00000000    000000f0    

                  00000000    000000f0     startup_ccs.obj (.intvecs)

 GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

 

address      name

--------        ----

00005779   free

00000000   g_pfnVectors<- global variable referenced in starup_gcc.c

20003f40   g_ulFlags

00000bf9   getenv

000017ad   main

2000454c   main_func_sp

 

 

Questions/Comments

To me, it looks like the environment wants to store data via .resetVecs and .intvecs at the same physical address. 

Question 1: Is this assessment correct?

 This clue to getting around this provided by the comment in startup_gcc.c.

//***************************************************************************

// The vector table.  Note that the proper constructs must be placed on this

// to ensure that it ends up at physical address 0x0000.0000 or at the start of

// the program if located at a start address other than 0.

//***************************************************************************

#pragma DATA_SECTION(g_pfnVectors, ".intvecs")

  

It will let me put the Vector table at another address; but, I simply do NOT know how to do that. 

Question 2: Can you provide some examples/suggestions?   

I’m essentially stuck on three places with this. 

A. How do I know where the program starts?

B. Where do I issue the commands to do this?

C. What commands need to be issued?

Yeah, I am really really stuck on this.

Also, I was expecting to find a declaration for pfnVectors; but, this is this is the only place where I can find it. 

Question 3: Can you shed some light on this?

 

Thank you very much for your help and time.

 

-Rick

 

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>