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

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

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

2,006 Views
erskineb
Contributor I

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

Labels (1)
Tags (2)
0 Kudos
2 Replies

1,121 Views
ivadorazinova
NXP Employee
NXP Employee

Hello Erskine.

I tested on my side and it works without any issue.

Ok. I need to get closer to your issue and need some additional information from you.

Please, I need to know:

  • what example did you compile?
  • did you try the example also in KDS? do you have the error also in KDS?
  • did you correctly set linker?

linker.png

linker2.png

linker3.png

linker4.png

  • did you try clean project and built again?

Please let me know.

Best Regards,

Iva

0 Kudos

1,121 Views
erskineb
Contributor I

Hi, Thanks for your response. I apologize for my reply beingslow.  Your response indicated to me that all worked for you, so theproblem had to be on my end.    First, I deleted all SDK_1.3_TWR-KV58F220M and reinstalledit. Second, I started over with the factory settings in IAR.  Next added in the correct KV58x CPU in project options.Next, I compiled the Hello World Code.This time to my surprise it all compiled and linked.Then I added the I-Jet debugger and got the:Error[Li005]: no definition for "main"  I remember updating the I-Jet when I updated to IAR 7.60.2and it worked on my other projects (KE02x based), but I reinstalled it againand it worked. So the root cause of my issue was the I-Jet. I do not know ifthe issue was an I-Jet option selected or the I-Jet driver itself.  The first time, several weeks ago, when I had the error Ihad installed the I-Jet before I compiled SDK_1.3_TWR-KV58F220M code and thatwas the mistake.  The error no definitionfor "main" linking error did not seem like a debugger error.  It must be that this error is the default casein a switch statement when nothing else fits.  One would most likely question why I even had an I-Jet becausethe eval board has a built in flashing/debug function, but the project I aminvolved in is not motor control, or USB connectivity, but an application thatneeds the high resolution, very fast AtoDs employed by the KV5x family. Theeval is just to get an early start on the first pass of the board and the boardunderdevelopment will use the standard Jtag type connector, which is on theeval board.   Thanks for your help. Best regards,Erskine Barbour Will you please place this email in the forum, thanks again? 

From: ivadorazinova <admin@community.freescale.com>

To: Erskine Barbour <erskineb@yahoo.com>

Sent: Tuesday, May 31, 2016 6:04 PM

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

#yiv0372001089 * #yiv0372001089 a #yiv0372001089 body {font-family:Helvetica, Arial, sans-serif;}#yiv0372001089 #yiv0372001089 h1, #yiv0372001089 h2, #yiv0372001089 h3, #yiv0372001089 h4, #yiv0372001089 h5, #yiv0372001089 h6, #yiv0372001089 p, #yiv0372001089 hr {}#yiv0372001089 .yiv0372001089button td {}

|

NXP Community

|

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

reply from Iva Dorazinova in Kinetis Software Development Kit - View the full discussionHello Erskine. I tested on my side and it works without any issue.Ok. I need to get closer to your issue and need some additional information from you. Please, I need to know:

- what example did you compile?

- did you try the example also in KDS? do you have the error also in KDS?

- did you correctly set linker?

    

- did you try clean project and built again?

 Please let me know.Best Regards,Iva

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in Kinetis Software Development Kit by email or at NXP Community

Following Need fix for linking error using TWR-KV58F220M support code? in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |

|

0 Kudos