This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 L5 DFP 1.4.0 Error

When creating a simple L562 uVision app, uVision produces an error message about not being able to copy system_stm32l5xx_ns.c file to the app.

The ST HAL library V1.4.0 includes Template files system_stm32l5xx.c, system_stm32l5xx_ns.c and system_stm32l5xx_s.c, I believe the _ns.c and _s.c versions are for a Trust Zone application and not needed for a non-trust application. DFP 1.4.0 contains only a system_stm32l5xx.c file.

Defaulting to copying system_stm32l5xx.c should be the first fix. Determining if the app is a Trust Zone application probably requires a Managing Run Time Environment change.

Of course, if I got something wrong, please politely explain the error of my ways.

Edit: Copying a  system_stm32l5xx_ns.c file from ST's HAL L5 library to the app is not a good workaround. This will cause the startup to hang before reaching main. A workaround that seems to work is to delete the system_stm32l5xx_ns.c file from the app, replace it with a system_stm32l5xx.c file and rename it to system_stm32l5xx_ns.c. But, of course, that is a hell of a way to run a railroad.

Parents
  • Hello Popop!

    I installed the STM32L5xx_DFP 1.4.0 and there is a system_stm32l5xx_ns.c:

    Directory of C:\Keil\ARM\PACK\Keil\STM32L5xx_DFP\1.4.0\Drivers\CMSIS\Device\ST\STM32L5xx\Source\Templates

    07.08.2023 17:02 <DIR> .
    07.08.2023 17:02 <DIR> ..
    07.08.2023 17:02 <DIR> arm
    07.08.2023 17:02 <DIR> gcc
    07.08.2023 17:02 <DIR> iar
    07.08.2023 17:02 13.912 system_stm32l5xx.c
    07.08.2023 17:02 9.179 system_stm32l5xx_ns.c
    07.08.2023 17:02 15.784 system_stm32l5xx_s.c

    I also created a test project for the "STM32L562ZETxQ" and by default it gets the system_stm32l5xx_ns.c added to the project. So not sure what happen in your case. Can you try reinstalling the pack to see if this file is there then?

Reply
  • Hello Popop!

    I installed the STM32L5xx_DFP 1.4.0 and there is a system_stm32l5xx_ns.c:

    Directory of C:\Keil\ARM\PACK\Keil\STM32L5xx_DFP\1.4.0\Drivers\CMSIS\Device\ST\STM32L5xx\Source\Templates

    07.08.2023 17:02 <DIR> .
    07.08.2023 17:02 <DIR> ..
    07.08.2023 17:02 <DIR> arm
    07.08.2023 17:02 <DIR> gcc
    07.08.2023 17:02 <DIR> iar
    07.08.2023 17:02 13.912 system_stm32l5xx.c
    07.08.2023 17:02 9.179 system_stm32l5xx_ns.c
    07.08.2023 17:02 15.784 system_stm32l5xx_s.c

    I also created a test project for the "STM32L562ZETxQ" and by default it gets the system_stm32l5xx_ns.c added to the project. So not sure what happen in your case. Can you try reinstalling the pack to see if this file is there then?

Children
No data