Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openamp xlnx mar5 #494

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions lopper/assists/openamp_xlnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,13 +1183,6 @@ def xlnx_rpmsg_parse(tree, node, openamp_channel_info, options, xlnx_options = N
if not ret:
return ret

if role == 'host':
for node in tree["/"].subnodes():
if "cdns,ttc" in node.propval('compatible'):
tree.delete(node)

xlnx_openamp_remove_channels(tree)

# remove definitions
try:
defn_node = tree["/definitions"]
Expand Down Expand Up @@ -1917,6 +1910,29 @@ def xlnx_openamp_parse(sdt, options, xlnx_options = None, verbose = 0 ):
if ret == False:
return ret

opts,args2 = getopt.getopt( args, "", [ "openamp_role=" ] )
if opts == [] and args2 == []:
print('ERROR: No arguments passed for OpenAMP Module. Erroring out now.')
return False

role = None
if xlnx_options != None:
role = xlnx_options["openamp_role"]
else:
for o,a in opts:
if o in ('-l', "--openamp_role"):
role = a
else:
print("Argument: ",o, " is not recognized. Erroring out.")
return False

if role == 'host':
for node in tree["/"].subnodes():
if "cdns,ttc" in node.propval('compatible'):
tree.delete(node)

xlnx_openamp_remove_channels(tree)

return True

def xlnx_openamp_rpmsg_expand(tree, subnode, verbose = 0 ):
Expand Down
5 changes: 3 additions & 2 deletions lopper/assists/openamp_xlnx_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,12 @@ def resolve_host_remote( tree, subnode, verbose = 0 ):
#define _AMD_GENERATED_H_

/* Interrupt vectors */
#ifdef USE_FREERTOS
#ifdef FREERTOS_BSP
#if defined (FREERTOS_BSP) || defined (USE_FREERTOS)
#define IPI_IRQ_VECT_ID $IPI_IRQ_VECT_ID_FREERTOS
#else
#define IPI_IRQ_VECT_ID $IPI_IRQ_VECT_ID
#endif /* USE_FREERTOS */
#endif /* FREERTOS_BSP */
#define POLL_BASE_ADDR $POLL_BASE_ADDR
#define IPI_CHN_BITMASK $IPI_CHN_BITMASK

Expand Down