gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > Code in IWRAM questions

#3027 - Dasuten - Sun Feb 16, 2003 8:22 pm

I'm having a problem putting some of my code into IWRAM. I'm using the macro:

Code:
#define CODE_IN_IWRAM __attribute__ ((section (".iwram"), long_call))

to (attempt to) do this. Functions with no arguments work...
Code:
 void fade_out() CODE_IN_IWRAM;

but this doesn't.
Code:
void xfade(const u16 *pic) CODE_IN_IWRAM;

It complains about conflicting types and how I previously declared it. What am I doing wrong?

#3036 - Dasuten - Sun Feb 16, 2003 11:09 pm

Never mind, I should have checked some older posts. All I had to do was add that macro in front of the function.