cancel
Showing results for 
Search instead for 
Did you mean: 

How to use STM32C071G8U6N correctly?

YST
Associate

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

 

7 REPLIES 7
MM..1
Chief III

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

+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
Up vote any posts that you find helpful, it shows what's working..
YST
Associate

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

image.png

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

Not sure where the wrong setting is coming from. Might check your local Keil pack

https://github.com/Open-CMSIS-Pack/STM32C0xx_DFP/blob/main/Keil.STM32C0xx_DFP.pdsc#L659

Perhaps the Cube side? @STTwo-32 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User

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.

 

 

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
Up vote any posts that you find helpful, it shows what's working..