Hi! It's been a long time since everyone's fighting with u-boot-sam460ex code which is very bad, suffers from countless issues.
For one, it does not compile for quite a long time with current compilers. For example, here are changes which I apply to this code when building things on Debian: https://salsa.debian.org/qemu-team/qemu/-/tree/master/debian/patches/ (see u-boot-sam460ex-* files in there). I just created another patch, u-boot-sam460ex-build.patch, to address numerous new issues revealed by gcc-14 and its new defaults in Debian. Please note that most of the last patch are actually just workarounds, not real fixes, - real fixes needs much more than that. For example, there are a LOT of *conflicting* function declarations in .c files where the functions are being used, instead of writing them in a common .h file and including in both users and where it's defined. There are a lot of free conversions between pointer and integer. Some of the functions almost always used with a pointer but expects an integer, or vise versa. This code is awful. But. Can at least this minimal set of changes be comitted, to let this source to be compiled at least somehow? For the benefit of everyone. The last patch (-build) also fixes a real bug: char arr[8] = { 0 }; - i2c_write(0x68, 0x08, 1, &arr, 8); + i2c_write(0x68, 0x08, 1, arr, 8); Thanks, /mjt