arm-none-eabi-gcc.exe: error: out/*.o: Invalid argument

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

arm-none-eabi-gcc.exe: error: out/*.o: Invalid argument

1,776 Views
lb28
Contributor II

Hello,

I am using:

SW32K1_RTD_4.4_1.0.1

I want to generate the .elf file using the MCAL in command prompt. 

Here's my 'project_parameters.mk' file. 

lb28_1-1659973233895.png

 

I keep getting this error when using 'make build' command

lb28_0-1659973141953.png

Thank you in advanced. 

 

 

0 Kudos
5 Replies

1,567 Views
stanleylin0729
Contributor I

Hi @lb28 ,

I encountered the same problem too, and I found a straightforward solution, hope it will work for you.

I used Python script to list all the .o files in the out/ folder, and declare a variable like this

stanleylin0729_0-1666839149737.png

Then, replace $(ODIR)/*.o by $(OUTS)

stanleylin0729_1-1666839284353.png

The attached file is the Python script, run it in /Dio_ToggleLed_S32K144

 

 

0 Kudos

783 Views
huqifan
Contributor II

This works for me, thanks!

Another way is to modify the Makefile directly as shown below:

@$(LD) -Wl,-Map,"$(MAPFILE)" $(LDOPT) -T $(LINKER_DEF) $(ODIR)/*.o -o $(ODIR)/$@

@$(LD) -Wl,-Map,"$(MAPFILE)" $(LDOPT) -T $(LINKER_DEF) $(wildcard out/*.o) -o $(ODIR)/$@

0 Kudos

1,750 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @lb28,

Not sure what is the reason for that. Could you try the following change and share with me the log after linking?

namnguyenviet_0-1660549583150.png

Let's see what could be invalid.

Best Regards,

Nam

0 Kudos

1,747 Views
lb28
Contributor II

Hello, 

I've made the changes you've requested. Here's my project. 

I'm still getting the same error. 

0 Kudos

1,713 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @lb28,

Sorry for late reply. Unfortunately, I couldn't reproduce the issue. Could you try to change from slash (\) to backslash (/) in each of the paths and try again? It worked like that in my site:

namnguyenviet_0-1661238860457.png

Best Regards,

Nam

0 Kudos