Frantech 0 Posted May 7, 2019 Share Posted May 7, 2019 I am a first time user running Energia 1.7.7E21 on a Windows 7 machine. (Fresh install). My board is an EX-TM4C123GXL. (Tivia C Series Launchpad) The Problem (1 of 2) While trying to run the Blink example program I get the error "Error while detecting libraries included by..." The full message is given below. I have searched, but have not been able to locate information on where the includes should be. Switching to verbose output has provided more info but I'm not quite sure what I am looking for. The code has this as it's first line (this line does not show up in the IDE): #include <Arduino.h> I have tried copying Arduino.h from another location into ... Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system/inc but this did not resolve the issue. I suspect that there may be something wrong with my install but cannot spot it. Any help would be much appreciated. The full messages returned were as follows: Energia: 1.8.7E21 (Windows 7), Board: "LaunchPad (Tiva C) w/ tm4c123 (80MHz)" C:\Program Files (x86)\energia-1.8.7E21\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\energia-1.8.7E21\hardware -hardware C:\Users\Frank\AppData\Local\Energia15\packages -tools C:\Program Files (x86)\energia-1.8.7E21\tools-builder -tools C:\Program Files (x86)\energia-1.8.7E21\hardware\tools\msp430 -tools C:\Users\Frank\AppData\Local\Energia15\packages -built-in-libraries C:\Program Files (x86)\energia-1.8.7E21\libraries -libraries C:\Users\Frank\Documents\Energia\libraries -fqbn=energia:tivac:EK-TM4C123GXL -ide-version=10807 -build-path C:\Users\Frank\AppData\Local\Temp\arduino_build_567315 -warnings=none -build-cache C:\Users\Frank\AppData\Local\Temp\arduino_cache_167371 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620 -prefs=runtime.tools.arm-none-eabi-gcc-6.3.1-20170620.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620 -prefs=runtime.tools.dslite.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\dslite\7.2.0.2096 -prefs=runtime.tools.dslite-7.2.0.2096.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\dslite\7.2.0.2096 -verbose C:\Program Files (x86)\energia-1.8.7E21\examples\01.Basics\Blink\Blink.ino C:\Program Files (x86)\energia-1.8.7E21\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\energia-1.8.7E21\hardware -hardware C:\Users\Frank\AppData\Local\Energia15\packages -tools C:\Program Files (x86)\energia-1.8.7E21\tools-builder -tools C:\Program Files (x86)\energia-1.8.7E21\hardware\tools\msp430 -tools C:\Users\Frank\AppData\Local\Energia15\packages -built-in-libraries C:\Program Files (x86)\energia-1.8.7E21\libraries -libraries C:\Users\Frank\Documents\Energia\libraries -fqbn=energia:tivac:EK-TM4C123GXL -ide-version=10807 -build-path C:\Users\Frank\AppData\Local\Temp\arduino_build_567315 -warnings=none -build-cache C:\Users\Frank\AppData\Local\Temp\arduino_cache_167371 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620 -prefs=runtime.tools.arm-none-eabi-gcc-6.3.1-20170620.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620 -prefs=runtime.tools.dslite.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\dslite\7.2.0.2096 -prefs=runtime.tools.dslite-7.2.0.2096.path=C:\Users\Frank\AppData\Local\Energia15\packages\energia\tools\dslite\7.2.0.2096 -verbose C:\Program Files (x86)\energia-1.8.7E21\examples\01.Basics\Blink\Blink.ino Using board 'EK-TM4C123GXL' from platform in folder: C:\Users\Frank\AppData\Local\Energia15\packages\energia\hardware\tivac\1.0.3 Using core 'tivac' from platform in folder: C:\Users\Frank\AppData\Local\Energia15\packages\energia\hardware\tivac\1.0.3 Detecting libraries used... "C:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\tools\\arm-none-eabi-gcc\\6.3.1-20170620/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -mmcu=cortex-m4 -DF_CPU=80000000L -DARDUINO=10807 -DENERGIA=10807 -DENERGIA_EK_TM4C123GXL -DENERGIA_ARCH_TIVAC "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\variants\\EK-TM4C123GXL" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system/driverlib" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system/inc" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\cores\\tivac" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\variants\\EK-TM4C123GXL" "C:\\Users\\Frank\\AppData\\Local\\Temp\\arduino_build_567315\\sketch\\Blink.ino.cpp" -o nul Error while detecting libraries included by C:\Users\Frank\AppData\Local\Temp\arduino_build_567315\sketch\Blink.ino.cpp Generating function prototypes... "C:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\tools\\arm-none-eabi-gcc\\6.3.1-20170620/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -mmcu=cortex-m4 -DF_CPU=80000000L -DARDUINO=10807 -DENERGIA=10807 -DENERGIA_EK_TM4C123GXL -DENERGIA_ARCH_TIVAC "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\variants\\EK-TM4C123GXL" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system/driverlib" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system/inc" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\cores\\tivac" "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\variants\\EK-TM4C123GXL" "C:\\Users\\Frank\\AppData\\Local\\Temp\\arduino_build_567315\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Frank\\AppData\\Local\\Temp\\arduino_build_567315\\preproc\\ctags_target_for_gcc_minus_e.cpp" arm-none-eabi-g++: error: unrecognized command line option '-mmcu=cortex-m4'; did you mean '-mcpu=cortex-m4'? exit status 1 Error compiling for board LaunchPad (Tiva C) w/ tm4c123 (80MHz). Problem 2 - Unrecognized command line option -mmcu. This appears to be a typo. The preferences.txt file found at File -> Preferences does not have an entry that matches. Any help on where to find this setting would be appreciated. Thanks in advance Quote Link to post Share on other sites
Rei Vilo 695 Posted May 7, 2019 Share Posted May 7, 2019 Try #include "Energia.h". Quote Link to post Share on other sites
Frantech 0 Posted May 8, 2019 Author Share Posted May 8, 2019 Thanks for the reply but the compiler arm-none-eabi-g++ has this message in the output "-IC:\\Users\\Frank\\AppData\\Local\\Energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\cores\\tivac" which points to this file Arduino.h which contains... // Stub for Arduino header file - For added compatibility with existing arduino libraries // Include Energia instead #include "Energia.h" So I guess that Energia.h is being found. (?) Up until now, I have expected that the problem was in finding Arduino.h, but now I'm thinking that it could be something to do with one of the header files included by Energia.h. (I assume that the nested includes all work). Does anyone have any tips on how to figure exactly which include/s are being used or not please? Quote Link to post Share on other sites
Frantech 0 Posted May 10, 2019 Author Share Posted May 10, 2019 An update. I have been able to able to run the pre-compile step outside of the IDE by copying the IDE output message (Command actually) as it appears after "Generating function prototypes...". I put this into a .bat file substituting it for <here> in the example below: echo off cmd /c "<here>" So I could correct (I think) the compiler option and then run it to create the output file called... "C:\Users\Frank\AppData\Local\Temp\arduino_build_798647\preproc\ctags_target_for_gcc_minus_e.cpp". So that is progress of sorts. Only the file is over 12,000 lines referencing hundreds of other files. It includes lines like: # 202 "c:\\users\\frank\\appdata\\local\\energia15\\packages\\energia\\hardware\\tivac\\1.0.3\\system\\driverlib\\adc.h" followed by the expansion/inclusion of that line. Since the pre-compile step ran OK to completion, as far as i can tell, and the only change I made was to the compiler option (from -mmcu=cortex-m4 to --mcpu=cortex-m4) then I think the message... Error while detecting libraries included by C:\Users\Frank\AppData\Local\Temp\arduino_build_798647\sketch\Blink.ino.cpp is a red herring. So is it possible for me to edit the compiler option so that the IDE can use it? ...and if so where could I find it? I have looked in the IDE preferences.txt file but I have no idea where it would be. Any help would be welcome... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.