cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
8,473 Views
Registered: ‎05-31-2015

Discarded input sections in Xilinx SDK map file

Jump to solution

Hello,

 

          In my SDK application's map file I get 'Discarded input sections' heading and many needed objects like microblaze_disable_dcache.o come under this. Why do this happen ? Suggest me a way to avoid Discarding any sections in xilinx map file. I already tried regenerating linker script, but no effect. Below given is my program:

 

#include "xparameters.h"
#include "platform.h"
#include "mb_interface.h"

#define MINE_ADDRESS (XPAR_MPMC_0_MPMC_BASEADDR + 0x00000000)
unsigned int * MinePtr;
int main()
{
#if MICROBLAZE_EXCEPTIONS_ENABLED == 1
microblaze_enable_exceptions();
#endif

#if XPAR_MICROBLAZE_USE_ICACHE == 1
microblaze_invalidate_icache();
microblaze_disable_icache();
#endif

#if XPAR_MICROBLAZE_USE_DCACHE == 1
microblaze_invalidate_dcache();
microblaze_disable_dcache();
#endif


MinePtr = (unsigned int *)MINE_ADDRESS;

*MinePtr = 0x347;
int i;
for (i=1;i<50;i++);
microblaze_enable_dcache();
*MinePtr = 0x34765;
microblaze_flush_dcache();
microblaze_disable_dcache();
 *MinePtr = 0x221;
while(1){}
}

 

With Regards

Shalini

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
15,835 Views
Registered: ‎05-31-2015

Re: Discarded input sections in Xilinx SDK map file

Jump to solution

Hello,

 

 Finally I got solution. Simply put KEEP attribute for sections you want to preserve in linker script(opened with text editor). like

Replace (.text) with

KEEP((.text));

View solution in original post

0 Kudos
2 Replies
Highlighted
Explorer
Explorer
8,367 Views
Registered: ‎05-31-2015

Re: Discarded input sections in Xilinx SDK map file

Jump to solution

Hello,

                    Someone please help..

Shalini

 

0 Kudos
Highlighted
Explorer
Explorer
15,836 Views
Registered: ‎05-31-2015

Re: Discarded input sections in Xilinx SDK map file

Jump to solution

Hello,

 

 Finally I got solution. Simply put KEEP attribute for sections you want to preserve in linker script(opened with text editor). like

Replace (.text) with

KEEP((.text));

View solution in original post

0 Kudos