Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12597 Discussions

Make Error: multiple target patterns

Altera_Forum
Honored Contributor II
2,219 Views

Hi, 

 

I've got a make error which I do not understand as I'm not a big make expert. (I'm using the 11.1 tools and my bsp is generated by QSys). 

 

The error says exactly: make: *** multiple target patterns. Stop. mem_init.mk /ad_tpdb_0300_bsp line 182 C/C++ Problem 

 

The according line(s) in the makefile looks like this: 

.PHONY: onchip_ram 

onchip_ram: check_elf_exists $(MEM_INIT_DIR)/$(MEM_0).hex $(HDL_SIM_DIR)/$(MEM_0).dat $(HDL_SIM_DIR)/$(MEM_0).sym 

 

Background: 

 

When I compile my Nios II C code I want to get the onchip memory initialization files immediately. So I learned in Version 9.1 SP2 that I can switch on the following parameter in my firmware project make file: 

# Options to enable/disable optional files. 

CREATE_ELF_DERIVED_FILES := 1 

 

This parameter is initally set to zero and I don't get any .hex files. 

By setting thia to "1" it worked just flawless in V9.1. 

 

Now, by using 11.1 I sometimes run into problems when I want to get my hex files generated automatically.  

As I said above, I have no real clue about make. And the generated make files in the bsp and main firmware project are not designed to be beginner friendly ;-). 

 

I started running into this problem when I enabled the QSys checkbox "Enable non-default initialization file" in the onchip memory configuration dialog. 

 

As I said all that worked in 9.1/SOPC. I would like to get this working in 11.1 also. What can I do? 

 

I tried to generate the hex files in the Nios II console. That (after certain trys) worked. But I ask myself why do I have to do it manually if there are extra switches in the makefile to perform this task? And why don't these switches work in 11.1 

 

Thanks, 

Maik
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
924 Views

 

--- Quote Start ---  

The error says exactly: make: *** multiple target patterns. Stop. mem_init.mk /ad_tpdb_0300_bsp line 182 C/C++ Problem 

 

The according line(s) in the makefile looks like this: 

.PHONY: onchip_ram 

onchip_ram: check_elf_exists $(MEM_INIT_DIR)/$(MEM_0).hex $(HDL_SIM_DIR)/$(MEM_0).dat $(HDL_SIM_DIR)/$(MEM_0).sym 

--- Quote End ---  

I'd check that no ':' characters have crept into any of the directory name variables. Any directory paths need to be 'Unix' style, not windows ones. 

 

If you can edit the makefile and run by hand, you can use '$(warning xxxxx)' (on a line by itself) as a printf executed as make processes the makefile.
0 Kudos
Altera_Forum
Honored Contributor II
924 Views

Hi dsl, 

 

I think, that's it. 

 

If I check in QSys the "Enable non-default initialization file" check Box and browse to the according location, where I want my hex file to get from, it writes this (windows) path directly into the makefile. 

 

If I go to the makefile and change the line 

 

# Memory: onchip_rom 

MEM_1 := C:\Daten\CVS_TPDB\ws_tpdb\sw\ad_tpdb_0300_firmware\mem_init\ad_tpdb_qsys_onchip_rom 

 

into 

 

# Memory: onchip_rom 

MEM_1 := ad_tpdb_qsys_onchip_rom  

 

it's working. 

 

And again, this took me hours of my working time as I rely on the tools. 

 

I guess this is a bug and should be fixed because in a certain way i rely on the automazation and interaction of the tools that I'm using (especially if the task has been working in a former Version of the tools without any problems). Do you know, where this bug can be reported? Or where I can find a bug database which maybe already contains this one? 

 

Or maybe there is a misunderstanding from my side in the workflow of the tools. If so, can you please tell me what I have to do, so that I don't have to change any automatic generated makefiles? 

 

Thanks, 

Maik
0 Kudos
Altera_Forum
Honored Contributor II
924 Views

NFI - I don't use the IDE or altera build scheme ...

0 Kudos
Altera_Forum
Honored Contributor II
924 Views

 

--- Quote Start ---  

Hi dsl, 

 

I think, that's it. 

 

If I check in QSys the "Enable non-default initialization file" check Box and browse to the according location, where I want my hex file to get from, it writes this (windows) path directly into the makefile. 

 

If I go to the makefile and change the line 

 

# Memory: onchip_rom 

MEM_1 := C:\Daten\CVS_TPDB\ws_tpdb\sw\ad_tpdb_0300_firmware\mem_init\ad_tpdb_qsys_onchip_rom 

 

into 

 

# Memory: onchip_rom 

MEM_1 := ad_tpdb_qsys_onchip_rom  

 

it's working. 

 

And again, this took me hours of my working time as I rely on the tools. 

 

I guess this is a bug and should be fixed because in a certain way i rely on the automazation and interaction of the tools that I'm using (especially if the task has been working in a former Version of the tools without any problems). Do you know, where this bug can be reported? Or where I can find a bug database which maybe already contains this one? 

 

Or maybe there is a misunderstanding from my side in the workflow of the tools. If so, can you please tell me what I have to do, so that I don't have to change any automatic generated makefiles? 

 

Thanks, 

Maik 

--- Quote End ---  

 

 

It really worries me that this is still not corrected (Quartus 14.0), I also lost a lot of time because of this bug. I mean, we are expected to put a path to the .hex file in QSYS and we are using Windows but the path should'nt be windows based? 

 

C'mon...
0 Kudos
Reply