cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
450 Views
Registered: ‎10-01-2018

Can I update PS program using PL?

Hello.

Can Zynq be used to change only PS program from PL (FPGA)?
It is assumed that booting is performed from the SD card, and the update program is written in the DDR memory.

The flow is like this.
1. Receive program from LAN at PL
2. Write to DDR memory with PL
3. Restart PS
4. PS program is updated

I could not find the material. Is there a document etc somewhere?

 

thank you

0 Kudos
3 Replies
Highlighted
Teacher
Teacher
436 Views
Registered: ‎06-16-2013

Hi @nishihara

 

Why don't you use "Self-modifying code" on PS side ?

It's simple way to resolve your issue.

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
406 Views
Registered: ‎10-01-2018

Thank you for your reply.


Would you tell us how to use "Self-modifying code"?
Is it in such a form as to jump to address 0 by rewriting OCM?

I tried creating a program to jump to address 0 and found that it caught on Xil_ExceptionNullHandler.

 

   typedef int (*FN_PROGRAM)(void);

    memadr = 0x00000000;// adr 0
    FN_PROGRAM pg = (FN_PROGRAM)memadr;
    (*pg)();

 

0 Kudos
Highlighted
Teacher
Teacher
379 Views
Registered: ‎06-16-2013

Hi @nishihara

 

Which type do you develop, application run on OS or bearmetal software ?

If it is bearmetal software, you don't execute "jump 0" operation.

Would you refer the following URL ?

 

https://en.wikipedia.org/wiki/Self-modifying_code

 

If you give some information, I may be able to help you...

 

Best regards,

0 Kudos