Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- From: "Göran Bilski" <goran.bilski@xxxxxxxxxx>
- Date: Fri, 14 Mar 2008 08:02:21 -0700
Hi,
We think we have found the problem.
Newlib(libc) functions which is reentrant uses the heap.
Your design didn't have any heap allocated at all so when these function
calls malloc it will grab memory which holds the interrupt vector.
These addresses will be overwritten and the program gets corrupted.
A very small heap size will fix the issue.
Göran
"Göran Bilski" <goran.bilski@xxxxxxxxxx> wrote in message
news:fqivp6$d371@xxxxxxxxxxxxxxxxxxxxx
Hi Rémy,
Can you provide me with the MicroBlaze configuration settings (or the
whole .mhs file)?
It looks like you get a hardware exception but you don't have a exception
handler.
What hardware exceptions have you enabled on MicroBlaze?
Göran
"Rémy" <thomasrt2008@xxxxxxxxx> wrote in message
news:f6cbd175-5bc5-4a9a-9b64-5e8a1b386299@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I just try the patch http://www.xilinx.com/support/answers/30051.htm
and the bug steal occurs if I have a "rand" or "srand" function in my
code.
When i stop the CPU under XMD it returns me the same adress:
0x820036a4
if i do "mb-objdump -x -D -S -t executable.elf > dump.out" to output a
dump file of my *.elf to see what there is at this address:
.section .text
.align 2
.ent _hw_exception_handler
_hw_exception_handler:
bri 0;
820036a4: b8000000 bri 0 // 820036a4
so apparently the code is crashed because of an exeption like the
problem in "Answer Record #29784 (http://www.xilinx.com/support/
answers/
29784.htm". Although i work on the last version of tools with the SP2
and the last patch....
I have tried my code on a PowerPC architecture with the same IP on the
same Hardware and I don't have the bug.
Rémy
.
- References:
- Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- From: Göran Bilski
- Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- From: Rémy
- Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- From: Göran Bilski
- Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- Prev by Date: Re: Xilinx S3DSP + EDK Board, too good to be true?
- Next by Date: Re: DDR3 speed, Altera vs Xilinx
- Previous by thread: Re: Xilinx's microblaze hangs when a timer interrupt occurs after a "rand()" instruction.
- Next by thread: clock distribution accross boards
- Index(es):
Relevant Pages
|