Build Error 2

New to XMOS and XCore? Get started here.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Build Error 2

Post by JohnRobert »

G'day,

I've been having trouble trying to build a project, here's the output:

Code: Select all

cd app_escon && xmake all
xmake[1]: Entering directory `C:/Users/John/Documents/xmos_workspace/sc_basic_utils/app_escon'
C:/Program Files (x86)/XMOS/xTIMEcomposer/12.0.0beta1/build/xcommon/module_xcommon/build/../build/Makefile.common1:458: *** Cannot find module `sc_basic_utils\module_basic_utils'.  Stop.
xmake[1]: *** [bin//app_escon.xe] Error 2
xmake: *** [app_escon.all] Error 2
xmake[1]: Leaving directory `C:/Users/John/Documents/xmos_workspace/sc_basic_utils/app_escon'
You can find the repo at: https://github.com/boar401s2/sc_basic_utils

I can't figure it out, any ideas?


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

In your app_escon/Makefile, you have

Code: Select all

USED_MODULES = sc_basic_utils\module_basic_utils
but that should be a forward slash.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Post by JohnRobert »

G'day,

Thanks for this.

I've come up against another odd issue though, in the application "app_escon", in it's source file, I've got simple code that should call the PWM code, however, when I try to run it, it downloads it, etc, and it appears it executes it for a split second, and then terminates. I changed the code from that to this:

Code: Select all

#include <platform.h>
#include <basic_utils.h>

out port bled = XS1_PORT_4C;

int main(){
	int x = 0b1000;
	while (1){
		bled <: x;
		wait(500);
	}
	return 0;
}
The code lights up the LED, then the IDE says that the program terminated... Why? It's in a while loop...?

The disassembly is:



Everything else about the code apart from the app_escon.xc is the same as what's on the git repo.

EDIT: I also just tried the following code:

Code: Select all

#include <platform.h>
out port bled = XS1_PORT_4C;

int main(){
	bled <: 0b0001;
	while (1){}
	return 0;
}
But no difference.

EDIT 2:

I just removed the while loop to see what happens, the LED remains off (or atleast, I can't see it turn on because it turns off so fast), and the program says that it was terminated. However, when I add in the while loop, the LED stays on, but it still says it's terminated.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

The code looks fine, the disassembly looks fine; it seems the IDE
is lying to you. Your experiment with removing the "while" shows
the same. I have no idea what's happening, it's all black magic
to me :-)
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Post by JohnRobert »

G'day,

After having a snooze, I came back refreshed, and tried again, this time I had it dumping the char "A" to the computer over serial, and this showed that the while was working!

Thanks :)

EDIT:

I figured out the mystery! In run configurations I had disabled the IO Server (mainly because I didn't know what it did), and so presumably, the computer didn't talk to the XMOS to get it's state, etc...