typedef struct {
u8_t sz ;
u8_t str[];
} str_t;
#define DEF_STR(_n,_s) str_t _n = {sizeof(_s) - 1,_s}
DEF_STR(device1,"device");
DEF_STR(device2,"device2");
u8_t *p1 = (u8_t*)&device1;
u8_t *p2 = (u8_t*)&device2;
правда может выдать ворнинги при объявлении такой структуры