Section Type Conflict IWRAM data + code

Post Reply
Posts: 3
Joined: Sat Mar 07, 2015 8:23 pm

Section Type Conflict IWRAM data + code

Post by g012 » Sat Mar 07, 2015 8:28 pm


How should I go to put data and code in IWRAM ? I've done the following:

Code: Select all

IWRAM_DATA static u32 s_frameCount;
IWRAM_CODE static void VBlank(void)
And I get:

Code: Select all

main.c:87:24: error: VBlank causes a section type conflict with s_frameCount
 IWRAM_CODE static void VBlank(void)
main.c:12:23: note: 's_frameCount' was declared here
 IWRAM_DATA static u32 s_frameCount;
Am I doing it wrong ?
Thank you.

Site Admin
Posts: 1403
Joined: Tue Aug 09, 2005 3:21 am
Location: UK

Re: Section Type Conflict IWRAM data + code

Post by WinterMute » Wed Mar 11, 2015 1:42 pm

The GBA linkscripts place data and bss in iwram by default so you don't need to explicitly mark writable data as being in the iwram section.

Being honest it's been so long since I touched GBA code that I really can't remember what the purpose of the IWRAM_DATA macro actually was. The compiler will complain if you try to place objects of different types into the same section within the same compilation unit.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest