
Steps to build
==============

- Open Rules.make

- Edit paths for the below variables according to your system environment

  In case of windows machine edit below paths,

  TOOLCHAIN_PATH_R5 := $(abspath ../../../..)/Compilers/ti-cgt-armllvm_1.3.0.LTS
  mcal_PATH := $(abspath ..)/$(mcal_RELPATH)
  UTILS_INSTALL_DIR := $(abspath ../../../..)/ccs1110/ccs/utils/cygwin
  GMAKE_DIR := $(abspath ../../../..)/ccs1110/ccs/utils/cygwin

  By default the above are for CLANG compiler, modify respective paths accordingly for other compilers (such as DIAB).

  In case of linux machine edit the similar linux path

  IMPORTANT:
  Make sure the paths specified above DO NOT have any spaces in them.

- Make sure "gmake" is in your system path.
  Typically when XDC is installed "gmake" is installed along with it and
  it becomes part of the system path by default.

- Open command prompt and type the below
  gmake -s all

  This will clean all and build all MCAL drivers as well as all MCAL
  examples

- TIP: Always use "-s" option with make to see user friendly prints
       during build.

- Optionally before build, edit the below in Rules.make file,
  depending on the kind of build you want to do:

  PLATFORM:=am263
  PROFILE:=release/debug

  Valid values for PLATFORM are:
  am263			  - AM263
  

  Valid values for PROFILE are:
  debug         - Debug build with NO compiler optimizations
                  and symbolic debug info included
  release       - Release build with FULL compiler optimizations
                  and symbolic debug info included


- The generated files are placed in the below folders,
  Executables   - $(DEST_ROOT)/<APP_NAME>/bin/$(PLATFORM)/<APP_NAME>_<CORE>_$(PROFILE).xer5f
  Libraries     - $(DEST_ROOT)/<MODULE_RELPATH>/lib/$(PLATFORM)/r5f/$(PROFILE)/*.aer5f
  Objects       - $(DEST_ROOT)/<MODULE_RELPATH>/obj/$(PLATFORM)/r5f/$(PROFILE)/*.oer5f
  Dependancies  - $(DEST_ROOT)/<APP_NAME>/obj/$(PLATFORM)/r5f/$(PROFILE)/.deps/*.P

- During development the below "gmake" targets can be also used be used for
  convenience:

  gmake -s examples         - incrementally builds MCAL drivers
                              and all examples

  gmake -s platforms        - incrementally builds for all supported PLATFORMs
  gmake -s profiles         - incrementally builds for all supported PROFILEs

  gmake -s all              - clean all and build all drivers, examples for default platform <am263>
  gmake -s allall           - incrementally builds for all supported PLATFORMs
                              AND PROFILEs

  gmake -s clean            - clean all drivers, examples
  gmake -s examples_clean   - clean all examples ONLY
  gmake -s platformsclean   - cleans for all supported PLATFORMs
  gmake -s profilesclean    - cleans for all supported PROFILEs
  gmake -s allclean         - cleans for all supported PLATFORMs AND PROFILEs

  gmake -s <examplename>    - incrementally builds MCAL drivers
                              and the specific example ONLY.

                              Values for <examplename> can be,
                              gpt_app
                              dio_app
                              mcu_app
			      fls_app
			      mcspi_app
			      can_app
			      port_app
			      wdg_app
			      cdd_i2c_app
			      eth_app
  gmake -s help             - Prints the help menu
