|
From: Adrien Prost-B. <adr...@la...> - 2014-05-21 16:42:47
|
> > I also run Valgrind on the recompiled xc3sprog, and the errors still > > appear! So there something else not linked to devices not found. > > "Conditional jump or move depends on uninitialised value(s)" > > Yes, it looks like an uninitialized member variable in class IOXPC. > I don't dare touch that code unless I have an actual XPC board on my > desk to test with. > > It would be great if you can fix these issues on your setup. The JTAG > cable drivers are mostly talking to scarcely documented reverse > engineered firmware. So any change must be carefully tested to make > sure it doesn't break stuff. I investigated these Valgrind errors. All are related to the field "subtype" of class "IOXPC" being uninitialized. In all the source files, this field is only used to test if its value is XPC_INTERNAL (defined to 1 at ioxpc.h:37). And it is the only value this field is set to in all source files. So the intended behaviour is without doubt an initialization at zero. The solution is to add the initialization "subtype(0)" to ioxpc.cpp:40 I recompiled and successfully programming the XUPV5 board. Valgrind is happy now. I don't have more HW available to test, but given the low criticality of the fix this should be enough ? Adrien |