Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build option#174

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 2 commits intostm32duino:masterfromfpistm:build_option
Dec 19, 2017
Merged

Build option#174

fpistm merged 2 commits intostm32duino:masterfromfpistm:build_option
Dec 19, 2017

Conversation

@fpistm
Copy link
Member

It is now possible to customize some core definitions
or gcc options thanks a file named "build_opt.h"
in the sketch directory. (using@file gcc option)

User can add it thanks the Arduino IDE in a tab to easily customize the core options.
That's why '.h' extension is used as IDE allows only those one: ino, h, hpp, c, cpp, pde.
Note: file is automatically copied in the{build.path}/sketch/ directory

Example of file content to change F_CPU value:
-UF_CPU -DF_CPU=72000000UL

If the file does not exist an empty one is created in the{build.path}/sketch/ directory.

Fix#41

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm added the enhancementNew feature or request labelDec 11, 2017
@fpistmfpistm added this to theNext release milestoneDec 11, 2017
@fpistmfpistm self-assigned thisDec 11, 2017
@fpistmfpistm requested a review froma userDecember 11, 2017 16:36
@fpistm
Copy link
MemberAuthor

fpistm commentedDec 12, 2017
edited
Loading

One example using the STM32Ethernet and LwIP libraries:
Adding in build_opt.h:
-DLWIP_DEBUG=1 -DLWIP_DBG_TYPES_ON=LWIP_DBG_ON -DIP_DEBUG=LWIP_DBG_ON "-DAPI_LIB_DEBUG LWIP_DBG_ON"
Allow to enable some debug without need to edit core or libraries files. Only at sketch level.

But there is a limitation. Even if the "Aggressively cache compiled core" is disabled.
When project has been built one time, changing build option in the file will not be taken into account as build see no change on source file (Using previously compiled file)
Only way to take it into account is to reopen IDE or clean the tmp build dir.

It is now possible to customize some core definitionsor gcc options thanks a file named "build_opt.h"in the sketch directory. (using@file gcc option)Example of file content to change F_CPU value:-UF_CPU -DF_CPU=72000000ULIf the file does not exist an empty one is created.Fixstm32duino#41Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm merged commit4ac494c intostm32duino:masterDec 19, 2017
@fpistmfpistm deleted the build_option branchDecember 19, 2017 10:08
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull requestApr 10, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer
Reviewers whose approvals may not affect merge requirements

Assignees

@fpistmfpistm

Labels

enhancementNew feature or request

Projects

None yet

Milestone

Next release

Development

Successfully merging this pull request may close these issues.

1 participant

@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp