Can't create a linkable library with XMAKE
Posted: Tue Sep 08, 2020 9:02 am
Hello everybody,
I am trying to compile a proprietary library (I don't want to distribute the source to the final user, only a library) following instructions from X4954A document.
The document itself is a bit outdated, so I changed declarations like MODULE_XCC_XC_FLAGS to LIB_XCC_XC_FLAGS. The library itself works like a charm under xTimeComposer 14.4.3 (we use it in all of our products) when included in a project, but I can't compile it as an independent library.
I have created a makefile as recommended in the document
LIBRARY = LIB_KISSBOXV4
LIB_XCC_XC_FLAGS = $(XCC_XC_FLAGS)
LIB_XCC_FLAGS = $(XCC_FLAGS) -g -O3
# The following specifies the dependencies of the module. When an application
# includes a module it will also include all its dependencies.
# DEPENDENT_MODULES =
VERSION = 1.0.0
When I launch xmake on this makefile, I get multiple "undeclared identifiers" related to the physical target (for example, "use of undeclared identifier 'tile')
I noticed them that the compiler compiles for the wrong target : it compiles for XS1B, while my processor is a XCore200
I have then placed my XN file in the makefile directory but now, I get following errors "xcc: error: conflicting arch and target specified 0 1". So it seems that the compiler wants absolutely to compile for the XS1B (or anything else), and not for my real target. I have tried to add the following line in the module definition file (our target definition is cpu_v4.xn)
TARGET = CPU_V4
but it does not change anything, the compiler still complains about conflict between arch and target
Does anybody know how I should specify my target/architecture in the makefile or the module_build_info file, so the library can be compiled for my physical target ?
(Or maybe if somebody knows if XMOS has updated document X4954A to include XCore200 processors and xTimeComposer
Thanks
Benoit
I am trying to compile a proprietary library (I don't want to distribute the source to the final user, only a library) following instructions from X4954A document.
The document itself is a bit outdated, so I changed declarations like MODULE_XCC_XC_FLAGS to LIB_XCC_XC_FLAGS. The library itself works like a charm under xTimeComposer 14.4.3 (we use it in all of our products) when included in a project, but I can't compile it as an independent library.
I have created a makefile as recommended in the document
LIBRARY = LIB_KISSBOXV4
LIB_XCC_XC_FLAGS = $(XCC_XC_FLAGS)
LIB_XCC_FLAGS = $(XCC_FLAGS) -g -O3
# The following specifies the dependencies of the module. When an application
# includes a module it will also include all its dependencies.
# DEPENDENT_MODULES =
VERSION = 1.0.0
When I launch xmake on this makefile, I get multiple "undeclared identifiers" related to the physical target (for example, "use of undeclared identifier 'tile')
I noticed them that the compiler compiles for the wrong target : it compiles for XS1B, while my processor is a XCore200
I have then placed my XN file in the makefile directory but now, I get following errors "xcc: error: conflicting arch and target specified 0 1". So it seems that the compiler wants absolutely to compile for the XS1B (or anything else), and not for my real target. I have tried to add the following line in the module definition file (our target definition is cpu_v4.xn)
TARGET = CPU_V4
but it does not change anything, the compiler still complains about conflict between arch and target
Does anybody know how I should specify my target/architecture in the makefile or the module_build_info file, so the library can be compiled for my physical target ?
(Or maybe if somebody knows if XMOS has updated document X4954A to include XCore200 processors and xTimeComposer
Thanks
Benoit