Wio Lite MG126 - errors when compiling

Hi,



I have a fresh install of Arduino 189, downloaded the Wio Lite MG126 boards addon.

I am getting the following error when trying to compile basic sketches (even empty sketches):



Tried the button example, the get_bat_val example and many very small basic sketches.







Here is the normal error report from the button example:



Arduino: 1.8.9 (Windows 8.1), Board: “Seeeduino Wio lite MG126”



arm-none-eabi-gcc: error: {compiler.libraries.ldflags}: No such file or directory



exit status 1

Error compiling for board Seeeduino Wio lite MG126.







And here is the verbose report.





D:__Progs\arduino-1.8.9+Wio_lite_MG126\arduino-builder -dump-prefs -logger=machine -hardware D:__Progs\arduino-1.8.9+Wio_lite_MG126\hardware -hardware D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\tools-builder -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\hardware\tools\avr -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages -built-in-libraries D:__Progs\arduino-1.8.9+Wio_lite_MG126\libraries -libraries D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\sketchbook\libraries -fqbn=Seeeduino:Seeeduino_Wio_Lite_MG126:Wio_Lite_MG126 -ide-version=10809 -build-path C:\TEMP\arduino_build_294110 -warnings=none -build-cache C:\TEMP\arduino_cache_544167 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.bossac.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\bossac\1.7.0 -prefs=runtime.tools.bossac-1.7.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\bossac\1.7.0 -prefs=runtime.tools.CMSIS.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-Atmel.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.CMSIS-Atmel-1.1.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.openocd.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\openocd\0.9.0-arduino6-static -prefs=runtime.tools.openocd-0.9.0-arduino6-static.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\openocd\0.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arduinoOTA\1.2.0 -prefs=runtime.tools.arduinoOTA-1.2.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arduinoOTA\1.2.0 -verbose D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\libraries\wio_lite_ble_demo\example\button\button.ino

D:__Progs\arduino-1.8.9+Wio_lite_MG126\arduino-builder -compile -logger=machine -hardware D:__Progs\arduino-1.8.9+Wio_lite_MG126\hardware -hardware D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\tools-builder -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\hardware\tools\avr -tools D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages -built-in-libraries D:__Progs\arduino-1.8.9+Wio_lite_MG126\libraries -libraries D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\sketchbook\libraries -fqbn=Seeeduino:Seeeduino_Wio_Lite_MG126:Wio_Lite_MG126 -ide-version=10809 -build-path C:\TEMP\arduino_build_294110 -warnings=none -build-cache C:\TEMP\arduino_cache_544167 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.bossac.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\bossac\1.7.0 -prefs=runtime.tools.bossac-1.7.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\bossac\1.7.0 -prefs=runtime.tools.CMSIS.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-Atmel.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.CMSIS-Atmel-1.1.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.openocd.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\openocd\0.9.0-arduino6-static -prefs=runtime.tools.openocd-0.9.0-arduino6-static.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\openocd\0.9.0-arduino6-static -prefs=runtime.tools.arduinoOTA.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arduinoOTA\1.2.0 -prefs=runtime.tools.arduinoOTA-1.2.0.path=D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arduinoOTA\1.2.0 -verbose D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\libraries\wio_lite_ble_demo\example\button\button.ino

Using board ‘Wio_Lite_MG126’ from platform in folder: D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0

Using core ‘arduino’ from platform in folder: D:__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0

Detecting libraries used…

"D:\Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DARDUINO_ARCH_SAMD -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_Wio_Lite_MG126 -DARDUINO_ARCH_SEEEDUINO_WIO_LITE_MG126 -D SAMD -D__SAMD21G18A -mthumb -DUSB_VID=0x2886 -DUSB_PID=0x802A -DUSBCON “-DUSB_MANUFACTURER=“Unknown”” "-DUSB_PRODUCT=“Seeeduino_Wio_Lite_MG126"” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0/CMSIS/Include/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\cores\arduino” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\variants\Wio_Lite_MG126” “C:\TEMP\arduino_build_294110\sketch\button.ino.cpp” -o nul

Generating function prototypes…

"D:\Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DARDUINO_ARCH_SAMD -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_Wio_Lite_MG126 -DARDUINO_ARCH_SEEEDUINO_WIO_LITE_MG126 -D SAMD -D__SAMD21G18A -mthumb -DUSB_VID=0x2886 -DUSB_PID=0x802A -DUSBCON “-DUSB_MANUFACTURER=“Unknown”” "-DUSB_PRODUCT=“Seeeduino_Wio_Lite_MG126"” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0/CMSIS/Include/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\cores\arduino” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\variants\Wio_Lite_MG126” “C:\TEMP\arduino_build_294110\sketch\button.ino.cpp” -o “C:\TEMP\arduino_build_294110\preproc\ctags_target_for_gcc_minus_e.cpp”

“D:\__Progs\arduino-1.8.9+Wio_lite_MG126\tools-builder\ctags\5.8-arduino11/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “C:\TEMP\arduino_build_294110\preproc\ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

"D:\Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DARDUINO_ARCH_SAMD -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_Wio_Lite_MG126 -DARDUINO_ARCH_SEEEDUINO_WIO_LITE_MG126 -D SAMD -D__SAMD21G18A -mthumb -DUSB_VID=0x2886 -DUSB_PID=0x802A -DUSBCON “-DUSB_MANUFACTURER=“Unknown”” "-DUSB_PRODUCT=“Seeeduino_Wio_Lite_MG126"” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0/CMSIS/Include/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\cores\arduino” “-ID:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\variants\Wio_Lite_MG126” “C:\TEMP\arduino_build_294110\sketch\button.ino.cpp” -o “C:\TEMP\arduino_build_294110\sketch\button.ino.cpp.o”

Compiling libraries…

Compiling core…

Using previously compiled file: C:\TEMP\arduino_build_294110\core\variant.cpp.o

Using precompiled core: C:\TEMP\arduino_cache_544167\core\core_Seeeduino_Seeeduino_Wio_Lite_MG126_Wio_Lite_MG126_e45fb668b3ac924903545aa05b31c3ab.a

Linking everything together…

“D:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-gcc” “-LC:\TEMP\arduino_build_294110” -Os -Wl,–gc-sections -save-temps -D SAMD “-TD:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_MG126\1.0.0\variants\Wio_Lite_MG126/linker_scripts/gcc/flash_with_bootloader.ld” “-Wl,-Map,C:\TEMP\arduino_build_294110/button.ino.map” --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,–cref -Wl,–check-sections -Wl,–gc-sections -Wl,–unresolved-symbols=report-all -Wl,–warn-common -Wl,–warn-section-align -o “C:\TEMP\arduino_build_294110/button.ino.elf” “C:\TEMP\arduino_build_294110\sketch\button.ino.cpp.o” “C:\TEMP\arduino_build_294110\core\variant.cpp.o” {compiler.libraries.ldflags} -Wl,–start-group “-LD:\__Progs\arduino-1.8.9+Wio_lite_MG126\portable\packages\Seeeduino\tools\CMSIS\4.5.0/CMSIS/Lib/GCC/” -larm_cortexM0l_math -lm “C:\TEMP\arduino_build_294110/…\arduino_cache_544167\core\core_Seeeduino_Seeeduino_Wio_Lite_MG126_Wio_Lite_MG126_e45fb668b3ac924903545aa05b31c3ab.a” -Wl,–end-group

arm-none-eabi-gcc: error: {compiler.libraries.ldflags}: No such file or directory



exit status 1

Error compiling for board Seeeduino Wio lite MG126.

Hi there~



Please refer to step 4 of the software session of wiki page. thanks.

http://wiki.seeedstudio.com/Wio-Lite-MG126/#software


  1. Open the platform.txt file in the folder: C:\Users$(USER_NAME)\AppData\Local\Arduino15\packages\Seeeduino\hardware\Seeeduino_Wio_Lite_BLE\1.0.0\platform.txt


  2. Go to line 75 and line 76.



    ##recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" “-L{build.path}” {compiler.c.elf.flags} {compiler.c.elf.extra_flags} “-T{build.variant.path}/{build.ldscript}” “-Wl,-Map,{build.path}/{build.project_name}.map” --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o “{build.path}/{build.project_name}.elf” {object_files} -Wl,–start-group {compiler.arm.cmsis.ldflags} -lm “{build.path}/{archive_file}” -Wl,–end-group



    recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" “-L{build.path}” {compiler.c.elf.flags} {compiler.c.elf.extra_flags} “-T{build.variant.path}/{build.ldscript}” “-Wl,-Map,{build.path}/{build.project_name}.map” --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o “{build.path}/{build.project_name}.elf” {object_files} {compiler.libraries.ldflags} -Wl,–start-group {compiler.arm.cmsis.ldflags} -lm “{build.path}/{archive_file}” -Wl,–end-group


  3. If the sample program has a Bluetooth library called, you need to add ## in front of line 75 (ie, comment the line), at the same time, you need to delete ## in front of line 76 (ie, uncomment). Conversely, if the Bluetooth library is not called, but the basic operation of the SAM D21 development board is used, the operation is reversed.


  4. You can find 7 demos in this folder. The button/get_bat_vol demos do not use the bluetooth library, and the rest do.

do I need to do this even when not using the bluetooth library?

Hi there~



If you do not use the bluetooth, you have to change the platform.txt as below.thanks.

[code]recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" “-L{build.path}” {compiler.c.elf.flags} {compiler.c.elf.extra_flags} “-T{build.variant.path}/{build.ldscript}” “-Wl,-Map,{build.path}/{build.project_name}.map” --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o “{build.path}/{build.project_name}.elf” {object_files} -Wl,–start-group {compiler.arm.cmsis.ldflags} -lm “{build.path}/{archive_file}” -Wl,–end-group

##recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" “-L{build.path}” {compiler.c.elf.flags} {compiler.c.elf.extra_flags} “-T{build.variant.path}/{build.ldscript}” “-Wl,-Map,{build.path}/{build.project_name}.map” --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o “{build.path}/{build.project_name}.elf” {object_files} {compiler.libraries.ldflags} -Wl,–start-group {compiler.arm.cmsis.ldflags} -lm “{build.path}/{archive_file}” -Wl,–end-group

[/code]

I am having the same problem and I can’t find the directory you mentioned on my Mac. Indeed, there is no ‘platform.txt’ fine anywhere. Any help is appreciated.

For Mac users the path to the platform.txt is:

~/Library/Arduino15/packages/Seeeduino/hardware/Seeeduino_Wio_Lite_MG126/1.0.0/platform.txt

Compiler errors happen! The following approach should help you get through them with a minimum of fuss and frustration when they do occur.
Avoid them! How? By knowing what you are doing before you do it. Take good notes, keep your source organized so you can find it and refer to it to see how you did something successfully before. Make a cheat sheet of things you do often but can’t quite remember yet.
Don’t write very much code! Well, not all at once anyway. Develop incrementally. Write a little, compile, test (if appropriate), repeat until done. By writing a small amount of code at a time you know any compiler errors you encounter were introduced recently - if you didn’t write very much you’ll have a better idea where to focus your attention.

ALWAYS ALWAYS ALWAYS fix the first compiler error first (by this I mean the one the compiler spit out first). The first error is almost always a real error. Subsequent errors can simply be the result of the compiler being confused by the first error. It makes an attempt to tell you everything that is wrong but it is not very good at it. As you become more experienced with compiler errors you can dive down the list, ignoring the appropriate ones, and fixing the valid ones. Until then, and especially when you feel dazed, confused, angry, frustrated (fill in your favorite compiler-error emotion here), et cetera, you should fix the first error first, if the second error makes little or no sense, just compile and fix the new first compiler error, if any, repeat until done.

If you can’t figure the error out, try commenting out the code you have most recently written until it goes away. Then, reintroduce the commented out code, a bit at a time, until the error reappears. Make sure you understand what specific code caused the error and commit it to memory so that you can avoid that error in the future. This is called learning from experience - very important to a programmer’s sanity and success! Maybe everyone’s sanity and success for that matter.

Take regular breaks. Especially when you are feeling stuck and frustrated. You’ll be amazed how much more fun programming can be if you approach it as an interesting challenge when you are feeling fresh. I, and many others I know, have solved many-a-problem by simple moving away from the computer. Some unconscious part of your mind continues to puzzle over the problem and often solves it for you with little or no apparent effort at all.

Greeting,
Rachel Gomez