I've done quite a bit of work with using the Cortex A9 on the Zeboard, and as such am at home in the tools flow. I also have a Nexys4 DDR, and need a processor for a project I'm working on...so I figured I'd give the Microblaze a whirl. I did the Hello World tutorial that is on the Digilent site...pretty straightforward, except for one strange bit of behavior:
When I run my hello world app, main runs twice, both in debug and release mode. I stepped through the code, and it appears that somewhere in cleanup_platform(), main gets invoked again (recursively). This ends up running init_platform() again, as well as printing my message to the screen twice.
I am going to see if I can track down where in cleanup_platform() this is happening, but was wondering if somebody else has seen this, and can offer an explanation and/or fix?
My design is completely according to the tutorial right now...I haven't added any of my own HW logic or additional SW code yet.
UPDATE: I did some further debugging, and it looks like this happens during the call to Xil_ICacheInvalidate() (xil_cache.c). Getting more specific is difficult as it appears to happen some time during the loop in microblaze_invalidate_icache.S line 70. I'm no expert with the MB ISA yet, but can certainly deduce that this is walking each cache line, and I'm assuming, marking them as invalid.
While doing this debugging, I actually got the processor into a state where this recursive call into main would continue as long as I'd let it, each time, printing out a new message. Very strange.
Question
dnovick
I've done quite a bit of work with using the Cortex A9 on the Zeboard, and as such am at home in the tools flow. I also have a Nexys4 DDR, and need a processor for a project I'm working on...so I figured I'd give the Microblaze a whirl. I did the Hello World tutorial that is on the Digilent site...pretty straightforward, except for one strange bit of behavior:
When I run my hello world app, main runs twice, both in debug and release mode. I stepped through the code, and it appears that somewhere in cleanup_platform(), main gets invoked again (recursively). This ends up running init_platform() again, as well as printing my message to the screen twice.
I am going to see if I can track down where in cleanup_platform() this is happening, but was wondering if somebody else has seen this, and can offer an explanation and/or fix?
My design is completely according to the tutorial right now...I haven't added any of my own HW logic or additional SW code yet.
UPDATE: I did some further debugging, and it looks like this happens during the call to Xil_ICacheInvalidate() (xil_cache.c). Getting more specific is difficult as it appears to happen some time during the loop in microblaze_invalidate_icache.S line 70. I'm no expert with the MB ISA yet, but can certainly deduce that this is walking each cache line, and I'm assuming, marking them as invalid.
While doing this debugging, I actually got the processor into a state where this recursive call into main would continue as long as I'd let it, each time, printing out a new message. Very strange.
Thanks,
Dave
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.