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

Include sketchbook folder and LibrarySettings.h#3757

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

Closed
NicoHood wants to merge1 commit intoarduino:masterfromNicoHood:compileInSketch

Conversation

@NicoHood
Copy link
Contributor

Test to improve#3717

Some notes to this PR:

  • It (basically) does the same (idea) as the linked PR above
  • You do not need to save the file before it is used for compiling
  • A Global "LibrarySetting.h" filename is used for custom Library settings
  • If it does not exists in the sketch folder it will be created emty
  • You can still overwrite this empty file in the IDE again
  • If you create and delete the file this wont be noticed
  • The try catch may be improved, I am not a java pro.

This way you can place custom settings in this file. You can also add something like
#define LIBCONFIG_EXISTS to use custom settings or#ifndef SETTING. The reason why a specific filename is used is, that it will compile fine even if the file was not created by the user.

You can also create custom settings likeMylibSetting.h and include it from the library. This makes the file required to exist. If not it will throw a compile error. If the file also exists in the library, the library file will be preferred (so you should use the Librarysettings.h instead for this usecase).

Independent Issue found:

The deletion seems to be a general IDE issue. If you create a file and compile the sketch the file is copied to the build folder. If you delete the file again it wont be noticed and the sketchfolder still has this file. (The core has the same error,which is ignored).

I tried to delete the file after each compile. That worked fine till the point when LibrarySettings.h causes a compile error. The file wont be deleted then (in the build folder). If you delete it (in the IDE) its still in the build folder.

So this is a general, separate bug. Should I open a ticket for this?

May anyone build this to test it?

@matthijskooijman
Copy link
Collaborator

@ArduinoBot build this please

@ffissore
Copy link
Contributor

@ArduinoBot build this please

@ffissore
Copy link
Contributor

I guess it was sleeping...

@ffissoreffissore added Component: CompilationRelated to compilation of Arduino sketches On HoldThe pull request is blocked from being merged labelsSep 2, 2015
@ffissoreffissore self-assigned thisSep 2, 2015
@ffissore
Copy link
Contributor

I have to put this on hold as I'm rewriting Compiler from scratch. We are internally testing it. More news will follow

@NicoHood
Copy link
ContributorAuthor

Okay. If you rewrite the compiler please also consider PR#3697 which is also very important.

@PaulStoffregen
Copy link
Contributor

I have to put this on hold as I'm rewriting Compiler from scratch.

Yikes!

Please please please push this to a branch, or at least the nightly build for a while, before publishing in a full release.

@NicoHoodNicoHood mentioned this pull requestSep 12, 2015
@NicoHood
Copy link
ContributorAuthor

I have another idea if you will implement this in the new compiler:
Instead of LibrarySetting.h I'd call it just Settings.h or ArduinoSettings.h. Then include it in the Arduino.h file.

  • This way we can easily overwrite things like RX_BUFFER_SIZE as well.
  • We could also add options to disable the USB-Core
  • We could add an option to disable the SerialEvent function. You can keep it by default for compatibility, but set a few parameters to tweak the Arduino code and save some flash
  • We could use this for libraries, such as PinChangeInterrupt to effectifly make use of direct port access with pre defined pins. This also works for other libraries. A known pin at runtime is way faster and also saves a lot of time.
  • Global debug options could be enabled this way.
  • Many more things I can imagine of and you as well.

@ffissore
Copy link
Contributor

@facchinm
Copy link
Member

Closing this as the discussion about the metadata (or configuration) file is going to take place inarduino-cli repo and in the mailing list

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@cmagliecmaglie

Labels

Component: CompilationRelated to compilation of Arduino sketchesOn HoldThe pull request is blocked from being merged

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@NicoHood@matthijskooijman@ffissore@ArduinoBot@PaulStoffregen@facchinm@cmaglie

[8]ページ先頭

©2009-2025 Movatter.jp