AnsweredAssumed Answered

Need fix for linking error using TWR-KV58F220M support code?

Question asked by Erskine Barbour on May 23, 2016
Latest reply on Jun 2, 2016 by Erskine Barbour

Hi, I am having a linking error with the SDK_1.3_TWR-KV58F220M.zip software package that supports the TWR-KV58F220M eval board.

I am using IAR Version 7.60 and the latest supporting files.

I have the following part selection in the project options, Freescale MKV58F1M0xxx24. but have tried all the parts listed for the KV5x device with the same results.

My debugger is the IAR I-Jet.

This error is occurring while compiling the example code without any changes to the original code.

The result is the same regardless of which of the example programs are selected.

 

The error is as follows:

 

Linking

Error[Li005]: no definition for "main" [referenced from cmain.o(rt7M_tl.a)]

Error while running Linker

 

Total number of errors: 1

Total number of warnings: 0

 

This same error was listed as a false error in an earlier version of IAR, but was indicated as fixed in the next release, so in short I have some question as to whether this is an actual failure.

 

In Project Options if I change the output from Executable to Library it goes through the compile process with no errors.  But of course this should be the case because the linker is not executed.

My question is does anyone have experience resolving this error?

The following is the lower portion of the map file.

 

Thanks for your help,

Erskine Barbour

 

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

*** MESSAGES

***

 

Error[Li005]: no definition for "main" [referenced from cmain.o(rt7M_tl.a)]

 

 

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

*** RUNTIME MODEL ATTRIBUTES

***

 

CppFlavor       = *

__Heap_Handler  = DLMalloc

__SystemLibrary = DLib

 

 

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

*** PLACEMENT SUMMARY

***

 

"A1":  place at 0x10000000 { ro section .intvec };

"P2":  place in [from 0x10000000 to 0x100003ff] |

                [from 0x10000410 to 0x1007ffff] { ro };

"P6":  place in [from 0x2001fc00 to 0x2001ffff] { block CSTACK };

 

  Section   Kind        Address   Size  Object

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

"A1":                             0x40

  .intvec   ro code  0x10000000   0x40  vector_table_M.o [5]

                   - 0x10000040   0x40

 

"P2":                             0x74

  .text     ro code  0x10000040   0x22  fpinit_M.o [4]

  .text     ro code  0x10000062    0x2  vector_table_M.o [5]

  .text     ro code  0x10000064   0x1a  cmain.o [5]

  .text     ro code  0x1000007e    0x4  low_level_init.o [3]

  .text     ro code  0x10000082    0x4  exit.o [3]

  .text     ro code  0x10000088    0xa  cexit.o [5]

  .text     ro code  0x10000094   0x14  exit.o [6]

  .text     ro code  0x100000a8    0xc  cstartup_M.o [5]

                   - 0x100000b4   0x74

 

"P6":                            0x400

  CSTACK             0x2001fc00  0x400  <Block>

    CSTACK  uninit   0x2001fc00  0x400  <Block tail>

                   - 0x20020000  0x400

 

 

 

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

*** MODULE SUMMARY

***

 

    Module            ro code  rw data

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

C:\Downloads\SDK_For_KV58\lib\ksdk_platform_lib\iar\KV58F24\Debug\Obj: [1]

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

    Total:

 

command line: [2]

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

    Total:

 

dl7M_tln.a: [3]

    exit.o                  4

    low_level_init.o        4

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

    Total:                  8

 

m7M_tls.a: [4]

    fpinit_M.o             34

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

    Total:                 34

 

rt7M_tl.a: [5]

    cexit.o                10

    cmain.o                26

    cstartup_M.o           12

    vector_table_M.o       66

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

    Total:                114

 

shb_l.a: [6]

    exit.o                 20

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

    Total:                 20

 

    Gaps                    4

    Linker created               1 024

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

    Grand Total:          180    1 024

 

 

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

*** ENTRY LIST

***

 

Entry                    Address  Size  Type      Object

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

?main                 0x10000065        Code  Gb  cmain.o [5]

CSTACK$$Base          0x2001fc00         --   Gb  - Linker created -

CSTACK$$Limit         0x20020000         --   Gb  - Linker created -

Region$$Table$$Base   0x00000000         --   Gb  - Linker created -

Region$$Table$$Limit  0x00000000         --   Gb  - Linker created -

__RAM_VECTOR_TABLE_SIZE {Abs}

                      0x00000000         --   Gb  command line/config [2]

__VECTOR_RAM {Abs}    0x10000000         --   Gb  command line/config [2]

__VECTOR_TABLE {Abs}  0x10000000         --   Gb  command line/config [2]

__cmain               0x10000065        Code  Gb  cmain.o [5]

__exit                0x10000095  0x14  Code  Gb  exit.o [6]

__iar_init_vfp        0x10000041        Code  Gb  fpinit_M.o [4]

__iar_program_start   0x100000a9        Code  Gb  cstartup_M.o [5]

__low_level_init      0x1000007f   0x4  Code  Gb  low_level_init.o [3]

__vector_table        0x10000000        Data  Gb  vector_table_M.o [5]

_call_main            0x10000071        Code  Gb  cmain.o [5]

_exit                 0x10000089        Code  Gb  cexit.o [5]

_main                 0x1000007b        Code  Gb  cmain.o [5]

exit                  0x10000083   0x4  Code  Gb  exit.o [3]

 

 

[1] = C:\Downloads\SDK_For_KV58\lib\ksdk_platform_lib\iar\KV58F24\Debug\Obj

[2] = command line

[3] = dl7M_tln.a

[4] = m7M_tls.a

[5] = rt7M_tl.a

[6] = shb_l.a

 

    180 bytes of readonly  code memory

  1 024 bytes of readwrite data memory

 

Errors: 1

Warnings: none

Outcomes