summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Nelson <sam.nelson@ti.com>2018-04-11 16:49:30 -0400
committerSam Nelson <sam.nelson@ti.com>2018-08-09 16:01:32 -0400
commit207bd2b6240ef3ea8333712aa4783e46b19e27b2 (patch)
tree80944afb04e0430e5a2d6bc31132703c3393059e
parentaf370844cff8d05e7d9cfa3dc02e9b2b2e23775c (diff)
downloadipc-207bd2b6240ef3ea8333712aa4783e46b19e27b2.tar.gz
Resource: Update to handle resource table area using linker symbol
- Modified to place memory only if loadSegment is defined - For new platforms, SYSBIOS will not handle platform memory map. So the linker command file is external. Only way to get the start address is using the external linker symbol. - Added new variable loadSymbol to allow setting the tableptr using symbol Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r--packages/ti/ipc/remoteproc/Resource.xdc10
-rw-r--r--packages/ti/ipc/remoteproc/Resource.xs14
2 files changed, 17 insertions, 7 deletions
diff --git a/packages/ti/ipc/remoteproc/Resource.xdc b/packages/ti/ipc/remoteproc/Resource.xdc
index 8051cfc..33124aa 100644
--- a/packages/ti/ipc/remoteproc/Resource.xdc
+++ b/packages/ti/ipc/remoteproc/Resource.xdc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2018, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,14 @@ module Resource {
metaonly config String loadSegment;
/*!
+ * @def Resource_loadSymbol
+ * @brief If loadSymbol is defined, loadAddr is overridden with the
+ * loadSymbol as external pointer
+ */
+ metaonly config String loadSymbol;
+
+
+ /*!
* @def Resource_traceOnly
* @brief Set traceOnly to true in order to get an image with trace
* resources only, and without VRINGs.
diff --git a/packages/ti/ipc/remoteproc/Resource.xs b/packages/ti/ipc/remoteproc/Resource.xs
index 59a4e69..f4c4122 100644
--- a/packages/ti/ipc/remoteproc/Resource.xs
+++ b/packages/ti/ipc/remoteproc/Resource.xs
@@ -57,12 +57,11 @@ function module$use()
this.$logError("Resource.loadSegment not found", this);
}
addr = segment.base;
+ /* The .resource_table section should always be at the segment base */
+ Program.sectMap[".resource_table"] = new Program.SectionSpec();
+ Program.sectMap[".resource_table"].type = "NOINIT";
+ Program.sectMap[".resource_table"].loadAddress = addr;
}
-
- /* The .resource_table section should always be at the segment base */
- Program.sectMap[".resource_table"] = new Program.SectionSpec();
- Program.sectMap[".resource_table"].type = "NOINIT";
- Program.sectMap[".resource_table"].loadAddress = addr;
}
function module$static$init(obj, params)
@@ -80,8 +79,11 @@ function module$static$init(obj, params)
if (null == segment) {
this.$logError("Resource.loadSegment not found", this);
}
-// print("Resource.loadSegment", Resource.loadSegment);
addr = segment.base;
+ } else {
+ if (Resource.loadSymbol != undefined) {
+ addr = $externPtr(Resource.loadSymbol);
+ }
}
/* Assign the addresses for the module state variables */