Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Force complete rebuild?

  1. #1
    Junior Member
    Join Date
    Mar 2016
    Location
    Austin TX
    Posts
    5

    Force complete rebuild?

    Sorry for what is sort of a duplicate post of another one about increasing receive buffer size.

    I realize that my main problem may be that my code changes are not being compiles. I'm editing serial2.c in the Teensy 3 cores. I change compiler optimization which cause the compiler to report:

    Using core 'teensy3' from platform in folder: C:\Program Files\Arduino\hardware\teensy\avr
    Build options changed, rebuilding all
    but further into the messages it says

    Compiling core...
    Using precompiled core: C:\Users\DHP-1006\AppData\Local\Temp\arduino_cache_942169\core\ core_teensy_avr_teensy31_usb_serial,speed_96,opt_o 2std,keys_en-us_71a00981eaa0bad0868b6b2ed88d327b.a
    Linking everything together...

    I found the referenced file and it is a couple of days old. That means at some point there was a real rebuild but I don't know what caused it. I've tried changing the extension of a renamed copy of the original serial2.c but there was no improvement.

    How can i assure a complete rebuild?

    Thanks,

    John

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by jss87 View Post
    How can i assure a complete rebuild?
    It has been asked for several times - there is no "one-click" possibility.

    But you can simply select other build options, compile once, and then switch back. This can take a long time, depending on the size of your project, but unfortunately it's the fastest option at the moment.
    Maybe Paul Stoffregen can add it now, when the T4 beta test is over.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,427
    I guess one real question is, why do you need it to fully rebuild?

    That is if you change serial2.c Example change either: SERIAL2_TX_BUFFER_SIZE or SERIAL2_RX_BUFFER_SIZE to change the size of the buffers, what else other than serial2.c needs to be recompiled? The change is self contained.

    That is no other file can depend on those defines changing within a .c file.

    As Frank B mentioned, if I really think I need everything to rebuild. I do something like change optimizations or change processor types and if I am really wondering what is going on, I exit Arduino IDE, cd to my temp folder and delete all of the directories like arduino_build_* and arduino_cache_*

    Then I restart arduino.

  4. #4
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,344
    Quote Originally Posted by KurtE View Post
    I guess one real question is, why do you need it to fully rebuild?

    That is if you change serial2.c Example change either: SERIAL2_TX_BUFFER_SIZE or SERIAL2_RX_BUFFER_SIZE to change the size of the buffers, what else other than serial2.c needs to be recompiled? The change is self contained.

    That is no other file can depend on those defines changing within a .c file.

    As Frank B mentioned, if I really think I need everything to rebuild. I do something like change optimizations or change processor types and if I am really wondering what is going on, I exit Arduino IDE, cd to my temp folder and delete all of the directories like arduino_build_* and arduino_cache_*

    Then I restart arduino.
    Well, imagine you are modifying the header file of a library, then you wanted to have a simple rebuild button (Arduino seems not to recognize this change).
    standard method of changing Tools' menu results in TWO complete builds, exiting Arduino IDE, results in a unnecessary long start-up of Arduino. One can do that from time to time, but not while debugging a library.

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,427
    Quote Originally Posted by WMXZ View Post
    Well, imagine you are modifying the header file of a library, then you wanted to have a simple rebuild button (Arduino seems not to recognize this change).
    standard method of changing Tools' menu results in TWO complete builds, exiting Arduino IDE, results in a unnecessary long start-up of Arduino. One can do that from time to time, but not while debugging a library.
    Hi @WMXZ - As you probably know I edit several libraries, all of the time, and very seldom, I have run into issues where dependency checking does not catch if I change a .h file, those .c or .cpp that include it are not updated as well.

    But I was also commenting that changing a #define in a .c file such as serial2.c should only need to rebuild serial2.c ...

    And I understand and like the ability to rebuild cleanly so, when doing projects with makefiles I will often have a: make clean
    To clear out all of the prebuilt stuff and then do a full make.

    But on Arduino side, I am not sure what if anything with teensy, if you go into preferences and turn off: aggressivly cache compiler core
    option would do.

    But Arduino sketch folder does not give you a build clean option... Maybe should request it on the Arduino forum/developer list.

    Again, I was hopefully trying to give simple solutions and thoughts.

    a) Editing serial2.c should always cause serial2.c to be rebuilt. If not - then probably a time stamp date issue. First attempt I would do would be to touch serial2.c. i.e. force a new time stamp. Then try a build again.

    b) Editing some .h file, the Arduino dependency building code should detect which things need to be recompiled, If it somehow misses something, than maybe a bug... Most of the time it has worked for me....

    c) when the above does not work for me, which is very rare I use sledgehammer and delete all of the cache folders, and any miscellaneous arduino build folders that are lying around in my temp folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •