Skip to main content
Visitor II
July 24, 2025
Solved

How to use STM32C071G8U6N correctly?

  • July 24, 2025
  • 4 replies
  • 457 views

I bought few STM32C071G8U6N from Mouser few month ago.

As I know, the SRAM size in spec is 24K, but I will get error message as below when ZI-data over 8KB
"Error: L6406E: No space in execution regions with .ANY selector matching xxx.o(.bss)."

Program Size: Code=33736 RO-data=360 RW-data=132 ZI-data=6724

 

And the data in iirDataQueue will change into 8192 or around 65535 unexpected.. Following is my code(work fine on other platform), (iirData is no error).  

memmove((uint16_t*)&dspMem.iirDataQueue[0], uint16_t*)&dspMem.iirDataQueue[1],
 (ADC_DATA_QUEUE_LEN - 1) * sizeof(dspMem.iirDataQueue[0]));
dspMem.iirDataQueue[ADC_DATA_QUEUE_LEN - 1] = dspMem.iirData;

 

We have also been using other series of products for a long time, such as STM32L4, but none of them is as frustrating as STM32C071. Could you please provide me with some direction to debug? Thanks.

Environment:

CubeMx 6.15.0 + STM32C0 1.4.0

Keil MDK-ARM 5.29.0.0

STM32C0xx_DFP 2.2.0

 

    This topic has been closed for replies.
    Best answer by MM..1

    Then simply change 0x2000 (8k) to 0x6000 (24k)

    4 replies

    Graduate II
    July 24, 2025

    Seems more as Keil question not STM. Show your sct file or memory config window in project... Spec is irelevant 

    Graduate II
    July 24, 2025

    +1 Check the CPU Target in the project configuration pane (Device & Target)

     

    You can also say the SRAM is bigger, until you get closure with the Linker, and then look at the .MAP to understand who/where/what is consuming it.

    YSTAuthor
    Visitor II
    July 25, 2025

    Thank you, this is my screenshot. The config is generated by CubeMx.

    image.png

    MM..1Answer
    Graduate II
    July 25, 2025

    Then simply change 0x2000 (8k) to 0x6000 (24k)

    Super User
    July 25, 2025

    STM32C0 is a new family, maybe Keil does not have specs for some C0 chips yet. Just correct the values manually. Install updates if available.

     

     

    Graduate II
    July 25, 2025

    Keil loads via a PACK, downloads as a ZIP internally and is unpacked off of c:\KEIL\ARM\PACK

    Pretty sure it's correct in the pack(s), could be importing from project settings/instance generated by Cube

    YSTAuthor
    Visitor II
    July 26, 2025

    Finally,

    I found my hierarchical structure definition in .h file can't be handled correctly.

    After I flatten the structure definition, no memory error and crash anymore.

    Thank you all for help.