2011-02-21 05:40:45     -mstack-check-l1 with FDPIC binary

Document created by Aaronwu Employee on Oct 16, 2013
Version 1Show Document
  • View in full screen mode

2011-02-21 05:40:45     -mstack-check-l1 with FDPIC binary

Alf Nilsson (SWEDEN)

Message: 98288   

 

Hi all,

 

I am trying to debug the stack (mis-)usage of an FDPIC application, so I added the compile flag "-mstack-check-l1" to the compiler settings in eclipse.

 

But each time I try to run the application I get a SEGV. (On the target board)

 

So I tried to make a simple "Hello world c++ FDPIC application" and added the "-mstack-check-l1" flag.

 

And all I get in the console when I start the application is SEGV.

 

I am using the 2010-R5 toochain.

 

I am compiling for a BF-561 v0.5 DSP on a custom board.

 

Any hints or ideas what I shold be looking at?

 

Cheers,

 

//Alf

QuoteReplyEditDelete

 

 

2011-02-21 05:42:01     Re: -mstack-check-l1 with FDPIC binary

Alf Nilsson (SWEDEN)

Message: 98289   

 

Hi again,

 

Of course I meant the 2010R1-RC5 toolchain.

 

Regards,

 

//Alf

QuoteReplyEditDelete

 

 

2011-02-21 07:29:05     Re: -mstack-check-l1 with FDPIC binary

Alf Nilsson (SWEDEN)

Message: 98292   

 

Hi all,

 

I did the same test on a BF-561-EZ-Kit and it worked like a charm.

 

So what could cause a SEGV on a custom board?

 

Missing library files? If so, which are needed to use the stack check?

 

That we have SMP enabled?

 

Or does anyone have any more suggestions?

 

Regards,

 

//Alf

QuoteReplyEditDelete

 

 

2011-02-21 10:09:13     Re: -mstack-check-l1 with FDPIC binary

Mike Frysinger (UNITED STATES)

Message: 98295   

 

-mstack-check-l1 wont work on SMP

QuoteReplyEditDelete

 

 

2011-02-21 10:26:00     Re: -mstack-check-l1 with FDPIC binary

Alf Nilsson (SWEDEN)

Message: 98300   

 

Thanks Mike for the input.

 

Doesn't work and never will?

 

Or

 

Doesn't work but maybe some day in a distant future?

 

Regards,

 

//Alf

QuoteReplyEditDelete

 

 

2011-02-21 10:42:24     Re: -mstack-check-l1 with FDPIC binary

Mike Frysinger (UNITED STATES)

Message: 98301   

 

never will work.  it uses on-chip sram.

 

you can easily workaround it by using taskset to force the process to only run on core 0.

Attachments

    Outcomes