Amount of FLASH used by components

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

Hi all,

   

The datasheet for the SPI master says that it requires 849 bytes of FLASH. However, actually seems to use 1693 bytes!

   

In fact, all of the components seem to use more FLASH than their datasheets claim. This is a problem because the components in the project are using up about 9k of a total of 16k!

   

 

   

Am I doing something wrong, or is the extra is coming from all the pins? 

   

 

   

Hugo Elias

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I just created a (very) small project: 2 pins, 1 SPI Master. Came up to 2882 Bytes flash. Then I deleted the SPI, set the pins to no hardware-connection and it used 280 bytes less. Did not try to initialize the module.

   

Optimization was turned on to level 5.

   

 

   

Bob

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 Woah! That means the SPI master component was using 2602 bytes !

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

No, when deleting the SPI-module the amount of flash LESSENED by 280 bytes!

   

Bob

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 Oh, right, sorry. Mis-read that. So the rest must be used by the pins.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Do not forget the bootloader! This will put all the pins, modules,clocks etc to a known state and that costs 2.5K.

   

When compiling an empty project, you'll see the amount of overhead, there are some basic functions that have to be maintained including programming of flash, which is not performed from the outside, though initialized and controlled.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Guys. Remeber that PSoC3 is not a microcontroller. It needs to be confiured first. We call it the boot code(cy_boot) that configures the device as in your topdesign. And that is the poertion that might have taken the initial 2k Flash and not the pin component.

0 Likes