Linker looking for file generated makefile does not create

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

Linker looking for file generated makefile does not create

926 Views
rlw
Contributor I

I am testing CW 10.7 for MCUs on a legacy project that previously used CW 6.3

 

The project built successfully under 6.3, however that version of CW doesn't support 64 bit Win7. While possible to set up a VM to run CW 6.3, my team and I have been directed to determine feasibility an up to date build environment to avoid IT support issues.

 

When I run the build, a makefile is generated. this makefile creates object files named like "main_c.obj". However, when the link phase is attempted, the linker is looking for "main_c.o", which not what the compile phase created.

 

The error message is "ERROR L1302: File main.c.o not found"

 

I have looked at the makefile and various (also generated) subdir.mk and other sub-make file, but I don't see where "main_c.o" came from.

 

Any suggestions how to work around this problem?

Labels (1)
0 Kudos
5 Replies

742 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ron.

I didn't see your code so I can only provide you tips as help

Tip of Linker Messages: L1302: File <File Name> not found

  • Make sure the file really exist and his name is correctly spelled.
  • Then check if your paths are defined correctly. The PRM file must be located in one of the paths enumerated in the environment variable GENPATH or in the working directory.

if above can not help, please upload your project here or create a private case or follow me to send me the project via email.

https://community.nxp.com/docs/DOC-329745 


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

742 Views
rlw
Contributor I

The generated makefile and generated sub-makefiles (see attached) create "main_c.obj", but not "main_c.o"

The PRM file (see below) does not reference "main_c.o", therefore, the generated makefile must be telling the linker that "main_c.o" is needed. I can not find where the makefile is doing that.

/* This is a linker parameter file for the mc9s08dn32 */  NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */  SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */     Z_RAM                    =  READ_WRITE   0x0080 TO 0x00FF;     RAM                      =  READ_WRITE   0x0100 TO 0x067F;     ROM                      =  READ_ONLY    0x7C00 TO 0xFFAD;     EEPROM                   =  READ_ONLY    0x1600 TO 0x17FF;  /* INTVECTS                 =  READ_ONLY    0xFFC0 TO 0xFFFF; Reserved for Interrupt Vectors */ END  PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */     DEFAULT_RAM,                        /* non-zero page variables */                                         INTO  RAM;      _PRESTART,                          /* startup code */     STARTUP,                            /* startup data structures */     ROM_VAR,                            /* constant variables */     STRINGS,                            /* string literals */     VIRTUAL_TABLE_SEGMENT,              /* C++ virtual table segment */     DEFAULT_ROM,     COPY                                /* copy down information: how to initialize variables */                                         INTO  ROM;       _DATA_ZEROPAGE,                     /* zero page variables */     MY_ZEROPAGE                         INTO  Z_RAM; END  STACKSIZE 0x80  VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */
0 Kudos

742 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Ron.

I opened your project but I didn't see project file ( .project )

pastedImage_1.png

do you open your project with CodeWarrior 10.7 IDE? or command line?

can you please detail how to open your project and reproduce your problem step by step?

0 Kudos

742 Views
rlw
Contributor I

Attached .project, .cproject and .cwGeneratedFileSetLog

I open and (try to) build the project using the CW 10.7 IDE.

I created the project by using the New Project wizard to create a "CodeWarrior Bareboard Project".

Then I created new files in the project for application sources, then copied the source files from the legacy (CW 6.3) project in to the the new CW 10.7 project.

(Except for main.c, I did not change or replace any of the generated files.)

CWsourcefiles.PNG

Then, in the "Commander" panel, I clicked "Build (All)". The build process ended with the linker error: "ERROR L1302: File main.c.o not found"

0 Kudos

742 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

I can open your project with your project files but I just found your folder doesn't include other source files (eg, C, prm...)

the source folder includes the intermediate .d .obj file but not source c files.

pastedImage_2.png

please make sure the folder includes all the source code and you can open and build it on another computer.

if you don't like to post your project to public, you can send it to me to my email (following my account, I will send you my email address) or you can also send your project by create a private case:

https://community.nxp.com/docs/DOC-329745 


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos