Linker external vector table not found

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linker external vector table not found

707 Views
dominikbenz
Contributor I

Hi everybody

 

We are trying to convert our CodeWarrior 5.7 project to CodeWarrior 10.6 for our V2 coldfire software platform. In our Link command file (.lcf) we defined an external vector table with the following syntax:

 

.sec_vectors : {  HD_vectors.s (.text)  . = ALIGN (0x4); } > seg_vectortable

 

The Linker generates the following warning:

>File "HD_vectors.s" not found; assuming that "HD_vectors_s.obj" file was

 

How can we import the vector table from an external file?

thanks for your help!

Labels (1)
Tags (4)
0 Kudos
3 Replies

462 Views
trytohelp
NXP Employee
NXP Employee

Hi Dominik,

There are 2 questions here.

1- How to convert a classic project to Eclipse ?

CodeWarrior 5.7 is not the tool version but the version of the IDE which is a feature as the compiler or assembler.

CW for MCF v7.2 which is the last classic version included the IDE V5.9.

IDE V5.7 was included in CW for Coldfire V6.x version - on V6.3 and V6.4 for sure.

There are some documents you can refer to move your classic project to Eclipse.

      - AN4104, Converting ColdFire Projects to CodeWarrior Development Studio for Microcontrollers V10.0

            http://cache.freescale.com/files/soft_dev_tools/doc/app_note/AN4104.pd

    - 2 Technical Notes providing more information: TN256.pdf and TN268.pdf

There are 2 ways to convert a classic project to Eclipse:

    - manually using the documentation above,

    - imported system.

The importer is not working for complex project and has been removed after MCU V10.2.

From my experience to avoid problem I recommend to convert the project in different steps:

      - Step 1: convert project on last classic version: CW for MCF V7.2

          To be done depending of the version used you must refer to the TN256 and TN268.

          It's very important that the project is running under V7.2 before to move on Eclipse.

    - Step 2: convert on MCU V10.2 using the importer

          The MCU V10.2 can be downloaded on web site.

          This version includes a imported which convert the Classic project to Eclipse one - backup your project before ...

          Again we recommend you to check if the project is running.

    - Step 3: Move to MCU V10.6

          As your project is running on MCU V10.2 and can import it on MCU V10.6.

          This project should be running without problem.

In all case to avoid problem, for the manual solution too, I recommend to convert the project to the last classic version

CW for MCF V7.2 before to move on Eclipse.

The important conversions are done on V7.2 which are used on Eclipse too.

Having a running project on V7.2 it's a good step before to convert on Eclipse.

2- Regarding Vector table.

The project architecture used for Classic and Eclipse project is very similar.

In fact the same tools are used for both version.

The key difference is the IDE and the new features included under Eclipse.

But the compiler, assembler, linker are very similar to the classic version excepted newer versions.

The vector table is defined in a .c file included in the project (exceptions.c or Vectors.c for Processor Expert)

In the LCF file, the vector table is allocated in memory for instance:

.vectors :

    {

exceptions_c.obj(.vectortable)
. = ALIGN (0x4);

    } >> code

or

  .interrupts :

  {

    ___VECTOR_RAM = .;

    * (.vectortable)

    . = ALIGN (0x4);

  } > interrupts

What is the type of HD_vectors.s file ?

This is may be the problem.

I recommend you to refer to the MCU_ColdFire_Compiler.pdf manual for details.

There is a chapter named:

      Chapter 14 ELF Linker and Command Language


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

462 Views
dominikbenz
Contributor I

Thanks Pascal for your answer...

The project conversion is not the main problem. I created a new CW10.6 project with the existing sources. The programm is compilable and runnable, without problems.

I just get the described linker warning.

The HD_vectors.s file is a assembler file which contains the vector table in the following format:


.text


VECTOR_TABLE:
_VECTOR_TABLE:
INITSP:  .long ___SP_INIT          /* Initial SP   */
INITPC:  .long _asm_start          /* Initial PC   */
vector02: .long _asm_exception_handler /* Access Error   */
vector03: .long _asm_exception_handler /* Address Error  */
vector04: .long _asm_exception_handler /* Illegal Instruction */
vector05: .long _asm_exception_handler /* Reserved    */
vector06: .long _asm_exception_handler /* Reserved    */
vector07: .long _asm_exception_handler /* Reserved    */
vector08: .long _asm_exception_handler /* Privilege Violation */
vector09: .long _asm_exception_handler /* Trace    */

..

vectorFD: .long _irq_handler
vectorFE: .long _irq_handler
vectorFF: .long _irq_handler

.end

If I rename the importing file to

HD_vectors_s.obj (.text)

it runs without warning. Programm is executable...

Problem seems to be solved...

0 Kudos

462 Views
trytohelp
NXP Employee
NXP Employee

Hi Dominik,

It seems the linker is checking for .obj file by default.

Else a warning message is generated to inform user a possible wrong file name was detected.

I've never really played with the lcf file to check this behavior.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos