"on stdcore" malfunction?

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Ruben
Member
Posts: 15
Joined: Sun Mar 07, 2010 9:58 pm

"on stdcore" malfunction?

Postby Ruben » Wed Mar 17, 2010 10:38 am

As you might know, I'm working on the XMOSlisp interpreter. Now I'm trying to have one interpreter running on each core. So obviously I'm doing par{on stdcore[0]....}, you get the point ;). However, when I add the on stdcore (in any program actually), it compiles fine. But then it crashes on startup:

Code: Select all

xrun --verbose --io test.xe
0xffffc04e in ?? ()
Loading image to XCore 0
Loading section .text, size 0x4820 lma 0x10000
Loading section .init, size 0x5c lma 0x14820
Loading section .fini, size 0x3a lma 0x1487c
Loading section .globcode, size 0x5c lma 0x148b6
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x14912
Loading section .rodata, size 0x4 lma 0x14914
Loading section .cp.rodata, size 0x14 lma 0x14918
Loading section .cp.const4, size 0xc0 lma 0x1492c
Loading section .cp.string, size 0x3 lma 0x149ec
Loading section .ctors, size 0x10 lma 0x149f0
Loading section .dtors, size 0x10 lma 0x14a00
Loading section .dp.data, size 0x4c lma 0x14a10
Loading section .dp.rodata, size 0x1c8 lma 0x14a5c
Loading section .eh_frame, size 0x4 lma 0x14c24
Start address 0x10000, load size 19495
Transfer rate: 35 KB/sec, 1392 bytes/write.
Loading image to XCore 1
Loading section .text, size 0xa0e lma 0x10000
Loading section .init, size 0x5c lma 0x10a0e
Loading section .fini, size 0x3a lma 0x10a6a
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x10aa4
Loading section .rodata, size 0x4 lma 0x10aa8
Loading section .cp.const4, size 0xb8 lma 0x10aac
Loading section .dp.data, size 0x34 lma 0x10b64
Loading section .eh_frame, size 0x4 lma 0x10b98
Start address 0x10000, load size 2970
Transfer rate: 15 KB/sec, 371 bytes/write.
Loading image to XCore 2
Loading section .text, size 0xa0e lma 0x10000
Loading section .init, size 0x5c lma 0x10a0e
Loading section .fini, size 0x3a lma 0x10a6a
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x10aa4
Loading section .rodata, size 0x4 lma 0x10aa8
Loading section .cp.const4, size 0xb8 lma 0x10aac
Loading section .dp.data, size 0x34 lma 0x10b64
Loading section .eh_frame, size 0x4 lma 0x10b98
Start address 0x10000, load size 2970
Transfer rate: 17 KB/sec, 371 bytes/write.
Loading image to XCore 3
Loading section .text, size 0xa0e lma 0x10000
Loading section .init, size 0x5c lma 0x10a0e
Loading section .fini, size 0x3a lma 0x10a6a
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x10aa4
Loading section .rodata, size 0x4 lma 0x10aa8
Loading section .cp.const4, size 0xb8 lma 0x10aac
Loading section .dp.data, size 0x34 lma 0x10b64
Loading section .eh_frame, size 0x4 lma 0x10b98
Start address 0x10000, load size 2970
Transfer rate: 17 KB/sec, 371 bytes/write.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010130 in freeLocalChanendSend ()
Any pointers what this can mean?
User avatar
trousers
Active Member
Posts: 44
Joined: Fri Dec 11, 2009 10:20 am

Postby trousers » Wed Mar 17, 2010 11:00 am

That label is in the closedown code. An exception there implies that one of the cores has entered the closedown code prematurely, or that one of the threads didn't exit cleanly. Have you observed that your app has already rund an exited or does this appear to be happening during load/startup?

OTOH, the trap claims to be a trace/breakpoint exception which suggests that maybe something has gone wrong with the loading process. What device are you targetting and are you using an xn file that matches?
Best friends with the code fairy.
User avatar
Ruben
Member
Posts: 15
Joined: Sun Mar 07, 2010 9:58 pm

Postby Ruben » Wed Mar 17, 2010 11:14 am

It's on startup.

I've made this simple example:

Code: Select all

#include <stdio.h>
#include <platform.h>

int main ( void ) {
     par
     {
       //on stdcore[0]:
       {
    	  puts("a");
       }
       //on stdcore[1]:
       {  
    	  puts("b");
       }
     }
     return 0;
}
It runs fine without the stdcore, but crashes if you uncomment them.

About the XN file: I'm using an XC-1 file for an XC-1 board, so that seems to be ok. However I noticed that the file says XS1-G4B-FB512 while on the chip it says XS1-G4A-FB512. I changed it in the XN file, but without success :S
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Postby richard » Wed Mar 17, 2010 11:52 am

Have you put the XC-1 in program mode? See the XC-1 quick start guide:

http://www.xmos.com/published/xc-1-quick-start-guide
User avatar
Ruben
Member
Posts: 15
Joined: Sun Mar 07, 2010 9:58 pm

Postby Ruben » Wed Mar 17, 2010 11:59 am

OK :roll: , now I feel incredibly stupid :oops:

I'm like already working with the board for months and I can only vaguely remember ever putting it in program mode. Why does it work for single core apps but not for multicore ones? :?

Who is online

Users browsing this forum: No registered users and 1 guest