Design Win

Proprietary code read-out protection (PCROP) software expansion for STM32Cube (AN4701, AN4758 and AN4968)

Get Software Download databrief

Product overview


X-CUBE-PCROP illustrates the practical usage of the proprietary code read-out protection feature on microcontrollers in the STM32F4, STM32F7 and STM32L4 Series. The Expansion Package is provided with two projects: Project 1 called STEP1-ST_Customer_level_n, and Project 2 called STEP2-ST_Customer_level_n+1.

The first project, STEP1-ST_Customer_level_n, shows how an STMicroelectronics customer level n can generate execute-only IP-Code (using compiler options), place it in a preferred Flash memory 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 STMicroelectronics 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-out (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 STMicroelectronics customer level n+1 having a preprogrammed microcontroller from 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 for demonstration is the FIR filter example provided in the CMSIS library. The example is provided with the IAR Systems® IAR Embedded Workbench®, Keil® MDK-ARM, and STMicroelectronics STM32CubeIDE and SW4STM32 toolchains. It 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 (PCROP) on STM32F72xxx and STM32F73xxx microcontrollers (AN4968) or Proprietary code read-out protection on STM32L4, STM32L4+, STM32G4 and STM32WB Series MCUs (AN4758).

Get Software