Wio Lite MG126 - errors when compiling

Simplify IoT Development.

Moderators: lily.li, violet, seth.welday

Post Reply
martyn_currey
Pre-kindergarten
Pre-kindergarten
Posts: 8
Joined: Fri Jul 05, 2019 2:47 pm

Wio Lite MG126 - errors when compiling

Post by martyn_currey » Sun Sep 08, 2019 2:51 pm

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.

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: Wio Lite MG126 - errors when compiling

Post by bill.yu » Mon Sep 09, 2019 4:43 pm

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.

martyn_currey
Pre-kindergarten
Pre-kindergarten
Posts: 8
Joined: Fri Jul 05, 2019 2:47 pm

Re: Wio Lite MG126 - errors when compiling

Post by martyn_currey » Mon Sep 09, 2019 7:05 pm

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

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: Wio Lite MG126 - errors when compiling

Post by bill.yu » Tue Sep 10, 2019 2:07 pm

Hi there~

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

Code: Select all

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



waisberg343
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Sat Sep 21, 2019 5:33 am

Re: Wio Lite MG126 - errors when compiling

Post by waisberg343 » Sun Sep 29, 2019 7:19 am

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.

kea
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Tue Mar 27, 2018 3:14 pm

Re: Wio Lite MG126 - errors when compiling

Post by kea » Mon Oct 14, 2019 1:22 am

For Mac users the path to the platform.txt is:
~/Library/Arduino15/packages/Seeeduino/hardware/Seeeduino_Wio_Lite_MG126/1.0.0/platform.txt

Post Reply