cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F042C4U6 memory too small for cubeMX generated project.

CDamp.1
Associate

I've used a STM32F042C4U6 in a simple application requiring USB. I'm using cube IDE. When the project is generated with cubeMX and compiled, it is too large to fit in memory before I've even added any user code. Is this right ? If so, what is the point of this chip ?

5 REPLIES 5

> If so, what is the point of this chip ?

It's useful for those who write programs, rather than click in CubeMX.

JW

It is targeting a different audience​.

The STM32G04/8 devices seem more accommodating​ in the Flash/RAM department, whilst being in physically smaller packages.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
RMart.1
Associate II

Hi.

You would probably have to do all peripheral configuration by yourself or else use older version of standard peripheral libraries (STM32F0xx_StdPeriph_Driver) to do so which are lighter...

Another option would be to explore each API cubemx uses for code generating and replicate this at register programming level... I am afraid you do not have many options here.

Hope this helps,

S.Ma
Principal

Is there pin to pin compatible F0 with bigger memory to get started, then optimize later?

CDamp.1
Associate

For now I've switched to another pin compatible one I've used previously and now having trouble getting USB to work reliably - it keeps dropping out. The whole point of this was switching away from a pic and separate FTDI to reduce cost while doing some other tweaks to the design. This is now more expensive and a load of hassle into the bargain. It strikes me as rather unprofessional that ST haven't even tried their own supplied firmware in their chips. The whole point of manufacturer supplied tooling is that it's supposed to avoid this kind of compatibility issue. I'll be switching the design back to PIC again, another 2 weeks wasted for another prototype iteration.