UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
8,239 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
Explorer
Explorer
15,601 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));

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

Re: Discarded input sections in Xilinx SDK map file

Jump to solution

Hello,

                    Someone please help..

Shalini

 

0 Kudos
Explorer
Explorer
15,602 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));

0 Kudos