Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Inter application calling problem

Hi all,

We currently are using Nios-I and are busy porting our stuff to Nios-II.

For in-field updates we use a separate bootrom and application. We also have some low-level hardware access functions included in this bootrom and made a call-interface from the application to the bootrom. For the Nios-II this means trouble because the compiler uses the GP register to access data relatively, and of cause the value of GP is different for bootrom and application.

Is it possible to tell the compiler to access all data absolute? Or to till him that a certain function is called from an other application or something?

Regards,

Tim Brugman.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Use the -G 0 option to tell the compiler not to access data via the gp register. This will of course reduce your performance a little.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi wombat,

    Thank you very much. I tried it and it works fine. The performance loss is only in the bootrom, so it will not be any problem for us.

    Greetz,

    Tim.