Run program from xTc with switched-on OTP security module

If you have a simple question and just want an answer.
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Run program from xTc with switched-on OTP security module

Post by ffomich »

Hi,
I burned OTP of my XE216-512-TQ128 based board with command

Code: Select all

xburn --target-file my_target.xn --lock my_keys.dat --serial-number 0002 --mac-address 00:22:97:80:03:30 --mac-address 00:22:97:80:03:31 --enable-jtag --disable-master-lock
Then I downloaded encrypted factory + update firmware images to FLASH.

Code: Select all

xflash --factory %1 0x10000 --loader loader.xc --boot-partition-size 0x40000 --target-file my_target.xn --upgrade 1 %2 --key my_keys.dat -o flash_image.bin --noinq

xflash --target-file my_target.xn --write-all flash_image.bin
My board powered up correctly.

I try to start my program from xTIMEcomposer using "Run" button but it fails with error:

Code: Select all

xrun: First stage multi-node boot failed, please check XN file and XMOS link connectivity
My program starts correctly from xTIMEcomposer only if FLASH memory is empty (erased).

Is it normal behavior?


ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

I setup new empty QSPI FLASH chip on my board.

As I mentioned in previous post OTP memory has data:

Code: Select all

>xburn --target-file my_target.xn --lock my_keys.dat --serial-number 0002 --mac-address 00:22:97:80:03:30 --mac-address 00:22:97:80:03:31 --enable-jtag --disable-master-lock
I can run my program from xTc successfully.

After that I create FLASH image and download it in FLASH:

Code: Select all

>xflash --factory factory_fw.xe 0x10000 --loader loader.xc --boot-partition-size 0x40000 --target-file my_target.xn --upgrade 1 upgrade_fw.xe --key my_keys.dat -o flash_image.bin --noinq

>xflash --target-file my_target.xn --write-all flash_image.bin
After that board starts after power up correctly.

But all these commands fails:
1. Rewrite FLASH image

Code: Select all

>xflash --target-file my_target.xn --write-all flash_image.bin
Error: F03075 Failed to correctly execute flash writing app.
2. Read FLASH memory

Code: Select all

>xflash --target-file "my_target.xn"  --read-all -o flash_data.txt"
xrun: First stage multi-node boot failed, please check XN file and Xmos link con
nectivity
Error: F03075 Failed to correctly execute flash reading app.
3. Erase FLASH memory

Code: Select all

>xflash --target-file "my_target.xn" --erase-all"
xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
      [Switching to tile[0] core[2]]
      0x000405ec in __lock_recursive_acquire ()

Error: F03075 Failed to correctly execute flash erasing app.
4. Read OTP memory

Code: Select all

>xburn  --target-file "my_target.xn" --read
xrun: First stage multi-node boot failed, please check XN file and Xmos link connectivity
xburn: error: reading device failed
I don't understand why is it so.
May be one of my command set security flags --disable-jtag and/or --enable-master-lock in OTP?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

What is the tools version used to write the OTP?
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

14.1.0
huw
Member++
Posts: 28
Joined: Thu Jan 28, 2010 10:41 am

Post by huw »

This is related to xTIMEcomposer v14.0.x and v14.1.x. The problem should be fixed in v14.2.1. I've published an advisory on the issue at:

http://www.xmos.com/published/tools-adv ... programmed

Huw