2 Replies Latest reply on Nov 20, 2014 8:11 AM by mdw

    Compliation parameters in Arduino IDE

    mdw

      Where is the exact place to customize the compilation parameters?

       

      I wondered how I could add some dynamic library to the build path - for instance librt to get message queue support. Considering this article IoT - Efficient communication between Arduino* and Linux native processes | Intel® Developer Zone some other dynamic libs as pthreads are already included per default. How does this work?

       

      Matthias

        • 1. Re: Compliation parameters in Arduino IDE
          Intel_Peter

          Hello mdw,

           

          I researched a little and I found this, it talks about specifying the flags of the Arduino Compiler maybe it helps you.

          If you have any more doubts don't hesitate to ask.

           

          Regards,

                      Peter

          • 2. Re: Compliation parameters in Arduino IDE
            mdw

            I think I have found the locations (thx to a special grep):

            ./hardware/arduino/edison/platform.linux.txt:44:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/edison/platform.win.txt:43:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/edison/platform.linux64.txt:43:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/edison/platform.osx.txt:43:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/x86/platform.linux.txt:41:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/x86/platform.win.txt:40:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/x86/platform.linux64.txt:41:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            ./hardware/arduino/x86/platform.osx.txt:40:recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread

            So I will need to add -lrt to these places.

            1 of 1 people found this helpful