S32K MCAL with S32DS gives empty ELF file

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

S32K MCAL with S32DS gives empty ELF file

Jump to solution
1,724 Views
cbhavi
Contributor III

Hello,

I am trying to integrate S32K14x Autosar MCAL for S32k118 in S32DS to build, flash and debug on the S32K118EVB. I have copied all the required all the source files, tresos output and am able to successfully compile the PlatformIntegration code from S32DS (this is the sample project provided with the MCAL).

The problem i am stuck with is the linker output at the end of the build (refer below image).

2022-04-20_20h12_42.png

As seen in the image, the .text and other sections have 0bytes of data indicating there is no content in the build output. This means I cannot create a flash image or debug anything on the EVB.

I have used this link as reference to integrate and do the build: https://blog.karthisoftek.com/a?ID=01500-f23a36a3-51ec-4277-abd8-88526ba8a971 .

Request your support in resolving this issue.

 

Thanks.

0 Kudos
1 Solution
1,640 Views
jiri_kral
NXP Employee
NXP Employee

The linker file looks okay - but there is no ENTRY point defined. Are you passing entry point in command line arguments? 

More details about ENTRY:
https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_24.html

You can try to add default entry: 

jiri_kral_0-1650896528532.png

 

 

 

View solution in original post

0 Kudos
6 Replies
1,653 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

there is probably missing linker file script for your project:

jiri_kral_0-1650883756142.png

 

Just add it in project properties. If there is no linker script provided by example - you can create new empty project for S32K118 and copy default linker script file into your project. 

 

Jiri

 

0 Kudos
1,652 Views
cbhavi
Contributor III

Hi Jiri,

I had already linked the .ld file provided by the sample project. Its called "autosar_flash_118.gld". I have attached the file here for reference. I have renamed the file as .ld and have included in the linker section of the project properties.

0 Kudos
1,641 Views
jiri_kral
NXP Employee
NXP Employee

The linker file looks okay - but there is no ENTRY point defined. Are you passing entry point in command line arguments? 

More details about ENTRY:
https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_24.html

You can try to add default entry: 

jiri_kral_0-1650896528532.png

 

 

 

0 Kudos
1,605 Views
cbhavi
Contributor III

Thank you.

I added the ENTRY and _end sections and was able to generate the correct output file.

0 Kudos
1,717 Views
mikedoidge
NXP Employee
NXP Employee

Hello,

What version of S32 Design Studio are you using?

0 Kudos
1,712 Views
cbhavi
Contributor III

S32 Design Studio for ARM, version2.2

0 Kudos