[U-Boot-Users] static variables in u-boot.

Leonid Leonid at a-k-a.net
Sat Apr 14 04:33:13 CEST 2007


Hi:

Because u-boot reallocates itself, static/global variables cannot be
freely used there - if something is initialized using pointers on such
variables, they actually points to wrong addresses (may be on flash)
after reallocation.

What is simplest way to fix this problem - surely many people have
bumped into that?

U_BOOT_CMD macro kind of does the trick for entries of u-boot CLI, but
when I tried to mimic this logic buy organizing special section for my
variables, I have here and there, it didn't work. Probably I miss
something.

Does anybody have a suggestion?

Thanks,

Leonid.




More information about the U-Boot mailing list