Chances are that you need a unique node ID for each target device. One way to get such an ID is by defining the symbol FLOCKLAB_NODE_ID in your code:
// must be globaluint16_t FLOCKLAB_NODE_ID = 0xbeef; // any value is ok, will be overwritten by FlockLabvolatile uint16_t node_id; // must be volatile// somewhere in the codenode_id = FLOCKLAB_NODE_ID;
FlockLab will then automatically change this value to the observer ID before uploading the image to the targets (binary patching).
Note that some compilers might still remove the symbol FLOCKLAB_NODE_ID. To make sure it still exists in the final binary, you can use objdump to display the symbol table:
objdump -t [elf_file] | grep FLOCKLAB
If you want to assign a specific node ID to each target, you can do this by using the targetIds field in the XML configuration file.