Skip to content

Conversation

devyte
Copy link
Collaborator

@devyte devyte commented Sep 13, 2018

Fixes #5118

@@ -177,6 +178,12 @@ uint16_t EspClass::getMaxFreeBlockSize(void)
return umm_max_block_size();
}

uint32_t EspClass::getFreeContStack()
{
extern cont_t* g_pcont;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This declaration is already done in cont.h

As a general question, why don't we write these trivial functions directly inside the class ?
This would have the effect of reducing the final image size if they are not used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since -ffunction-sections is used, all unused functions should be stripped anyway, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn right !
I was totally unaware of that and I thought that was the LTO feature that we don't have.
So I uselessly separated some code from Esp.cpp namely Esp-frag.cpp and Esp-version.cpp.
Thanks for opening my eyes, I will seek details on the differences between these two gcc/ld features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants