Hi,
I am quite new to xmos programming and facing issues with use of -target command option to specify the target file.
My aim is to specify different target configurations for different build configurations in the same project. But this doesn't seem to work.
First I removed the TARGET=prototype.xn from the makefile and then added
-target=prototype.xn in the XCC BUILD FLAGS as:
XCC_FLAGS_default = $(BUILD_FLAGS) -target=prototype
With this I get build error:
C:/Program Files (x86)/XMOS/xTIMEcomposer/Community_14.2.0/build/xcommon/module_xcommon/build/../build/Makefile.common1:308: *** No TARGET specified in application Makefile. Stop.
If I keep the TARGET=prototype.xn line in the makefile; I get error
xcc: error: both target and xn source file supplied
Can anyone have an idea what could be wrong? I tried different combinations; but seems it is a must to specify the TARGET= option in the makefile. If so; how can I override the specified xn file with the one that I intended to use with -target= option in the XCC build flags. If this is not possible; I do not understand what is the use of -target xcc command option.
As I mentioned in the beginning; my aim is to specify different target files with different build configurations say:
XCC_FLAGS_configuration1 = $(BUILD_FLAGS) -target=prototype1.xn
XCC_FLAGS_configuration2 = $(BUILD_FLAGS) -target=prototype2.xn
Is it possible to do this?
Any information to resolve this would be helpful.
Thanks,
Meena
Issue specifying target file using -target option Topic is solved
-
- New User
- Posts: 3
- Joined: Mon Jul 18, 2016 4:23 am
-
Verified
- XCore Legend
- Posts: 1164
- Joined: Thu May 27, 2010 10:08 am
Hi - you can do this in the makefile with something like this:
Hope this helps
Code: Select all
ifeq ($(CONFIG), configuration1)
TARGET=configuration1_targetfile.xn
endif
ifeq ($(CONFIG), configuration2)
TARGET=configuration2_targetfile.xn
endif
-
- New User
- Posts: 3
- Joined: Mon Jul 18, 2016 4:23 am
Hi,
This worked. Thank you very much for the prompt response.
Thanks,
Meena
This worked. Thank you very much for the prompt response.
Thanks,
Meena