Power PC bootloader - issue in calling function from other files

Hi,

I am developing a bootloader for Power PC.

  1. The bootloader is comprised of bootstrap and bootloader application.
  2. The bootstrap runs from the flash, copies the bootlaoder to the RAM an runs the bootloader from the RAM.
  3. The bootloader needs to uncompress the Main Image in the flash and run the main image from RAM.

I am sucessful in the bootstrap and the bootloader to some extent.

I have an issue while executing the zlib inflate routines from the Vxwork tool chain.

The bootloader is made of 2 object files bootloader.c and inflate.c. The bootloader.c calls infalte() in inflate.c I am able to link and run the bootloader, but the call to inflate fails. The execution does not reach the inflate() on calling it.

I tried a work around, move the inflate()definition in the inflate.c a the first function definition in inflate.c. This works !!!. But further call from infalte() to other functions i infalte.c() have the same issue.

I am using the VxWorks GNU compiler for compiling and building m sources.

Please help me in this regard.

Regards, Jagan

Reply to
jagan_cp
Loading thread data ...

Hi , With info provided by you it looks like a linker script file error i.e. Virtual load address /logical load address problem.

BR Rate

Reply to
ratemonotonic

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.