14.2.10. U-Boot Doesn't Run after Upgrading my Compiler
- Question:
- I encountered a big problem that u-boot 1.1.4 compiled by eldk 4.1 for mpc82xx crashed.
But if I build it using gcc-3.4.6 based cross tools, u-boot on my board boots correctly.
u-boot built by eldk 4.1 (gcc-4.0) failed, nothing occurs on the serial port.
- Answer:
- This is often a missing
volatile
attribute on shared variable references, particularly hardware registers. Newer compiler versions optimize more aggressively, making missingvolatile
attributes visible.
If you use -O0 (no optimization) does it fix the problem? If it does, it most likely is an optimization/volatile issue. The hard part figuring out where. Device handling and board-specific code is the place to start.
14.2.9. Porting Problem: cannot move location counter backwards | 1. Abstract | 14.2.11. How Can I Reduce The Image Size? | |||
Prev | Home | Next | |||