In Keil S32K144 Undefined symbol refered from startup.o

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

In Keil S32K144 Undefined symbol refered from startup.o

9,797 Views
raviranjankumar
Contributor III

Hi all,

I created NXP S32k144 new project in Keil, I added startup files also and packs are also updated then also i am getting these error.

.\Objects\S32K144_BSP.axf: Error: L6218E: Undefined symbol Image$$RW_m_data$$Base (referred from startup.o).
.\Objects\S32K144_BSP.axf: Error: L6218E: Undefined symbol Image$$VECTOR_RAM$$Base (referred from startup.o).
.\Objects\S32K144_BSP.axf: Error: L6218E: Undefined symbol Image$$VECTOR_ROM$$Base (referred from startup.o).
.\Objects\S32K144_BSP.axf: Error: L6218E: Undefined symbol Image$$ARM_LIB_STACK$$ZI$$Limit (referred from startup_s32k144.o).

Please help.

Thanks and Regard.
Ravi Ranjan

0 Kudos
8 Replies

6,777 Views
tedkorczak
Contributor I

Hallo
How I can fix the same problem for stm32f103.
.\Objects\1.axf: Error: L6218E: Undefined symbol main (referred from __rtentry2.o).

0 Kudos

6,777 Views
robertboys
Contributor IV

The solution will not be the same as in the S32.

In most other projects, uVision creates the scatter file for you.

See Error: L6218E: Undefined symbol main (referred from rtentry2.o). 

A better answer might be in the ST forums.

Bob

0 Kudos

6,777 Views
robertboys
Contributor IV

Hello

I think this error is because you are using the default scatter file created by uVision.  The scatter file tells the Linker where to place code and data.  By default, uVision uses the addresses defined in the Options for Target window under the Target tab.

In your case, I think you must specify one that is provided by the Pack:

To do this::

1) Open the Options for Target window:  pastedImage_3.png

2) Select the Linker tab.

3) Unselect "Use memory Layout from Target Dialog".

4) Select an appropriate .sct file as shown below.  On my project, this is found in the RTE folder.

It ought to compile now.  If not - let me know.

I am going to add a section to my lab discussing this situation.

http://www.keil.com/appnotes/docs/apnt_299.aspwww.keil.com/appnotes/docs/apnt_299.asp

Thanks

Bob Boys

ARM

pastedImage_1.png

0 Kudos

6,777 Views
raviranjankumar
Contributor III

Hi Robert,

            Thanks for the reply. Now its working, no errors but I am not able to flash with PE Micro debugger, it is showing Flash download failed- Target DLL has been canceled.

Please help.

Thanks and Regard.

Ravi Ranjan

0 Kudos

6,777 Views
robertboys
Contributor IV

Hello

I suggest you program your board to work with CMSIS-DAP.  This easy to do.

Get my lab and follow the directions on page 8 to enable CMSIS-DAP.

www.keil.com/appnotes/docs/apnt_299.asp

The latest verion is 0.92 and will be on the website later today.

Make sure you add the two files as described on the bottom of page 2 for MDK 5.23.

If you want to use P&E - make sure the directions are followed as on page 7.

Bob

0 Kudos

6,777 Views
raviranjankumar
Contributor III

Hi Robert,

            Thanks for your support, Now I am able to flash in CMSIS-DAP mode. Thank you

 

Thanks and Regards,

Ravi Ranjan

0 Kudos

6,777 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I have no experience with Keil, but it look like you do not have defined symbols in linker file, but you try to use these symbols in startup file you added to your project.

Where the startup file come from?

Could you please send me linker file and startup file?

Regards,

Martin

0 Kudos

6,777 Views
raviranjankumar
Contributor III

Hi Martin,

             Thanks for the reply. While creating the project, after selecting target device startup files automatically added. We can get in Project->RTE->Device->S32K144UAxxxLLx.

Thanks and Regard,

Ravi Ranjan

0 Kudos