Skip to main content
Associate
Jul 24, 2025 6:15 PM UTC
Solved

How to use STM32C071G8U6N correctly?

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.
MM..1
MM..1Best answer
Super User
Jul 25, 2025 4:18 AM UTC

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

8 replies

MM..1
Super User
Jul 24, 2025 6:59 PM UTC

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

Tesla DeLorean
Guru
Jul 24, 2025 7:24 PM UTC

+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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
YSTAuthor
Associate
Jul 25, 2025 12:46 AM UTC

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

image.png

MM..1
MM..1Best answer
Super User
Jul 25, 2025 4:18 AM UTC

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

Pavel A.
Jul 25, 2025 9:22 PM UTC

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.

 

 

Tesla DeLorean
Guru
Jul 25, 2025 10:20 PM UTC

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
YSTAuthor
Associate
Jul 26, 2025 2:19 PM UTC

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.