Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Calling Thumb ROM code from ARM IWRAM code   Message List  
Reply | Forward Message #12616 of 15019 |
Hi,

I'm trying to call Thumb ROM code from an ARM IWRAM routine.
Unfortunately, I get error messages like this:

Fastcode.text.iwram.o(.iwram+0xbd4): relocation truncated to fit:
R_ARM_PC24 CreateObject

To fix this I believe I need to mark the original declaration of
CreateObject() as being in ROM as follows:

#define CODE_IN_ROM __attribute__ ((section (".text"), long_call))

OBJECT* CreateObject( const STRUCTURE* StructureRef, int x, int y, int
rxy ) CODE_IN_ROM;

However, it won't compile unless I also change the definition of the
original function as follows:

CODE_IN_ROM OBJECT* CreateObject( const STRUCTURE* StructureRef, int x,
int y, int rxy )
{
// code here
}

This compiles and links ok, but the CreateObject() function no longer
works even though there weren't any problems before. Any ideas?

Thanks for your help,
James.
--
/\ apex James Daniels
//\\ designs james.daniels@...
//__\\ http://www.apex-designs.net






Thu Sep 5, 2002 5:12 pm

j_r_daniels
Offline Offline
Send Email Send Email

Forward
Message #12616 of 15019 |
Expand Messages Author Sort by Date

Hi, I'm trying to call Thumb ROM code from an ARM IWRAM routine. Unfortunately, I get error messages like this: Fastcode.text.iwram.o(.iwram+0xbd4): relocation...
James Daniels
j_r_daniels
Offline Send Email
Sep 5, 2002
5:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help