6.3 Running the Build Script

Navigate to the microchip-tf-psa-crypto repository and run the build script with the small/medium/large/full configuration file, as needed. The example below shows a small configuration selection. This will generate the library output package pic32cmsg-psa-crypto-build in scripts/microchip.

cd microchip-tf-psa-crypto
python scripts/microchip/build_library.py build --config configs/microchip/crypto-config-small.h

Available configuration files for standard profiles:

  • crypto-config-small.h
  • crypto-config-medium.h
  • crypto-config-large.h
  • crypto-config-full.h

For custom profiles, provide the path to the custom configuration header: crypto-config-custom.h. Use the configuration files to update the config macros as needed for the project.

Use the following command to clean/remove the build output directory: pic32cmsg-psa-crypto-build.

# Clean build artifacts

python scripts/microchip/build_library.py clean

Use the following command only if the custom toolchain file needs to be provided. This can be avoided in a usual library build scenario where custom tools are not needed. Check scripts\microchip\toolchain for the default toolchain configuration.

# Custom toolchain path if needed 

python scripts/microchip/build_library.py build  

    --config configs/microchip/crypto-config-small.h  

    --toolchain scripts/microchip/toolchain/xc32_pic32cmsg_toolchain.cmake