Author Topic: Requirements for xil_printf on CPU1  (Read 588 times)

PitG

  • Active Member
  • *
  • Posts: 7
Requirements for xil_printf on CPU1
« on: October 16, 2021, 10:22:44 AM »
Hello,

   I've started application program on CPU1 TE0722 board. It works (controls green LED on board) but only without xil_printf function. When I add xil_printf function, CPU1 aborts and LED is not controlled even before xil_printf function in CPU1. What are requirements for xil_printf function on CPU1 ? CPU0 is inside FsblHandoff function and works OK. When I debug CPU1 application then xil_printf function works OK and CPU1 not abort.

All the best,
PitG

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1835
Re: Requirements for xil_printf on CPU1
« Reply #1 on: October 18, 2021, 07:17:13 AM »
Hi,
as I know there should be no special requirements.


Quote
When I debug CPU1 application then xil_printf function works OK and CPU1 not abort.
hm, strange.
Which external power supply did you use? Some current limit?  It is unlikely, but maybe you are somewhere close to the limit and when the second CPU starting faster, voltage drops down shortly and system stops?

Did you use the same FSBL when you generate the Boot.bin, like you has used for debugging?

Can you clean the project and generate the Boot.bin again, maybe something was not generated correctly.


br
John

PitG

  • Active Member
  • *
  • Posts: 7
Re: Requirements for xil_printf on CPU1
« Reply #2 on: October 19, 2021, 10:34:03 AM »
Hello,

  I had a problem with power supply long time ago, so now I use separate supply and problem with power supply is solved. I'm not an expert in SoC ZYNQ. It's only my hobby, so my project is not as good as it should be. I'm experimenting with it to achieve run both CPUs. I've started application in CPU1 by simply copying partition CPU1ap.elf from Flash into last region OCM, setting jump to the beginning of this region and waking up by sev instruction. I've spotted that "outputbyte(char c)" function, which is inside xil_printf works correctly, so I deduce that problem should be inside xil_printf function before "outputbyte(char c)" is called.

"Did you use the same FSBL when you generate the Boot.bin, like you has used for debugging? "   - this question is too complicated for me, so I can't answer this. Probably not. I test my project by writing it into flash first.

All the best,
PitG
 

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1835
Re: Requirements for xil_printf on CPU1
« Reply #3 on: October 19, 2021, 03:41:46 PM »
Quote
"Did you use the same FSBL when you generate the Boot.bin, like you has used for debugging? "   - this question is too complicated for me, so I can't answer this. Probably not. I test my project by writing it into flash first.

You wrote you xilprintf works when you start it with SDK (I assume you use the debugger which loads your FSBL with your the code directly into the OCM and starts it.). You can also generate a boot.bin with SDK. and I mean if you has use the same fsbl software project like you hast start it from SDK over debugger? Not that you have another FSBL. 

Maybe you should also ask on Xilinx forum, I can't help much more on this topic. This is internal Xilinx stuff.

PS: TE0722 is not the easiest board to learn how Xilinx Zynqand Xilinx software works.
br
John

PitG

  • Active Member
  • *
  • Posts: 7
Re: Requirements for xil_printf on CPU1
« Reply #4 on: October 20, 2021, 11:03:39 AM »
Hi,

   Yes, you're right.
   
   Although I am familiar with microcontrollers and SoC, Zynq 7000 is quite complicated and a lot of things are new for me and difficult to understand.
   Nevertheless I will try to go forward ( that's my hobby).
   TE0722 maybe is not the easiest board to learn, but it has lots of resources, is small and cheap, and that's its advantage.
 
Thank You for help,
PitG.