Hi,
can anyone confirm that XBURN's --id option is used to select the device in a particular position in the JTAG chain?
Sorry if this is a dumb question. I can't see this spelled out anywhere and I don't want to brick any boards while investigating.
Thanks.
XBURN --id option
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
-
- XCore Addict
- Posts: 224
- Joined: Tue Jan 17, 2017 9:25 pm
I think, like xFlash it is used to specify an xtag3 adapter. For example, in a situation where you have more than one programmer attached to a computer. Anyway, you might try it with xFlash before using xBurn?
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
This is correct
Technical Director @ XMOS. Opinions expressed are my own
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
OK thanks both. In my application I have five xmos devices, and I want to assign a serial number (and possibly additional hardware-specific info).
I'm assuming that I need to write the OTP for a particular tile and then access that information (e.g. using lib_otpinfo) with software on the same tile. Am I completely mistaken? If not, how do I write the serial number into the right device?
I'm assuming that I need to write the OTP for a particular tile and then access that information (e.g. using lib_otpinfo) with software on the same tile. Am I completely mistaken? If not, how do I write the serial number into the right device?
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Here's some code that might be useful
Code: Select all
#include <print.h>
#include <xs1.h>
#include <platform.h>
#include <stdlib.h>
#if defined(__XS3A__)
#include <otp3.h>
#define ADDR <PUT ADDRESS HERE>
#else
#include <otp.h>
#define ADDR <PUT ADDRESS HERE>
#endif
//Initialize the otp ports using the OTP_PORTS_INITIALIZER for each tile
on stdcore[0]: OTPPorts o0 = OTP_PORTS_INITIALIZER;
#if TILE_COUNT > 1
on stdcore[1]: OTPPorts o1 = OTP_PORTS_INITIALIZER;
#endif
#if TILE_COUNT > 2
on stdcore[2]: OTPPorts o2 = OTP_PORTS_INITIALIZER;
#endif
#if TILE_COUNT > 3
on stdcore[3]: OTPPorts o3 = OTP_PORTS_INITIALIZER;
#endif
//Customer specific data to be written to OTP
int prog(OTPPorts &op)
{
unsigned data[] = {0xbaddf00d};
// Program the key into the OTP row; this doesn't lock the OTP
// memory, so other rows can still be written later.
#if defined(__XS3A__)
if (!otp_program_differential(op, ADDR, data, sizeof(data)/sizeof(data[0]))
#else
char failmap[4];
if (!otp_program_no_repair(op, ADDR, data, sizeof(data)/sizeof(data[0]), failmap))
#endif
{
printstr("Failed to program OTP memory\n");
return 1;
}
printstrln("OTP memory successfully programmed\n");
return 0;
}
//Once compiled the program can be run using...
//xrun --adapter-id <N> --io <bin_name>.xe
//and all being well otp memory shall be programmed with the above data.
int main() {
par {
on tile[0]: prog(o0);
#if TILE_COUNT > 1
on tile[1]: prog(o1);
#endif
#if TILE_COUNT > 2
on tile[2]: prog(o2);
#endif
#if TILE_COUNT > 3
on tile[3]: prog(o3);
#endif
}
return 0;
}
Technical Director @ XMOS. Opinions expressed are my own
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
Thanks Ross, I hadn't thought about doing it that way. So does that mean that XBURN can't select a particular device in a JTAG chain?
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
No, you need to make a program to do that at the moment AFAIK.
Technical Director @ XMOS. Opinions expressed are my own
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
OK. Thanks again.