core_portme.mak

Summary
core_portme.mak
Variables
OUTFLAGUse this flag to define how to to get an executable (e.g -o)
CFLAGSUse this flag to define compiler options.
LFLAGS_ENDDefine any libraries needed for linking or other flags that should come at the end of the link line (e.g.
SEPARATE_COMPILEDefine if you need to separate compilation from link stage.
PORT_OBJSPort specific object files can be added here
Build Targets
port_prebuildGenerate any files that are needed before actual build starts.
port_postbuildGenerate any files that are needed after actual build end.
port_postrunDo platform specific after run stuff.
port_prerunDo platform specific after run stuff.
port_postloadDo platform specific after load stuff.
port_preloadDo platform specific before load stuff.
Variables
OPATH
PERLDefine perl executable to calculate the geomean if running separate.

Variables

OUTFLAG

Use this flag to define how to to get an executable (e.g -o)

CFLAGS

Use this flag to define compiler options.  Note, you can add compiler options from the command line using XCFLAGS=”other flags”

LFLAGS_END

Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts).  Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.

SEPARATE_COMPILE

Define if you need to separate compilation from link stage.  In this case, you also need to define below how to create an object file, and how to link.

PORT_OBJS

Port specific object files can be added here

Build Targets

port_prebuild

Generate any files that are needed before actual build starts.  E.g. generate profile guidance files.  Sample PGO generation for gcc enabled with PGO=1

  • First, check if PGO was defined on the command line, if so, need to add -fprofile-use to compile line.
  • Second, if PGO reference has not yet been generated, add a step to the prebuild that will build a profile-generate version and run it.
NoteUsing REBUILD=1

Use make PGO=1 to invoke this sample processing.

port_postbuild

Generate any files that are needed after actual build end.  E.g. change format to srec, bin, zip in order to be able to load into flash

port_postrun

Do platform specific after run stuff.  E.g. reset the board, backup the logfiles etc.

port_prerun

Do platform specific after run stuff.  E.g. reset the board, backup the logfiles etc.

port_postload

Do platform specific after load stuff.  E.g. reset the reset power to the flash eraser

port_preload

Do platform specific before load stuff.  E.g. reset the reset power to the flash eraser

Variables

OPATH

Path to the output folder.  Defaultcurrent folder.

PERL

Define perl executable to calculate the geomean if running separate.

Close