Skip to content

Commit

Permalink
WIP: working on the next release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Kridner committed Jul 1, 2013
1 parent e363612 commit 04d65d7
Show file tree
Hide file tree
Showing 19 changed files with 513 additions and 50 deletions.
Binary file modified Documentation/01-AM335x_PRU_ICSS_Overview.pdf
Binary file not shown.
Binary file not shown.
Binary file removed am335xPruPackage_1_1_Manifest.pdf
Binary file not shown.
Binary file modified am335xPruReferenceGuide.pdf
Binary file not shown.
53 changes: 26 additions & 27 deletions pru_sw/example_apps/Makefile 100755 → 100644
@@ -1,27 +1,26 @@
-include DIRS -include DIRS


CROSS_COMPILE?=arm-arago-linux-gnueabi- CROSS_COMPILE?=arm-arago-linux-gnueabi-
LIBDIR_APP_LOADER?=../../app_loader/lib LIBDIR_APP_LOADER?=../../app_loader/lib
INCDIR_APP_LOADER?=../../app_loader/include INCDIR_APP_LOADER?=../../app_loader/include
BINDIR_APPLICATIONS?=../bin BINDIR_APPLICATIONS?=../bin
BINDIR_FW?=bin BINDIR_FW?=bin
PASM?=../utils/pasm PASM?=../utils/pasm_2


all: all:
# Make PRU example applications # Make PRU example applications
mkdir -p bin mkdir -p bin


for dir in $(APP_DIRS); do make -C $$dir CROSS_COMPILE="${CROSS_COMPILE}" LIBDIR_APP_LOADER="${LIBDIR_APP_LOADER}" LIBDIR_EDMA_DRIVER="${LIBDIR_EDMA_DRIVER}" INCDIR_APP_LOADER="${INCDIR_APP_LOADER}" INCDIR_EDMA_DRIVER="${INCDIR_EDMA_DRIVER}" BINDIR="${BINDIR_APPLICATIONS}"; done for dir in $(APP_DIRS); do make -C $$dir CROSS_COMPILE="${CROSS_COMPILE}" LIBDIR_APP_LOADER="${LIBDIR_APP_LOADER}" LIBDIR_EDMA_DRIVER="${LIBDIR_EDMA_DRIVER}" INCDIR_APP_LOADER="${INCDIR_APP_LOADER}" INCDIR_EDMA_DRIVER="${INCDIR_EDMA_DRIVER}" BINDIR="${BINDIR_APPLICATIONS}"; done


# Pass PRU assembly code for each example through assembler # Pass PRU assembly code for each example through assembler
for a_file in ${ASSEM_FILES} ; \ for a_file in ${ASSEM_FILES} ; \
do \ do \
${PASM} -b $$a_file ; \ ${PASM} -V3 -b $$a_file ; \
done ; \ done ; \
mv *.bin ${BINDIR_FW} mv *.bin ${BINDIR_FW}


clean: clean:
for dir in $(APP_DIRS); do make -C $$dir clean LIBDIR_APP_LOADER="${LIBDIR_APP_LOADER}" LIBDIR_EDMA_DRIVER="${LIBDIR_EDMA_DRIVER}" INCDIR_APP_LOADER="${INCDIR_APP_LOADER}" INCDIR_EDMA_DRIVER="${INCDIR_EDMA_DRIVER}" BINDIR="${BINDIR_APPLICATIONS}"; done for dir in $(APP_DIRS); do make -C $$dir clean LIBDIR_APP_LOADER="${LIBDIR_APP_LOADER}" LIBDIR_EDMA_DRIVER="${LIBDIR_EDMA_DRIVER}" INCDIR_APP_LOADER="${INCDIR_APP_LOADER}" INCDIR_EDMA_DRIVER="${INCDIR_EDMA_DRIVER}" BINDIR="${BINDIR_APPLICATIONS}"; done


for bin_file in ${BIN_FILES}; do rm -fr ${BINDIR_FW}/$$bin_file; done for bin_file in ${BIN_FILES}; do rm -fr ${BINDIR_FW}/$$bin_file; done

Binary file removed pru_sw/utils/pasm
Binary file not shown.
Binary file added pru_sw/utils/pasm_2
Binary file not shown.
3 changes: 1 addition & 2 deletions pru_sw/utils/pasm_source/dosbuild.bat 100644 → 100755
@@ -1,4 +1,3 @@
cl -W3 -D_CRT_SECURE_NO_WARNINGS pasm.c pasmpp.c pasmexp.c pasmop.c pasmdot.c pasmstruct.c pasmmacro.c /Febin\pasm.exe cl -W3 -D_CRT_SECURE_NO_WARNINGS pasm.c pasmpp.c pasmexp.c pasmop.c pasmdot.c pasmstruct.c pasmmacro.c /Fe..\pasm.exe
del *.obj del *.obj



68 changes: 64 additions & 4 deletions pru_sw/utils/pasm_source/pasm.c 100644 → 100755
Expand Up @@ -58,7 +58,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/


#include <stdio.h> #include <stdio.h>
Expand All @@ -73,11 +73,33 @@
#include "pasm.h" #include "pasm.h"
#include "pasmdbg.h" #include "pasmdbg.h"


/*
// Multiple Core Revision Support
// ------------------------------
//
// -V0 PRU Legacy (same as -x)
// -V1 PRU Generation 1 (default)
// Adds [LMBD,SCAN,HALT,ZERO(1),MVI(1),SLP(1)] Removes [LFC,STC]
// -V2 PRU Generation 2 (same as -X)
// Adds [ZERO(2),FILL,XIN,XOUT,XCHG,MVI(2)] Removes [SCAN]
// -V3 PRU Generation 3
// Adds [SLP(2),LOOP,ILOOP,SXIN,SXOUT,SXCHG,NOPx]
//
// ZERO(1) : Zero is multi-cycle pseudo op encoded via moves
// ZERO(2) : Zero is single-cycle pseudo op encoded via XFR
//
// MVI(1) : Pseudo op forms of MVI only
// MVI(2) : Pseudo op forms of MVI only
//
// SLP(1) : SLP with trailing NOP
// SLP(2) : SLP without trailing NOP
*/



/* ---------- Local Macro Definitions ----------- */ /* ---------- Local Macro Definitions ----------- */


#define PROCESSOR_NAME_STRING ("PRU") #define PROCESSOR_NAME_STRING ("PRU")
#define VERSION_STRING ("0.80") #define VERSION_STRING ("0.84")


#define MAXFILE (256) /* Max file length for output files */ #define MAXFILE (256) /* Max file length for output files */
#define MAX_PROGRAM (16384) /* Max instruction count */ #define MAX_PROGRAM (16384) /* Max instruction count */
Expand Down Expand Up @@ -138,7 +160,7 @@ int main(int argc, char *argv[])
char outbase[MAXFILE],outfilename[MAXFILE]; char outbase[MAXFILE],outfilename[MAXFILE];


printf("\n\n%s Assembler Version %s\n",PROCESSOR_NAME_STRING, VERSION_STRING); printf("\n\n%s Assembler Version %s\n",PROCESSOR_NAME_STRING, VERSION_STRING);
printf("Copyright (C) 2005-2012 by Texas Instruments Inc.\n\n"); printf("Copyright (C) 2005-2013 by Texas Instruments Inc.\n\n");


/* Scan argv[0] to the final '/' in program name */ /* Scan argv[0] to the final '/' in program name */
i=0; i=0;
Expand All @@ -161,7 +183,10 @@ int main(int argc, char *argv[])
if( argc<2 ) if( argc<2 )
{ {
USAGE: USAGE:
printf("Usage: %s [-bcmLldz] [-Dname=value] [-Cname] InFile [OutFileBase]\n\n",argv[0]); printf("Usage: %s [-V#EBbcmLldz] [-Dname=value] [-Cname] InFile [OutFileBase]\n\n",argv[0]);
printf(" V# - Specify core version (V0,V1,V2,V3). (Default is V1)\n");
printf(" E - Assemble for big endian core\n");
printf(" B - Create big endian binary output (*.bib)\n");
printf(" b - Create little endian binary output (*.bin)\n"); printf(" b - Create little endian binary output (*.bin)\n");
printf(" c - Create 'C array' binary output (*_bin.h)\n"); printf(" c - Create 'C array' binary output (*_bin.h)\n");
printf(" m - Create 'image' binary output (*.img)\n"); printf(" m - Create 'image' binary output (*.img)\n");
Expand Down Expand Up @@ -248,6 +273,41 @@ int main(int argc, char *argv[])
nameCArraySet = 1; nameCArraySet = 1;
break; break;
} }
else if( *flags == 'V' )
{
flags++;
if( *flags<'0' || *flags>'3' )
{
printf("\nExpected a number (0-3) after option 'V'\n\n");
goto USAGE;
}
if( Core != CORE_NONE )
{
printf("\nDo not specify more than one core version or use -V with -X or -x\n\n");
goto USAGE;
}
Core = CORE_V0 + *flags - '0';
}
else if( *flags == 'x' )
{
if( Core != CORE_NONE )
{
printf("\nDo not use -x with -X or -V\n\n");
goto USAGE;
}
Core = CORE_V0;
}
else if( *flags == 'X' )
{
if( Core != CORE_NONE )
{
printf("\nDo not use -X with -x or -V\n\n");
goto USAGE;
}
Core = CORE_V2;
}
else if( *flags == 'E' )
Options |= OPTION_BIGENDIAN;
else if( *flags == 'b' ) else if( *flags == 'b' )
Options |= OPTION_BINARY; Options |= OPTION_BINARY;
else if( *flags == 'B' ) else if( *flags == 'B' )
Expand Down
4 changes: 2 additions & 2 deletions pru_sw/utils/pasm_source/pasm.h 100644 → 100755
Expand Up @@ -55,7 +55,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/
typedef unsigned int uint; typedef unsigned int uint;


Expand Down Expand Up @@ -147,7 +147,7 @@ extern uint RetRegField; /* Return register field */
#define DEFAULT_RETREGVAL 30 #define DEFAULT_RETREGVAL 30
#define DEFAULT_RETREGFLD FIELDTYPE_15_0 #define DEFAULT_RETREGFLD FIELDTYPE_15_0


#define SOURCEFILE_MAX 32 #define SOURCEFILE_MAX 64
extern SOURCEFILE sfArray[SOURCEFILE_MAX]; extern SOURCEFILE sfArray[SOURCEFILE_MAX];
extern unsigned int sfIndex; extern unsigned int sfIndex;


Expand Down
2 changes: 1 addition & 1 deletion pru_sw/utils/pasm_source/pasmdbg.h 100644 → 100755
Expand Up @@ -55,7 +55,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/


#define DBGFILE_NAMELEN_SHORT 64 #define DBGFILE_NAMELEN_SHORT 64
Expand Down
2 changes: 1 addition & 1 deletion pru_sw/utils/pasm_source/pasmdot.c 100644 → 100755
Expand Up @@ -53,7 +53,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/


#include <stdio.h> #include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion pru_sw/utils/pasm_source/pasmexp.c 100644 → 100755
Expand Up @@ -57,7 +57,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/


#include <stdio.h> #include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion pru_sw/utils/pasm_source/pasmmacro.c 100644 → 100755
Expand Up @@ -53,7 +53,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Revision: // Revision:
// 15-Jun-12: 0.80 - Open source version // 21-Jun-13: 0.84 - Open source version
============================================================================*/ ============================================================================*/


#include <stdio.h> #include <stdio.h>
Expand Down

0 comments on commit 04d65d7

Please sign in to comment.