Previous topicNext topic
Help > Target Hardware >
Board Support Package

CASP Target Hardware Board Support Package (BSP) shall be installed before creating models and building for a particular target. The procedure for how to install BSP is given in this section. CASP BSP consists of following:

·         Hardware Definition File

CASP hardware definition files are located in /hardware/hwd directory with extension ‘.hwd’. CASP maintains one hwd file for each target hardware. The hardware definition file consists of complete hardware configuration of a given target. User can refer to sample hardware BSP hardware definition file from Start > Settings > Target Hardware > 8bit/16bit uC > Sam_Hwd for better understanding.

·         Sources & Libraries

Target hardware source and library files are located in /hardware/<target hardware> directory. This directory consists of

·         CASP HAL APIs (C/C++ functions and class methods) to access hardware peripherals for the target.

·         Target hardware vendor sources, libraries and linker scripts and files that are required to successfully build and run user created models for the target.

User can refer to sample hardware BSP sources available at /hardware/sam_hwd directory for better understanding.

·         Compiler Tool Chain Files

Target hardware compiler tool chain files are located in /hardware/tools directory. These files consist of compilers and linkers required for building user created models for the target. These files are typically from target hardware vendors. The tool chain files provided as part of CASP BSP consists of most suitable and tested tool chain. User may download and use latest tool chain available from the hardware vendors if require. However, they may not work at times.

 

A typical user need not interact with these files directly as CASP automates the interaction with these files during build process. However, direct interaction with these files is required in following cases.

 

·         When user wants to interact with the hardware directly from custom block code created by the user.

In such cases, user can use hardware abstraction layer (HAL) APIs provided as part of CASP BSP. These APIs provide a uniform method to access hardware peripherals such as GPIOs, UARTs, SPI, I2C and many others from C/C++ sources of user created block over different targets. Details of these functions and classes are discussed in this section. User may however use the hardware functions provided by hardware vendor for directly interacting with hardware. In such a case the implementation may be limited to particular target hardware.

 

·         When user wants to create a new BSP for a particular target

CASP supports creation of new BSP or modify existing one by the user. Target hardware BSP creation typically involves below steps. These steps are further elaborated in following sections

·         Creating target hardware configuration.

·         Implementing CASP HAL API’s for the target and adding them to BSP.

·         Adding vendor sources and libraries to the BSP.

·         Adding compiler and linker tool chain files to the BSP.