Skip to content

Commit

Permalink
examples: freertos: zynqmp_amp_demo: enable Demo configuration vars t…
Browse files Browse the repository at this point in the history
…o be dynamic

Allow Shared memory, TTC and IPI values to be set dynamically. This will enable
the demos to be run on different platforms.

Signed-off-by: Ben Levinsky <[email protected]>
  • Loading branch information
bentheredonethat committed May 30, 2023
1 parent b8a3fdd commit 59a48ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
#define IPI_IER_OFFSET 0x18 /* IPI interrupt enable reg offset */
#define IPI_IDR_OFFSET 0x1C /* IPI interrupt disable reg offset */

#ifndef IPI_MASK
#define IPI_MASK 0x1000000 /* IPI mask for kick from APU.
We use PL0 IPI in this demo. */
#endif We use PL0 IPI in this demo. */

/* TTC counter offsets */
#define XTTCPS_CLK_CNTRL_OFFSET 0x0 /* TTC counter clock control reg offset */
Expand Down
10 changes: 10 additions & 0 deletions examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/sys_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@

#define INTC_DEVICE_ID XPAR_SCUGIC_0_DEVICE_ID

#ifndef IPI_IRQ_VECT_ID
#define IPI_IRQ_VECT_ID 65
#endif

#ifndef SHM_BASE_ADDR
#define SHM_BASE_ADDR 0x3ED80000
#endif

#ifndef TTC0_BASE_ADDR
#define TTC0_BASE_ADDR 0xFF110000
#endif

#ifndef IPI_BASE_ADDR
#define IPI_BASE_ADDR 0xFF310000
#endif

/* Default generic I/O region page shift */
/* Each I/O region can contain multiple pages.
Expand Down

0 comments on commit 59a48ab

Please sign in to comment.