[SOLVED] stmf303 Blink led because so much memory used?

STM32F103 Nucleo boards e.g. STM Nucleo F103RB
FRANCISCOGIMENO
Posts: 20
Joined: Wed Nov 08, 2017 12:30 pm

[SOLVED] stmf303 Blink led because so much memory used?

Post by FRANCISCOGIMENO » Thu Nov 09, 2017 8:13 am

Hello friends, after compiling for the stmf303 the led example to see how the resources go. I see this:

Sketch uses 10504 bytes (16%).
Var Global 2936 bytes (23%)
 
I already know that the boot occupies, but you can eliminate some of the core that was not used.?

I have searched but I do not see anything that tells you clearly if you can or not.


a greeting
Fran
Last edited by FRANCISCOGIMENO on Fri Nov 10, 2017 6:13 pm, edited 1 time in total.

fpiSTM
Posts: 225
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: stmf303 Blink led because so much memory used?

Post by fpiSTM » Thu Nov 09, 2017 8:24 am

So with Arduino IDE it is ok but not with VSmicro ?

FRANCISCOGIMENO
Posts: 20
Joined: Wed Nov 08, 2017 12:30 pm

Re: stmf303 Blink led because so much memory used?

Post by FRANCISCOGIMENO » Thu Nov 09, 2017 9:06 am

I do not understand the question. :shock:

fpiSTM
Posts: 225
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: stmf303 Blink led because so much memory used?

Post by fpiSTM » Thu Nov 09, 2017 9:22 am

Which build environment you use?
Official Arduino IDE ? other ?

About the clean the build already removed unused function.
But there are several pre-instanciate instance (Serial, I2C, SPI,...)

FRANCISCOGIMENO
Posts: 20
Joined: Wed Nov 08, 2017 12:30 pm

Re: stmf303 Blink led because so much memory used?

Post by FRANCISCOGIMENO » Thu Nov 09, 2017 9:46 am

I use visual micro.
But when using the debug function does not work with this board.

After compiling blink led in visual micro ide:
Program size: 10.404 bytes (used 16% of a 65.536 byte maximum) (65,80 secs)
Minimum Memory Usage: 2328 bytes (19% of a 12288 byte maximum)

After compiling blink led ide arduino:
Sketch uses 10504 bytes (16%).
Var Global 2936 bytes (23%)

fpiSTM
Posts: 225
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: stmf303 Blink led because so much memory used?

Post by fpiSTM » Thu Nov 09, 2017 10:13 am

Ok so you use VSMicro.

What is exactly your request ?
Decrease the size of the binary and the RAM consumption ?

The small difference btw the 2 results probably came from different built options (-Ox, gcc version,...) I do not use VSMicro, so I don't know how this is configured.

One option to decrease the size is to remove some instances preinstanciate I think. And also disable some HAL feature (ex for blink I2C, SPI, PWM , DAC, ADC are not required)

FRANCISCOGIMENO
Posts: 20
Joined: Wed Nov 08, 2017 12:30 pm

Re: stmf303 Blink led because so much memory used?

Post by FRANCISCOGIMENO » Thu Nov 09, 2017 10:17 am

Visual micro gives these options, are the image in the attachment

What id do you use?
Attachments
opci.jpg
opci.jpg (34.67 KiB) Viewed 74 times

fpiSTM
Posts: 225
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: stmf303 Blink led because so much memory used?

Post by fpiSTM » Thu Nov 09, 2017 11:06 am

by default -OS.
It seems VSMicro uses well the boards.txt and platform.txt of the core.
As I said I do not know the VSMicro.
To have a little gain, for blink sketch you can set the Option 2 to No serial this will remove the Serial instance

FRANCISCOGIMENO
Posts: 20
Joined: Wed Nov 08, 2017 12:30 pm

Re: stmf303 Blink led because so much memory used?

Post by FRANCISCOGIMENO » Thu Nov 09, 2017 11:19 am

What ide do you use?

fpiSTM
Posts: 225
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: stmf303 Blink led because so much memory used?

Post by fpiSTM » Thu Nov 09, 2017 12:44 pm

Official Arduino IDE

Post Reply