Skip to main content
ATorr.7
Visitor II
July 12, 2022
Question

is it necessary to define PCROP in scatter?

  • July 12, 2022
  • 1 reply
  • 571 views

Hi I'm Toni,

I try to learn about embedded systems and it's my first time here.I bought stm32h743 and i would like know, If I use the CubeProgrammer to define PCROP area, why do I need to define on scatter?

Thank you.

    This topic has been closed for replies.

    1 reply

    ST Employee
    July 20, 2022

    Hello.

    PCROP regions allows only code execution (fetch via I-Code bus). Data read (D-Bus access is not allowed). Using STM32CubeProgrammer you are defining some boundaries within option bytes of the MCU. Proper compilation flags and scatter file settings are needed to prepare your code in such a way that within PCROP area you will have only the code for execution (XO attribute - execute only) . All variables used by the code must be placed outside PCROP area. And this is managed by compiler and linker settings. You can refer to any application notes related to PCROP, like AN4758 for more details..