Page 2 of 2

Re: An error pin?

Posted: Thu Dec 22, 2016 10:16 am
by aclassifier
infiniteimprobability wrote:
I only want this to happen in flashed code.
Try this..

Code: Select all

 int boot_from_jtag = ((getps(XS1_PS_BOOT_CONFIG) & 0x4) >> 2);
  if (!boot_from_jtag) { stuff that is only done when flashed }
Thanks a lot! I will, when Cristmas doesn't call on me so much!

Re: An error pin?

Posted: Thu Dec 22, 2016 6:18 pm
by aclassifier
I havent't tried your last suggestions, but here's this, probably some syntax error?

Code: Select all

../src/f_conversions.xc:83:28: error: asm output operand lacks `='
        asm(" ecallf %0" : "r" (0));
                           ^
../src/f_conversions.xc:83:28: error: lvalue required for asm output operand

Re: An error pin?

Posted: Thu Dec 22, 2016 6:24 pm
by henk
the : should be ::

Re: An error pin?

Posted: Thu Dec 22, 2016 11:02 pm
by aclassifier
Thanks:

_Aquarium.xe [xCORE Application]
xCORE Debugger (22:55 22.12.16) (Suspended)
tile[0] core[0] (Suspended)
tile[0] core[1] (Suspended)
tile[0] core[2] (Suspended)
tile[0] core[3] (Suspended)
tile[0] core[4] (Suspended: Signal 'ET_ECALL' received. Description: Application exception.)
5 ambient_light_sensor_ALS_PDIC243_to_string_ok() f_conversions.xc:83 0x0001274a
4 adafruit_display_ssd1306_128x32_i2c() adafruit_display_ssd1306_128x32_i2c.xc:349 0x00011798
3 test_and_display.select.case.4() _Aquarium.xc:142 0x000113ba
2 __main__main_tile_0_combined_tile_0_0() 0x00013c70
1 __start_core() 0x00016f44
xgdb (22:55 22.12.16)
/Users/teig/workspace/_Aquarium/bin/_Aquarium.xe (22:55 22.12.16)

However, the installExceptionHandler and myExceptionHandler is a separate means to do private matters and then have the core(s) stop. The above does standard run-time crash.

Thanks for the help, Henk! Happy Christmas!

Re: An error pin?

Posted: Fri Dec 23, 2016 9:00 am
by aclassifier
By the way, this spawned a new post at https://www.xcore.com/forum/viewtopic.php?f=7&t=5089

Re: An error pin?

Posted: Mon Mar 20, 2017 10:46 pm
by aclassifier
I don't seem find any thread where resetting (restarting) the startKIT in sw is described.

Re: An error pin?

Posted: Tue Mar 21, 2017 9:08 pm
by aclassifier
The above getps(XS1_PS_BOOT_CONFIG) yields 0x8001011e both when debug and flashed. So boot_from_jtag doesn't work.

I haven't found any documentation on the registers. Where is it? https://www.xmos.com/download/private/A ... 32A%29.pdf isn't it?

I get the myExceptionHandler to run ok but I haven't figured out how to restart the processor. I have searched.

on tile[0]: installExceptionHandler(); // Works only per tile. Don't know how to place one per tile, since
on tile[0].core[0]: installExceptionHandler(); // error: statement placed on a core must be call to combinable function

In other words, rather confused!

Re: An error pin?

Posted: Wed Apr 05, 2017 10:23 am
by aclassifier
By the way, since it was mentioned in this thread. No, there is no watcdog on the startKIT processor. See https://www.xcore.com/viewtopic.php?f=44&t=5738