Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldscripts: a Makefile to change c++ vtables location #4567

Merged
merged 3 commits into from
Mar 26, 2018

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Mar 26, 2018

  • using this makefile is sufficient
    no need to add more options to the boards generator as previously proposed
  • this pr's eagle.app.v6.common.ld is regenerated with make iram
    to be noted: cpp remove comments
  • a warning is added in the generated file
$ make
available rules:
  iram: move c++ vtables to iram (= default in git master repository)
  heap: move c++ vtables to heap
$ make heap
c++ vtables moved to heap
$ make iram
c++ vtables moved to iram

Copy link
Collaborator

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

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

Looks good, couple little things to make parsing the output easier and more flexible.

@echo " heap: move c++ vtables to heap"

heap:
@(echo "$(WARN)"; $(CPP) -E -DVTABLES_IN_DRAM $(COMMON).h | grep -v '^#') > $(COMMON)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add in a -CC to preserve comments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done for both


iram:
@(echo "$(WARN)"; $(CPP) -E -DVTABLES_IN_IRAM $(COMMON).h | grep -v '^#') > $(COMMON)
@echo "c++ vtables moved to iram"
Copy link
Collaborator

Choose a reason for hiding this comment

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

-CC to preserve comments

Can you add a "flash:" branch, with the appropriate #if defined(VTABLES_IN_FLASH) to the makefile and app.ld file as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd prefer push as-is since it does not change current ldscripts alot (thanks to your -CC option I was not aware of).
So you can take it as yours and improve ldscripts like I'm not able to.

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

Successfully merging this pull request may close these issues.

2 participants