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: 
Adventurer
Adventurer
2,029 Views
Registered: ‎10-11-2017

SDK Debug:exit directly

Jump to solution

Hello everyone!

I create Block Design include microblaze.After I download  code into my custom board successfully,I click 'Debug',It exit directly:

1.png

I have totally no idea why this is happen.There is a big array in my code.Is it related to memory allocation ,stack or heap size?I have try to expand the memory,stack and heap size.But it still doesn't work.

Can anybody help me?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
2,835 Views
Registered: ‎10-11-2017

Re: SDK Debug:exit directly

Jump to solution
I have solved it.I should expand microblaze local memory in VIVADO,not in the lscript.ld.
0 Kudos
8 Replies
Scholar hbucher
Scholar
2,015 Views
Registered: ‎03-22-2016

Re: SDK Debug:exit directly

Jump to solution

@kristen123 Can you step in?

You can make your BSP debug by adding "-O0 -g3" to the compiler flags.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Moderator
Moderator
2,009 Views
Registered: ‎09-12-2007

Re: SDK Debug:exit directly

Jump to solution

Can you share the compile log form the console please?

0 Kudos
Adventurer
Adventurer
1,989 Views
Registered: ‎10-11-2017

Re: SDK Debug:exit directly

Jump to solution

I can step in ,But it doesn't stop at main() function.

When I set '-g3 -O0',After download code successfully,click debug,It runs directly:2.png

When I click 'Suspend ',It shows:

3.png

 

0 Kudos
Adventurer
Adventurer
1,988 Views
Registered: ‎10-11-2017

Re: SDK Debug:exit directly

Jump to solution
13:40:36 **** Auto Build of configuration Debug for project ad9371_0105 ****
make all
'Building file: ../src/main.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/main.o" -I../../ad9371_0105_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
'Finished building: ../src/main.c'
' '
'Building target: ad9371_0105.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../ad9371_0105_bsp/microblaze_0/lib -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "ad9371_0105.elf" ./src/ad9371_data.o ./src/ad9528.o ./src/ad9528_data.o ./src/common.o ./src/jesd_core.o ./src/main.o ./src/mykonos.o ./src/mykonos_gpio.o ./src/mykonos_uesr.o ./src/platform_drivers.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
'Finished building target: ad9371_0105.elf'
' '
'Invoking: MicroBlaze Print Size'
mb-size ad9371_0105.elf |tee "ad9371_0105.elf.size"
text data bss dec hex filename
100936 100516 17039660 17241112 1071418 ad9371_0105.elf
'Finished building: ad9371_0105.elf.size'
' '

13:40:39 Build Finished (took 3s.335ms)
0 Kudos
Scholar hbucher
Scholar
1,983 Views
Registered: ‎03-22-2016

Re: SDK Debug:exit directly

Jump to solution

@kristen123 If you place 

xil_printf( "Hello world\n" );

somewhere at the start of main, do you see anything on the console?

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Adventurer
Adventurer
1,981 Views
Registered: ‎10-11-2017

Re: SDK Debug:exit directly

Jump to solution
I don't have uart in my custom board,It will run away when execute 'xil_printf'
0 Kudos
Scholar hbucher
Scholar
1,973 Views
Registered: ‎03-22-2016

Re: SDK Debug:exit directly

Jump to solution

@kristen123 You can debug through JTAG using MDM (Microblaze Debug Module).

https://www.xilinx.com/products/intellectual-property/opb_mdm.html

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Adventurer
Adventurer
2,836 Views
Registered: ‎10-11-2017

Re: SDK Debug:exit directly

Jump to solution
I have solved it.I should expand microblaze local memory in VIVADO,not in the lscript.ld.
0 Kudos