Today I was using the new version of the I2C library (lib_i2c) for a simple test on some new hardware, however after adding in dependencies of lib_xassert and lib_logging The make compile cycle started generating pages of errors, most of which were about duplication of main. In order to move forward I had to delete the 'tests' subfolders in these libraries which contained the additional sources containing 'main'.
I am guessing this shouldn't really happen and that the tests sources should have a separate target that doesn't interfere with the main app I am building. I think it has something to do with new libraries versus the old module style which I haven't had issues with historically. Clearly I am missing something or some configuration detail with using these new libraries, perhaps someone can pass me the clue stick...
(14.01 tools)
New Xmos libraries
-
- XCore Legend
- Posts: 1274
- Joined: Thu Dec 10, 2009 10:20 pm
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Hi,
I tried to download the lib_i2c using the xTIMEcomposer v14.x - It asks for a selection of tests to download into the workspace, at the time of lib download (attached the snapshot for reference).
Did you try in the similar way?
Regards,
srinie
I tried to download the lib_i2c using the xTIMEcomposer v14.x - It asks for a selection of tests to download into the workspace, at the time of lib download (attached the snapshot for reference).
Did you try in the similar way?
Regards,
srinie
You do not have the required permissions to view the files attached to this post.
-
- XCore Legend
- Posts: 1274
- Joined: Thu Dec 10, 2009 10:20 pm
I do not use the xTIMEcomposer IDE, I just use the command line tools directly, so in my case I manually downloaded the zipped files from Xmos's Design support/libraries area (http://www.xmos.com/support/libraries). I then just added them into my makefile using the 'USED_MODULES' variables list. I saw no request for any test selection.srinie wrote:Hi,
I tried to download the lib_i2c using the xTIMEcomposer v14.x - It asks for a selection of tests to download into the workspace, at the time of lib download (attached the snapshot for reference).
Did you try in the similar way?
Regards,
srinie
regards
Al
-
- Experienced Member
- Posts: 104
- Joined: Fri Dec 11, 2009 8:29 pm
Could be a bug in the build system. Where is lib_i2c with respect to your application on your file system. Is it like this:Folknology wrote: I do not use the xTIMEcomposer IDE, I just use the command line tools directly, so in my case I manually downloaded the zipped files from Xmos's Design support/libraries area (http://www.xmos.com/support/libraries). I then just added them into my makefile using the 'USED_MODULES' variables list. I saw no request for any test selection.
regards
Al
Code: Select all
my_app/
Makefile
src/
lib_i2c/
lib_i2c/
module_build_info
api/
src/
-
- XCore Legend
- Posts: 1274
- Joined: Thu Dec 10, 2009 10:20 pm
Hi Dave, yes my config is as your suggestion (I just did the same thing I used to do with the older modules).davelacey wrote:Could be a bug in the build system. Where is lib_i2c with respect to your application on your file system. Is it like this:Folknology wrote: I do not use the xTIMEcomposer IDE, I just use the command line tools directly, so in my case I manually downloaded the zipped files from Xmos's Design support/libraries area (http://www.xmos.com/support/libraries). I then just added them into my makefile using the 'USED_MODULES' variables list. I saw no request for any test selection.
regards
Al
or some other configuration?Code: Select all
my_app/ Makefile src/ lib_i2c/ lib_i2c/ module_build_info api/ src/
-
- XCore Legend
- Posts: 1274
- Joined: Thu Dec 10, 2009 10:20 pm
Ok I now have had time to revisit this error after getting my urgent I2C test to do its job and get the hardware out. Just to remind you I did this by removing all tests and example subdirectories from the libraries. I do this all on the command line no IDE, below is a bit more detail showing the output of the make.
I have now created a separate test area for this with just the libraries and my I2C code:
Makefile
Here is the xmake output:
Most of the errors are about duplicate definitions, hope this info enables you to work out what's actually going wrong..
I have now created a separate test area for this with just the libraries and my I2C code:
Code: Select all
Volume in drive C is OS
Volume Serial Number is 8272-7FCF
Directory of C:\Users\Alan\xmos-test
11/05/2015 08:48 <DIR> .
11/05/2015 08:48 <DIR> ..
14/04/2015 19:16 254 .zipinfo
11/05/2015 08:53 <DIR> I2C-test
11/05/2015 08:47 <DIR> lib_i2c
11/05/2015 08:46 <DIR> lib_logging
11/05/2015 08:46 <DIR> lib_xassert
1 File(s) 254 bytes
6 Dir(s) 30,997,782,528 bytes free
Code: Select all
TARGET = SLICEKIT-U16
APP_NAME = ex
XCC_FLAGS = -g -O1 -fxscope -report
USED_MODULES = lib_i2c lib_xassert lib_logging
#=============================================================================
# The following part of the Makefile includes the common build infrastructure
# for compiling XMOS applications. You should not need to edit below here.
XMOS_MAKE_PATH ?= ..\..
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
Code: Select all
Checking build modules
Using build modules: lib_i2c lib_xassert lib_logging
Analyzing debug_printf.c
Analyzing main.xc
Analyzing i2c_master.xc
Analyzing i2c_master_async.xc
Analyzing i2c_master_ext.xc
Analyzing i2c_master_single_port.xc
Analyzing i2c_slave.xc
Analyzing xassert.xc
Analyzing main.xc
Analyzing main.xc
Analyzing main.xc
Analyzing main.xc
Analyzing main.xc
Propagating analysis
Creating dependencies for main.xc
Creating dependencies for main.xc
Creating dependencies for main.xc
Creating dependencies for main.xc
Creating dependencies for main.xc
Creating dependencies for xassert.xc
Creating dependencies for i2c_slave.xc
Creating dependencies for i2c_master_single_port.xc
Creating dependencies for i2c_master_ext.xc
Creating dependencies for i2c_master_async.xc
Creating dependencies for i2c_master.xc
Creating dependencies for main.xc
Creating dependencies for debug_printf.c
Compiling debug_printf.c
Compiling main.xc
Compiling i2c_master.xc
Compiling i2c_master_async.xc
Compiling i2c_master_ext.xc
Compiling i2c_master_single_port.xc
Compiling i2c_slave.xc
Compiling xassert.xc
Compiling main.xc
Compiling main.xc
Compiling main.xc
Compiling main.xc
Compiling main.xc
Creating ex.xe
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'f'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'main'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'f.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'f.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'f.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'f.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of '_Sf_0'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of '_Sf_0.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'main.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'main.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'main.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/fail_test/src/main.xc: Error: Multiple definition of 'main.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'f'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'main'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'f.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'f.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'f.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'f.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of '_Sf_0'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of '_Sf_0.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of '_Sf_0.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'main.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'main.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'main.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_xassert/tests/unreachable_test/src/main.xc: Error: Multiple definition of 'main.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/example/debug_printf_example/src/main.xc: Error: Multiple definition of 'main'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/example/debug_printf_example/src/main.xc: Error: Multiple definition of 'main.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/example/debug_printf_example/src/main.xc: Error: Multiple definition of 'main.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/example/debug_printf_example/src/main.xc: Error: Multiple definition of 'main.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/example/debug_printf_example/src/main.xc: Error: Multiple definition of 'main.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/tests/debug_printf_test/src/main.xc: Error: Multiple definition of 'main'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/tests/debug_printf_test/src/main.xc: Error: Multiple definition of 'main.nstackwords'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/tests/debug_printf_test/src/main.xc: Error: Multiple definition of 'main.maxcores'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/tests/debug_printf_test/src/main.xc: Error: Multiple definition of 'main.maxtimers'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
C:/Users/Alan/xmos-test/lib_logging/tests/debug_printf_test/src/main.xc: Error: Multiple definition of 'main.maxchanends'
C:/Users/Alan/xmos-test/lib_xassert/tests/assert_test/src/main.xc: Error: first defined here
xmake[1]: *** [bin//ex.xe] Error 1
xmake: *** [bin//ex.xe] Error 2