Build is producing error message: unrecognized option '-T'

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

Build is producing error message: unrecognized option '-T'

3,003 Views
markdresser
Contributor II

Using S32 Design Studio for ARM v1.3, build 170119

Problem seems to be present on both Demo Projects and ones I have created myself.

10:51:05 **** Incremental Build of configuration Debug_RAM for project DWStest ****
make -j4 all
Building file: ../Sources/main.c
Executing target #2 ../Sources/main.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@Sources/main.args" -MMD -MP -MF"Sources/main.d" -MT"Sources/main.o" -c -o "Sources/main.o" "../Sources/main.c"
Finished building: ../Sources/main.c

Building target: DWStest.elf
Executing target #47 DWStest.elf
Invoking: Standard S32DS C Linker
arm-none-eabi-gcc -o "DWStest.elf" "@DWStest.args"
c:/nxp/s32ds_arm_v1.3/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '-T'
c:/nxp/s32ds_arm_v1.3/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
make: *** [DWStest.elf] Error 1

10:51:08 Build Finished (took 2s.979ms)

6 Replies

1,634 Views
markdresser
Contributor II

Hi Jiri,

OK, problem is solved-- I think!

I was using the old v1.3 version of S32 DS.  I've installed the v2018 R1 version of S32 DS.

I was unable to migrate the original project to the new DS.  (I got dozens of cryptic error messages about broken links, etc.)  I tried opening the old workspace with the new DS, exporting/importing project archive.  Still got lots of error messages.

Finally I started from the example project closest to what I needed, created a new project from example using a new name, added the additional components I needed, then replaced the example main.c with my original main.c.  It now seems to be compiling without the error.

In hind sight, I think what may have caused the problem is that I originally created my project by copy and pasting an example project that I had loaded into the workspace.  In the course of renaming that, some references to the original example project were left behind that somehow caused the problem.  I'm not sure why that caused corruption of the .args file, rather than messages about incorrect file references but I'll avoid copy and paste of projects in the future.

Thanks for your help.

Mark

1,634 Views
markdresser
Contributor II

Thanks for your assistance!

It appears that the line is set in the Linker tool settings but it is not finding it's way into the .args file?  I'm not aware of having done anything to change it from the original default.  Sorry, I'm new to gcc so there is a lot of magic going on that I don't understand.

pastedImage_1.png

0 Kudos

1,634 Views
jiri_kral
NXP Employee
NXP Employee

Hi Mark, 

um, interesting. Is the .ld file present physically in your project? Do you have the same issue with Flash target? (you can switch target in build option):

pastedImage_1.png

Is possible for you use new S32DS version? The current version is v2018.R1. 

Jiri

0 Kudos

1,634 Views
markdresser
Contributor II

I've added the .args file as an attachment

0 Kudos

1,634 Views
jiri_kral
NXP Employee
NXP Employee

Hi Mark, 

you have empty file specification after linker  -T option. There should be path to linker file.

Your args fie:

"./Sources/main.o"
"./Sources/helper_functions.o"
--entry=Reset_Handler
-T
""
-Wl,-Map,"DWStest.map"

default one from example:

"./Project_Settings/Startup_Code/startup.o"
"./src/hello.o"
-T
"C:/Users/nxf24838/workspaceS32DS.ARM_FACOMSA/hello/Project_Settings/Linker_Files/S32K1xx_flash.ld"
-Wl,-Map,"hello.map"

Please check the project properties - right click on projet name -> Properties and in liker settings check -T option parameters: 

pastedImage_4.png

Hope it helps. 

Jiri

0 Kudos

1,634 Views
jiri_kral
NXP Employee
NXP Employee

Hi Mark, 

can you please share the DWStest.args file (or any other .args file from buggy project)? Thanks. 

Jiri

0 Kudos