diff options
author | Chris Ring | 2013-10-23 14:30:08 -0500 |
---|---|---|
committer | Chris Ring | 2013-10-23 15:08:54 -0500 |
commit | 507f8c2d1c7fce5fb8ae0ed8fa223d4160367ca1 (patch) | |
tree | 2930256765a204776a37f2645a99d404b7c60be2 | |
parent | 7ce8d04631db0da53fa23506a64bca45b9081340 (diff) | |
download | fcdev-507f8c2d1c7fce5fb8ae0ed8fa223d4160367ca1.tar.gz fcdev-507f8c2d1c7fce5fb8ae0ed8fa223d4160367ca1.tar.xz fcdev-507f8c2d1c7fce5fb8ae0ed8fa223d4160367ca1.zip |
ECPY: Add C66_big_endian support
This introduces C66_big_endian support for ECPY.
Also, some makefiles and build scripts were updated to align with
the latest in the FC 3.24 stream.
This addresses SDOCM00104662.
-rw-r--r-- | fc.bld | 2 | ||||
-rw-r--r-- | fc.mak | 1 | ||||
-rw-r--r-- | packages/ti/sdo/fc/ecpy/ecpy_directsetfinal.h | 8 | ||||
-rw-r--r-- | packages/ti/sdo/fc/ecpy/ecpy_setfinal.h | 16 | ||||
-rw-r--r-- | packages/ti/sdo/fc/ecpy/ecpy_start.h | 9 | ||||
-rw-r--r-- | packages/ti/sdo/fc/ecpy/ecpy_util.h | 21 | ||||
-rw-r--r-- | products.mak | 18 |
7 files changed, 51 insertions, 24 deletions
@@ -85,6 +85,7 @@ var ccOpts = { | |||
85 | "ti.targets.elf.C64P" : c6xOpts, | 85 | "ti.targets.elf.C64P" : c6xOpts, |
86 | "ti.targets.elf.C64T" : c6xOpts, | 86 | "ti.targets.elf.C64T" : c6xOpts, |
87 | "ti.targets.elf.C66" : c6xOpts, | 87 | "ti.targets.elf.C66" : c6xOpts, |
88 | "ti.targets.elf.C66_big_endian" : c6xOpts, | ||
88 | 89 | ||
89 | "ti.targets.elf.C674" : c6xOpts, | 90 | "ti.targets.elf.C674" : c6xOpts, |
90 | "ti.targets.arm.elf.M3" : " --embed_inline_assembly -ms -pds=71", | 91 | "ti.targets.arm.elf.M3" : " --embed_inline_assembly -ms -pds=71", |
@@ -151,6 +152,7 @@ for (arg = 0; arg < arguments.length; arg++) { | |||
151 | element[modCfgIndex[j]] = modCfgValue; | 152 | element[modCfgIndex[j]] = modCfgValue; |
152 | } | 153 | } |
153 | 154 | ||
155 | /* and finally add this target to the Build.targets array */ | ||
154 | Build.targets.$add(target); | 156 | Build.targets.$add(target); |
155 | } | 157 | } |
156 | 158 | ||
@@ -86,6 +86,7 @@ XDCARGS= \ | |||
86 | ti.targets.elf.C64P=\"$(ti.targets.elf.C64P)\" \ | 86 | ti.targets.elf.C64P=\"$(ti.targets.elf.C64P)\" \ |
87 | ti.targets.elf.C64T=\"$(ti.targets.elf.C64T)\" \ | 87 | ti.targets.elf.C64T=\"$(ti.targets.elf.C64T)\" \ |
88 | ti.targets.elf.C66=\"$(ti.targets.elf.C66)\" \ | 88 | ti.targets.elf.C66=\"$(ti.targets.elf.C66)\" \ |
89 | ti.targets.elf.C66_big_endian=\"$(ti.targets.elf.C66_big_endian)\" \ | ||
89 | ti.targets.elf.C674=\"$(ti.targets.elf.C674)\" | 90 | ti.targets.elf.C674=\"$(ti.targets.elf.C674)\" |
90 | 91 | ||
91 | # | 92 | # |
diff --git a/packages/ti/sdo/fc/ecpy/ecpy_directsetfinal.h b/packages/ti/sdo/fc/ecpy/ecpy_directsetfinal.h index efb3d42..6c89ac9 100644 --- a/packages/ti/sdo/fc/ecpy/ecpy_directsetfinal.h +++ b/packages/ti/sdo/fc/ecpy/ecpy_directsetfinal.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012, Texas Instruments Incorporated | 2 | * Copyright (c) 2012-2013, Texas Instruments Incorporated |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -56,7 +56,7 @@ Void ECPY_directSetFinal(ECPY_Handle pHandle, short transferNo) | |||
56 | /* IRES assigned info is cached in the handle */ | 56 | /* IRES assigned info is cached in the handle */ |
57 | ECPY_ScratchObj * iresHandle = handle; | 57 | ECPY_ScratchObj * iresHandle = handle; |
58 | 58 | ||
59 | IRES_EDMA3CHAN_PaRamStruct *paRamThis = (IRES_EDMA3CHAN_PaRamStruct *) | 59 | PaRamStructPtr paRamThis = (PaRamStructPtr) |
60 | iresHandle->assignedPaRamAddresses[transferNo-1]; | 60 | iresHandle->assignedPaRamAddresses[transferNo-1]; |
61 | short numTotalPaRams = iresHandle->assignedNumPaRams; | 61 | short numTotalPaRams = iresHandle->assignedNumPaRams; |
62 | short prevFinal = handle->finalTransferNo; | 62 | short prevFinal = handle->finalTransferNo; |
@@ -89,10 +89,10 @@ Void ECPY_directSetFinal(ECPY_Handle pHandle, short transferNo) | |||
89 | * final, unless it is the last PaRam allocated to the channel. | 89 | * final, unless it is the last PaRam allocated to the channel. |
90 | */ | 90 | */ |
91 | if ( (prevFinal < numTotalPaRams) && (prevFinal != transferNo)) { | 91 | if ( (prevFinal < numTotalPaRams) && (prevFinal != transferNo)) { |
92 | IRES_EDMA3CHAN_PaRamStruct *paRamPrevFinal; | 92 | PaRamStructPtr paRamPrevFinal; |
93 | 93 | ||
94 | /* modify the assigned Physical PaRAM directly */ | 94 | /* modify the assigned Physical PaRAM directly */ |
95 | paRamPrevFinal = (IRES_EDMA3CHAN_PaRamStruct *) | 95 | paRamPrevFinal = (PaRamStructPtr) |
96 | iresHandle->assignedPaRamAddresses[prevFinal-1]; | 96 | iresHandle->assignedPaRamAddresses[prevFinal-1]; |
97 | /* IRES assigned addresses cached in the handle */ | 97 | /* IRES assigned addresses cached in the handle */ |
98 | paRamPrevFinal->link = (unsigned short) | 98 | paRamPrevFinal->link = (unsigned short) |
diff --git a/packages/ti/sdo/fc/ecpy/ecpy_setfinal.h b/packages/ti/sdo/fc/ecpy/ecpy_setfinal.h index 110ea0c..75465f3 100644 --- a/packages/ti/sdo/fc/ecpy/ecpy_setfinal.h +++ b/packages/ti/sdo/fc/ecpy/ecpy_setfinal.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012, Texas Instruments Incorporated | 2 | * Copyright (c) 2012-2013, Texas Instruments Incorporated |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -78,7 +78,7 @@ static __inline | |||
78 | #endif | 78 | #endif |
79 | Void ECPY_setFinal(ECPY_Handle pHandle, short transferNo) | 79 | Void ECPY_setFinal(ECPY_Handle pHandle, short transferNo) |
80 | { | 80 | { |
81 | IRES_EDMA3CHAN_PaRamStruct *paRamThis; | 81 | PaRamStructPtr paRamThis; |
82 | ECPY_ScratchObj *handle = pHandle->scratchPtr; | 82 | ECPY_ScratchObj *handle = pHandle->scratchPtr; |
83 | 83 | ||
84 | /* use handle with cached IRES info */ | 84 | /* use handle with cached IRES info */ |
@@ -110,16 +110,16 @@ Void ECPY_setFinal(ECPY_Handle pHandle, short transferNo) | |||
110 | * Reset the link id of the previous transfer that was configured as | 110 | * Reset the link id of the previous transfer that was configured as |
111 | * final, unless it is the last PaRam allocated to the channel. | 111 | * final, unless it is the last PaRam allocated to the channel. |
112 | */ | 112 | */ |
113 | if ( (prevFinal < numTotalPaRams) && (prevFinal != transferNo)) { | 113 | if ((prevFinal < numTotalPaRams) && (prevFinal != transferNo)) { |
114 | IRES_EDMA3CHAN_PaRamStruct *paRamPrevFinal; | 114 | PaRamStructPtr paRamPrevFinal; |
115 | 115 | ||
116 | /* If prevFinal was 1st xfer, update the shadow PaRAMs . */ | 116 | /* If prevFinal was 1st xfer, update the shadow PaRAMs . */ |
117 | if (prevFinal == 1) { | 117 | if (prevFinal == 1) { |
118 | paRamPrevFinal = handle->firstPARAMShadow; | 118 | paRamPrevFinal = (PaRamStructPtr)(handle->firstPARAMShadow); |
119 | 119 | ||
120 | } else { | 120 | } else { |
121 | /* modify the assigned Physical PaRAM directly */ | 121 | /* modify the assigned Physical PaRAM directly */ |
122 | paRamPrevFinal = (IRES_EDMA3CHAN_PaRamStruct *) | 122 | paRamPrevFinal = (PaRamStructPtr) |
123 | iresHandle->assignedPaRamAddresses[prevFinal-1]; | 123 | iresHandle->assignedPaRamAddresses[prevFinal-1]; |
124 | } | 124 | } |
125 | /* IRES assigned addresses cached in the handle */ | 125 | /* IRES assigned addresses cached in the handle */ |
@@ -146,11 +146,11 @@ Void ECPY_setFinal(ECPY_Handle pHandle, short transferNo) | |||
146 | 146 | ||
147 | /* If setting 1st xfer as Final, update the shadow PaRAMs . */ | 147 | /* If setting 1st xfer as Final, update the shadow PaRAMs . */ |
148 | if (transferNo == 1) { | 148 | if (transferNo == 1) { |
149 | paRamThis = handle->firstPARAMShadow; | 149 | paRamThis = (PaRamStructPtr)handle->firstPARAMShadow; |
150 | 150 | ||
151 | } else { | 151 | } else { |
152 | /* modify the assigned Physical PaRAM directly */ | 152 | /* modify the assigned Physical PaRAM directly */ |
153 | paRamThis = (IRES_EDMA3CHAN_PaRamStruct *) | 153 | paRamThis = (PaRamStructPtr) |
154 | iresHandle->assignedPaRamAddresses[transferNo-1]; | 154 | iresHandle->assignedPaRamAddresses[transferNo-1]; |
155 | } | 155 | } |
156 | 156 | ||
diff --git a/packages/ti/sdo/fc/ecpy/ecpy_start.h b/packages/ti/sdo/fc/ecpy/ecpy_start.h index 742f698..44d7bce 100644 --- a/packages/ti/sdo/fc/ecpy/ecpy_start.h +++ b/packages/ti/sdo/fc/ecpy/ecpy_start.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012, Texas Instruments Incorporated | 2 | * Copyright (c) 2012-2013, Texas Instruments Incorporated |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -86,8 +86,15 @@ Void ECPY_start(ECPY_Handle pHandle) | |||
86 | shadow_paRam = (IRES_EDMA3CHAN_PaRamStruct *)handle->firstPARAMShadow; | 86 | shadow_paRam = (IRES_EDMA3CHAN_PaRamStruct *)handle->firstPARAMShadow; |
87 | 87 | ||
88 | /* Copy first transfer's shadow PaRAM to Phys PaRam registers */ | 88 | /* Copy first transfer's shadow PaRAM to Phys PaRam registers */ |
89 | #if !(defined(ECPY_START_INLINE) || defined(ECPY_INLINE_ALL)) | ||
90 | Log_print1(Diags_USER2, "Final paRam 0x%x", (IArg)paRam); | ||
91 | #endif | ||
89 | for (i = 0; i < 8; i++) { | 92 | for (i = 0; i < 8; i++) { |
90 | *((Uns *)paRam + i) = *((Uns *)shadow_paRam + i); | 93 | *((Uns *)paRam + i) = *((Uns *)shadow_paRam + i); |
94 | #if !(defined(ECPY_START_INLINE) || defined(ECPY_INLINE_ALL)) | ||
95 | Log_print2(Diags_USER2, "paRam[%d] = 0x%x", (IArg)i, | ||
96 | (IArg) *((Uns *)paRam + i)); | ||
97 | #endif | ||
91 | } | 98 | } |
92 | 99 | ||
93 | /* Set transferPending indicating a transfer has been submitted */ | 100 | /* Set transferPending indicating a transfer has been submitted */ |
diff --git a/packages/ti/sdo/fc/ecpy/ecpy_util.h b/packages/ti/sdo/fc/ecpy/ecpy_util.h index 383385a..5b4236a 100644 --- a/packages/ti/sdo/fc/ecpy/ecpy_util.h +++ b/packages/ti/sdo/fc/ecpy/ecpy_util.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012, Texas Instruments Incorporated | 2 | * Copyright (c) 2012-2013, Texas Instruments Incorporated |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
@@ -124,8 +124,17 @@ typedef struct ECPY_Obj { | |||
124 | 124 | ||
125 | typedef union { | 125 | typedef union { |
126 | struct { | 126 | struct { |
127 | #ifdef xdc_target__bigEndian | ||
128 | /* | ||
129 | * Switching endianness of the processor swaps | ||
130 | * the addresses of the 16-bit PaRam fields. | ||
131 | */ | ||
132 | short hi16; | ||
133 | short lo16; | ||
134 | #else | ||
127 | short lo16; | 135 | short lo16; |
128 | short hi16; | 136 | short hi16; |
137 | #endif | ||
129 | } field; | 138 | } field; |
130 | unsigned int val32; | 139 | unsigned int val32; |
131 | } ECPY_Packed32; | 140 | } ECPY_Packed32; |
@@ -139,11 +148,21 @@ typedef struct _PaRamStruct { | |||
139 | ECPY_Packed32 acnt_bcnt; | 148 | ECPY_Packed32 acnt_bcnt; |
140 | unsigned int dst; | 149 | unsigned int dst; |
141 | ECPY_Packed32 elementIndexes; | 150 | ECPY_Packed32 elementIndexes; |
151 | #ifdef xdc_target__bigEndian | ||
152 | unsigned short bCntrld; | ||
153 | unsigned short link; | ||
154 | #else | ||
142 | unsigned short link; | 155 | unsigned short link; |
143 | unsigned short bCntrld; | 156 | unsigned short bCntrld; |
157 | #endif | ||
144 | ECPY_Packed32 frameIndexes; | 158 | ECPY_Packed32 frameIndexes; |
159 | #ifdef xdc_target__bigEndian | ||
160 | unsigned short rsvd; | ||
161 | unsigned short ccnt; | ||
162 | #else | ||
145 | unsigned short ccnt; | 163 | unsigned short ccnt; |
146 | unsigned short rsvd; | 164 | unsigned short rsvd; |
165 | #endif | ||
147 | } *PaRamStructPtr; | 166 | } *PaRamStructPtr; |
148 | 167 | ||
149 | 168 | ||
diff --git a/products.mak b/products.mak index 697c06e..cc2835f 100644 --- a/products.mak +++ b/products.mak | |||
@@ -28,25 +28,23 @@ | |||
28 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | 28 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
29 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | # | 30 | # |
31 | |||
32 | # | ||
31 | # ======== products.mak ======== | 33 | # ======== products.mak ======== |
32 | # | 34 | # |
33 | 35 | ||
34 | # Note that these variables can be explicitly set here or on the command line. | ||
35 | # The ?= assignment used through gives the command line precedence over | ||
36 | # settings in this file. | ||
37 | |||
38 | # Optional: recommended to install all dependent components in one folder. | 36 | # Optional: recommended to install all dependent components in one folder. |
39 | # | 37 | # |
40 | DEPOT ?= _your_depot_folder_ | 38 | DEPOT = _your_depot_folder_ |
41 | 39 | ||
42 | 40 | ||
43 | # Path to required dependencies | 41 | # Path to required dependencies |
44 | # | 42 | # |
45 | XDAIS_INSTALL_DIR ?= $(DEPOT)/_your_xdais_install_ | 43 | XDAIS_INSTALL_DIR = $(DEPOT)/_your_xdais_install_ |
46 | EDMA3_LLD_INSTALL_DIR ?= $(DEPOT)/_your_edma3lld_install_ | 44 | EDMA3_LLD_INSTALL_DIR = $(DEPOT)/_your_edma3lld_install_ |
47 | OSAL_INSTALL_DIR ?= $(DEPOT)/_your_osal_install_ | 45 | OSAL_INSTALL_DIR = $(DEPOT)/_your_osal_install_ |
48 | XDC_INSTALL_DIR ?= $(DEPOT)/_your_xdctools_install_ | 46 | XDC_INSTALL_DIR = $(DEPOT)/_your_xdctools_install_ |
49 | BIOS_INSTALL_DIR ?= $(DEPOT)/_your_bios_install_ | 47 | BIOS_INSTALL_DIR = $(DEPOT)/_your_bios_install_ |
50 | 48 | ||
51 | # Path to various cgtools | 49 | # Path to various cgtools |
52 | # | 50 | # |