The goal of this X-CUBE-PCROP firmware is to illustrate the practical usage of the PCROP protection feature on microcontrollers of the STM32F4, STM32F7 and STM32L4 Series.
The firmware is provided with two projects: Project 1, called STEP1-ST_Customer_level_n and Project 2 called, STEP2-ST_Customer_level_n+1.
STEP1-ST_Customer_level_n shows how an ST customer level n can generate execute-only IP-Code (using compiler options), place it in a preferred Flash sector, protect it using PCROP and generate the IP-Code related files, such as the header file and the symbols definition file to be provided to ST customer level n+1. This project includes two project configurations: PCROP-IP-Code-XO and PCROP-IP-Code.
In the PCROP-IP-Code-XO configuration the compiler is configured to generate execute-only IP-Code, avoiding any data read (avoiding literal pools and branch tables).
In the PCROP-IP-Code configuration no special compiler option is used, it is just for test purposes to show that avoiding data in code (such as literal pools and branch tables) is mandatory for PCROP-ed codes.
The second project, STEP2-ST_Customer_level_n+1, shows how an ST Customer level n+1 having a preprogrammed microcontroller of the STM32F4, STM32F7 or STM32L4 Series, with a PCROP-ed IP-Code, can create his own end-user application, using these protected IP-Code functions.
The application used is the FIR filter example provided in the CMSIS library. The example is provided with Keil® MDK-ARM™,IAR™and SW4STM32 toolchains and can be easily ported to any other toolchain.
For more details on PCROP implementation in microcontrollers, refer to the corresponding application note: Proprietary code read-out protection on microcontrollers of the STM32F4 series (AN4701), Proprietary code read-out protection on microcontrollers STM32F72xxx and STM32F73xxx (AN4968) or Proprietary code read-out protection on microcontrollers of the STM32L4 series (AN4758).
- Read Protection
- Write Protection