We are planning production using the photon. We currently have a JTAG programmer integrated into our production line. Is it possible to deviceID using JTAG? This would prevent us from having to connect a cable to serial just to get the device ID.
Presumably it’s in the flash somewhere . Try getting a the spark ID from a device, and search the memory for that string of bytes. According to https://github.com/spark/docs/issues/82 it’s in DCT + 1852 … so try address 0x800873c or 0x800473c.
That said, I believe if you clear the DCT the device firmware regenerates it, so try searching the source for how the value is generated and you can always do it yourself.
The device ID is simply the stm32 device id, so retrieving that via JTAG will suffice.
I didn’t have any luck using st-link, but no problem with openocd:
$ openocd & $ arm-none-eabi-gdb (gdb) target remote:3333 Remote debugging using :3333 0x00000000 in ?? () (gdb) monitor mdw 0x1FFF7A10 3 0x1fff7a10: fe4ad031 3034510e 32313535
The DCT does contain something called device ID (which in retrospect would have been better named as something else!) This isn’t the same as the cloud device ID but 6 random characters to uniquely identify the device on packaging and in SoftAP mode.
I have the programming items on order. Thanks