Skip to content

Very large binary size compared to AVR #1723

Closed Answered by fpistm
Hyratel asked this question in Q&A
Discussion options

You must be logged in to vote

As example for your sketch and generic F030F4Px:

Sketch uses 14036 bytes (85%) of program storage space. Maximum is 16384 bytes.
Global variables use 452 bytes (11%) of dynamic memory, leaving 3644 bytes for local variables. Maximum is 4096 bytes.

With:

  1. Serial disabled
  2. Added file build_opt.h with this inside:
-DHAL_RTC_MODULE_DISABLED
-DHAL_SPI_MODULE_DISABLED
-DHAL_TIM_MODULE_DISABLED
-DHAL_EXTI_MODULE_DISABLED
  1. Sketch with PinMap_ADC redefined:
#include <Wire.h>
uint8_t buffered[3] = {0, 0, 0};

const PinMap PinMap_ADC[] = {
  {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
  {NC,   NP,   0}
};


void setup()
{
  Wire.begin(9);
  Wire.onRequest(re…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Hyratel
Comment options

@fpistm
Comment options

@Hyratel
Comment options

Answer selected by Hyratel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants