cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce the use of FLASH and still keep NFC library?

DIvan.1
Associate III

Hello!

I'm working on NFC project. I created a program on STM32070RB microcontroller (Nucleo and x-cube05) but all the store in EU don't have it on stock. Because of that I took STM32070C6T6.

Unfortunately, this chip have only 32kbayts of FLASH and IDE give me an error (region `FLASH' overflowed by 7428 bytes).

Can you recommend me which files and code would be the most efficient to delete or any other idea how to decrease the FLASH uses.

Below I attached my project for example.

Thank you and all the best,

Domen

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

the default optimisation level in your project is None. When setting optimize for size, the footprint of your application is about 23kB.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Brian TIDAL
ST Employee

Hi,

the default optimisation level in your project is None. When setting optimize for size, the footprint of your application is about 23kB.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you very much. I didn't know for this function till now.

Is this most common used function or It's better to use it if only really don't have enough space?

Also, for the future what would you think... Is it better to use some other chip (for example 32f4 family) or this is not big deal and I can keep this chip?

Best regards,

Domen

Brian TIDAL
ST Employee

Hi,

this is a quite common feature available on most compile and quite commonly used.

See also: http://blog.atollic.com/the-ultimate-guide-to-reducing-code-size-with-gnu-gcc-for-arm-cortex-m

For the chip selection: just keep in mind to have some margin if you plan to add some new features in the future. Make sure to check also the RAM size margin.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.