Amount of FLASH used by pins

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,

   

 

   

In a previous post, I belatedly realised that the pin component used 110 bytes of FLASH. It may not seem like a lot, but for a device with about 62 IO lines, that means that 41% of the FLASH is used just by the API for the pins!

   

 

   

Feature request: An option for the pin component to use less FLASH by not generating the ReadPin() function etc.

   

 

   

Hugo Elias

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

I ran some tests and they show something different.

   

See attached project, use it as suggested with no, 4 or 2 input/output pins. If your values tend to differ from mine, try to play around with the optimization-features.

   

Some of the flash-bytes are used to define/program the control-registers for the modules at startup. To save flash, you may use the ECC-part of the memory to store these initialization data.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Sorry here's the project.

   

An additional hint: the linkerr removes all unused code when allowed to do so. That reduces the code-size ether.

   

 

   

Bob

0 Likes