Well, I tried with ltrace and strace but got no useful info. Program is being killed by SISSEGV (Segmentation fault). I don't know if the source code for the libcal are available. I might have a look at it some day.. Cheers.
if (cal_read_block (cal_s, "r&d_mode", &tmp, &len, CAL_FLAG_USER) < 0) { cal_finish (cal_s); printf ("Failed to read R&D Mode area from CAL.\n"); return 2; }