Аssembly and compilation problems

New to XMOS and XCore? Get started here.
User avatar
BritishCat
Member++
Posts: 21
Joined: Tue Oct 24, 2023 11:16 am

Аssembly and compilation problems

Post by BritishCat »

Hello. I can't compile anything. Today I installed the latest version of XTC tools from your site, a 32-bit JRE, and a bash environment. Prior to this, I had installed the GCC compiler (version 13.1.0). Then I attempted to compile an application named app_usb_aud_xk_216_mc using the command xmake all. The console displayed numerous errors:
I encountered the same situation with other standard applications, such as app_usb_aud_xk_316_mc. What am I doing wrong?
$ xmake all
Building configuration 1AMi2o2xxxxxx
Checking build modules
Using build modules: lib_xua lib_i2c
Analyzing usb_mixer.cpp
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:155:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:180:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:203:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:347:17: error: unknown type name 'char_style'
char_style mixer_input_name[USB_MIXER_MAX_NAME_LEN];
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:448:19: warning: unused variable 'bRequest'
[-Wunused-variable]
unsigned char bRequest = CUR;
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:612:13: error: unknown type name 'char_style'
char_style mixer_output_name[USB_MIXER_MAX_NAME_LEN];
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:698:5: error: expected expression
)
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:700:9: error: use of undeclared identifier 'devh'
devh = 0;
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:774:12: error: use of undeclared identifier 'devh'
if(devh)
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:798:12: error: use of undeclared identifier 'devh'
return devh ? 0 : -1;
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:820:9: error: expected expression
)
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:909:14: warning: unused variable 'bRequest'
[-Wunused-variable]
unsigned bRequest = CUR;
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:910:14: warning: unused variable 'cs' [-Wunused-variable]
unsigned cs = 0;
^
D:/XMOS/proj/lib_xua/host_usb_mixer_control/usb_mixer.cpp:911:14: warning: unused variable 'cn' [-Wunused-variable]
unsigned cn = usb_mixers->usb_mixSel[mixer].id;
^
7 warnings and 7 errors generated.
xmake[2]: *** [.build_1AMi2o2xxxxxx/_l_xua/host_usb_mixer_control/usb_mixer.cpp.pca.xml.decouple] Error 1
xmake[1]: *** [analyze] Error 2
xmake: *** [1AMi2o2xxxxxx.all] Error 2
User avatar
Ross
Verified
XCore Expert
Posts: 995
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

The xcore build is trying to compile in the host control app code for some reason..
User avatar
BritishCat
Member++
Posts: 21
Joined: Tue Oct 24, 2023 11:16 am

Post by BritishCat »

I understood why I couldn't compile the files. The project must be located in the folder with all the libraries, then everything works. But now there is another problem. I downloaded sw_usb_audio-[sw]_7_3_1 . As far as I understand, this is a ready-made working environment for creating audio applications. When I compile any of them I get a binary XE file as output. But during the compilation process, warnings remain in the logs. Is it normal situation?

Analyzing XUD_EpFunctions.c
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:193:59: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
result = XUD_GetBuffer_Finish(ep->client_chanend, ep, datalength);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:118:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_GetBuffer_Finish(chanend c, XUD_ep e, unsigned *datalength)
^
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:214:56: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
*result = XUD_GetBuffer_Finish(ep->client_chanend, ep, datalength);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:118:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_GetBuffer_Finish(chanend c, XUD_ep e, unsigned *datalength)
^
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:348:53: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
return XUD_SetBuffer_Finish(ep->client_chanend, ep);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:311:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_SetBuffer_Finish(chanend c, XUD_ep e)


D:/XMOS/proj/lib_spdif/lib_spdif/src/SpdifTransmit.xc:303:29: warning: Taking the address of a resource handle, not the actual resource. Passing by (unsafe) value may be a better option [-Wunusual-code]
out port * movable pp = &p_spdif;
^~~~~~~~
Analyzing spdif_rx.xc
D:/XMOS/proj/lib_spdif/lib_spdif/src/spdif_rx.xc:17:26: warning: Taking the address of a resource handle, not the actual resource. Passing by (unsafe) value may be a better option [-Wunusual-code]
in port * movable pp = &p;


D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:193:59: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
result = XUD_GetBuffer_Finish(ep->client_chanend, ep, datalength);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:118:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_GetBuffer_Finish(chanend c, XUD_ep e, unsigned *datalength)
^
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:214:56: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
*result = XUD_GetBuffer_Finish(ep->client_chanend, ep, datalength);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:118:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_GetBuffer_Finish(chanend c, XUD_ep e, unsigned *datalength)
^
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:348:53: warning: incompatible pointer to integer
conversion passing 'volatile XUD_ep_info *' (aka 'volatile struct XUD_ep_info *') to parameter of type 'XUD_ep'
(aka 'unsigned int') [-Wint-conversion]
return XUD_SetBuffer_Finish(ep->client_chanend, ep);
^~
D:/XMOS/proj/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:311:53: note: passing argument to parameter 'e' here
XUD_Result_t XUD_SetBuffer_Finish(chanend c, XUD_ep e)
^
!!!THIS IS THE END OF THE PROCESS!!!
Creating app_xua_simple.xe
Constraint check for tile[0]:
Cores available: 8, used: 5 . OKAY
Timers available: 10, used: 7 . OKAY
Chanends available: 32, used: 15 . OKAY
Memory available: 524288, used: 37796 . OKAY
(Stack: 2500, Code: 22440, Data: 12856)
Constraints checks PASSED.
Constraint check for tile[1]:
Cores available: 8, used: 1 . OKAY
Timers available: 10, used: 1 . OKAY
Chanends available: 32, used: 3 . OKAY
Memory available: 524288, used: 7272 . OKAY
(Stack: 404, Code: 5810, Data: 1058)
Constraints checks PASSED.
Build Complete
User avatar
Ross
Verified
XCore Expert
Posts: 995
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

You can safety ignore those warnings