Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Is the -mslow-flash-data working for Cortex M0 or M0+? We need to use PCROP code.

Hello,

one of our customer wants to useSystem Workbecnh to produce code compliant with PCROP on L0 device whcih embeds the Cortex M0.

For this he uses the -mslow-flash-data on CM3. This is not working on M0+.

the GCC doc says: This option is only supported when compiling for ARMv7 M-profile and off by default.

(https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/ARM-Options.html#ARM-Options)

Is there a way how to do that?

Thanks,

Jiri

France

Hi Jiri,

Regretfully, this is a GCC problem, nothing that System Workbench for TM32 can correct by itself. I don’t know why this is only supported on v7-M, but th eM0/M0+ cores are v6M compliant, not v7-M, and thus may miss some features that are needed for -mslow-flash-data to work correctly...

If you really need this, you must probably go to either the GCC mailing list or, better, the Linaro forums or mailing lists as we just use the Linaro GCC bare-metal port.

Anyway, I’m afraid that -mslow-flash-data, even if it worked, would not solve your problem, as it just instruct the compiler to minimize flash data acces, not to suppress them completely, what sould be needed for PCROP. So if what you want it using PCROP, there is a simpler way to go: you must manually edit the link editor script file to place all read-only data (.rodata) and initialization values for initialized data in an area of the flash not protected against reading by the embeded code. Then you will get protection of the pure code contained in PCROP protected area and access to the litteral pools and initialized data initial values.

You may also look at using RDP instead of PCROP: th ecode will then be able to read the litteral pool, but only your code could be executed as the memory will be protected (it must be fully erased to be able to be reprogrammed, thus protecting your code).

Hope this helps,

Bernard



Thank you for your replies!

BR, Jiri


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs