
27 Mar
2014
27 Mar
'14
8:40 a.m.
Hi Stefan,
Le Thu, 27 Mar 2014 08:05:10 +0100, Stefan Roese sr@denx.de a écrit :
Yes, I agree. #ifdef's are ugly. But code duplication is also a problem as Wolfgang has mentioned.
Isn't there a way to detect the board type at runtime somehow (via CPU type or GPIO input, ...)? And then dynamically configure the board either for "RiOT" or "MarS"? This would make the code a bit more complex of course. But there would be no #ifdef's and no code duplication. And you would only have to maintain one U-Boot binary / version for both boards.
So, what do you think? Is this possible?
Thanks for the idea, that's possible by detecting i.MX6Solo vs i.MX6Dual. I'll try to implement that.
Eric