Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 8 Replies) Custom board file produces errors (Read 6572 times)
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Custom board file produces errors
Mar 3rd, 2020 at 8:26pm
Print Post  
Error message below. Final result is "Object reference not set to an instance of an object". Compiles fine for Arduino Uno. Please help!

Code (C++)
Select All
Compiling 'testsketch' for 'SAMD21E18A (LoBeamsE18A)'
	Preprocess: "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fsingle-precision-constant -Wdouble-promotion -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC   -DF_CPU=48000000L -DARDUINO=10808 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD "-I/CMSIS/Include/" IS-Atmel\1.0.0-mattairtech-2/CMSIS/Device/ATMEL/" -DFLOAT_STRING_SINGLES_DOUBLES -DTIMER_732Hz -DCONFIG_H_DISABLED -DCLOCKCONFIG_INTERNAL_USB -DHID_ONLY -DONE_UART -DONE_WIRE -DONE_SPI -D__8KB_BOOTLOADER__ -D__SAMD21E18A__ -DUSB_VID=0x16D0 -DUSB_PID=0x0B41 -DUSBCON -DUSB_MANUFACTURER="\"Good Interfaces\"" -DUSB_PRODUCT="\"LoBeams-E18\"" -DARM_MATH_CM0PLUS samd\1.6.18-beta-b1\cores\arduino" samd\1.6.18-beta-b1\variants\MT_D21E_revB_lobeams" ms2_samd21e18a\Release\testsketch.cpp" -o "nul"
   Object reference not set to an instance of an object



	An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'testsketch' 




Here is verbose output. I've turned off the 'Deep Search' library discovery process for this build attempt:

Code (C++)
Select All
Compiling 'testsketch' for 'SAMD21E18A (LoBeamsE18A)'
Build Folder: no_lobeams2_samd21e18a/Release"
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Api: 1.1912.28-2
Sketch Book: "file:///C:/Users/justi/Documents/Arduino"
Sketch Include Paths
Core Include Paths
Include Path dware/samd/1.6.18-beta-b1/cores/arduino"
Include Path dware/samd/1.6.18-beta-b1/variants/MT_D21E_revB_lobeams"

Building variant ...
"{runtime.tools.arm-none-eabi-gcc.path}/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fsingle-precision-constant -Wdouble-promotion -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10808 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD "-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" IS-Atmel\1.0.0-mattairtech-2/CMSIS/Device/ATMEL/" -DFLOAT_STRING_SINGLES_DOUBLES -DTIMER_732Hz -DCONFIG_H_DISABLED -DCLOCKCONFIG_INTERNAL_USB -DHID_ONLY -DONE_UART -DONE_WIRE -DONE_SPI -D__8KB_BOOTLOADER__ -D__SAMD21E18A__ -DUSB_VID=0x16D0 -DUSB_PID=0x0B41 -DUSBCON -DUSB_MANUFACTURER="\"Good Interfaces\"" -DUSB_PRODUCT="\"LoBeams-E18\"" -DARM_MATH_CM0PLUS samd\1.6.18-beta-b1\cores\arduino" samd\1.6.18-beta-b1\variants\MT_D21E_revB_lobeams" md\1.6.18-beta-b1\variants\MT_D21E_revB_lobeams\variant.cpp" -o 72de71\core\..\variant\variant.cpp.o"
	Process: "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fsingle-precision-constant -Wdouble-promotion -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10808 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD "-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" IS-Atmel\1.0.0-mattairtech-2/CMSIS/Device/ATMEL/" -DFLOAT_STRING_SINGLES_DOUBLES -DTIMER_732Hz -DCONFIG_H_DISABLED -DCLOCKCONFIG_INTERNAL_USB -DHID_ONLY -DONE_UART -DONE_WIRE -DONE_SPI -D__8KB_BOOTLOADER__ -D__SAMD21E18A__ -DUSB_VID=0x16D0 -DUSB_PID=0x0B41 -DUSBCON -DUSB_MANUFACTURER="\"Good Interfaces\"" -DUSB_PRODUCT="\"LoBeams-E18\"" -DARM_MATH_CM0PLUS samd\1.6.18-beta-b1\cores\arduino" samd\1.6.18-beta-b1\variants\MT_D21E_revB_lobeams" md\1.6.18-beta-b1\variants\MT_D21E_revB_lobeams\variant.cpp" -o 72de71\core\..\variant\variant.cpp.o"
The system cannot find the file specified
Error compiling variant
Build failed for project 'testsketch'
 

« Last Edit: Mar 3rd, 2020 at 9:31pm by Justin Justin »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #1 - Mar 3rd, 2020 at 9:59pm
Print Post  
Hi,

The toolchain is missing. Please try to install the last arduino samd package in board manager to see that reolves the issue.

A verbose build output (file>preferences>compile verbose) from the arduino ide would lso be useful before installing the arduino samd.

Also explain what custom board file means to you.

Thanks
« Last Edit: Mar 3rd, 2020 at 10:03pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #2 - Mar 3rd, 2020 at 10:18pm
Print Post  
Can you please be more specific about how you'd like me to reinstall the last samd board package? From  inside of Visual Micro? I haven't installed anything from Visual Micro so far, it's all being pulled in from my Arduino installation.

Definition of Custom: we've slightly modified the MattairTech SAMD21E18 package ourselves to get some extra PWM functionality. 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #3 - Mar 3rd, 2020 at 10:39pm
Print Post  
Hi

Which .json index file have you added to the arduino ide to obtain the MattairTech board in the boards list of the arduino ide? I don't think it's a standard board.

If you are unsure how to see this info open arduino ide nd click file>preferences and then post here which https:// .json files are listed in the board support package lists?
  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #4 - Mar 3rd, 2020 at 10:48pm
Print Post  
Code
Select All
https://www.mattairtech.com/software/arduino/beta/package_MattairTech_index.json 



Quote:
e

  
Back to top
 
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #5 - Mar 3rd, 2020 at 10:57pm
Print Post  
When I do a fresh install of this custom board in the "No IDE" context, I get a different error. Verbose output attached, simple output below:

Code
Select All
Compiling 'testSketch4' for 'SAMD21G18A (MattairTech Xeno Mini)'
There was an error locating the variants for this board:

arduino.h:78: In file included from
testSketch4.ino: from

WVariant.h: 24:21: fatal error: variant.h: No such file or directory
   #include "variant.h"
   compilation terminated



	An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'testSketch4'
 





Tim@Visual Micro wrote on Mar 3rd, 2020 at 10:39pm:
Hi

Which .json index file have you added to the arduino ide to obtain the MattairTech board in the boards list of the arduino ide? I don't think it's a standard board.

If you are unsure how to see this info open arduino ide nd click file>preferences and then post here which https:// .json files are listed in the board support package lists?

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #6 - Mar 3rd, 2020 at 11:00pm
Print Post  
Okay thanks, we will look at your board package tomorrow it is late now. It will be useful to see it I suspect there is some missing tool definition or inheritance that we are missing. I haven't looked at what tools are or are not defined in the json yet.
  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #7 - Mar 3rd, 2020 at 11:55pm
Print Post  
Awesome, thanks! Btw, the board I'm using is the SAMD21E18A.

Really appreciate the great support.

Tim@Visual Micro wrote on Mar 3rd, 2020 at 11:00pm:
Okay thanks, we will look at your board package tomorrow it is late now. It will be useful to see it I suspect there is some missing tool definition or inheritance that we are missing. I haven't looked at what tools are or are not defined in the json yet.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #8 - Mar 4th, 2020 at 9:28pm
Print Post  
Got you email but was about to respond here Smiley

Yes we can see the issue. Although you board package incles the correct gcc toolchain the package is defined to ignore it and use inheritance to find the toolchain in another package (stm32duino). 

Visual Micro is finding the correct arm-gcc version in both the arduino samd tools and also the stm32duino tools. Visual Micro then uses the wrong version from arduino instead of stm32. Although the arm-gcc version numbers are the same the arduino version doesn't work with your board.

The arduino ide ignores your toolchain and instead uses the smt32duino toolchain :-
C:\Users\[your 2014q1

but you will see in the output that visual micro is using :-
C:\Users\[your 4q1


Potential Short Term Workarounds

We will release a fix for this during the next week but you can probably solve it yourself a few ways. These workarounds might not be suitable but give ideas.

1)

Your custom package does actually install the correct tool chain version. It is possible that adding the following local project board.txt property (or the platform.txt in the package) will force the correct toolchain to be used.

runtime.tools.arm-none-eabi-gcc.path=C:\Users\[your cc\4.8.3-2014q1

2)

If you don't need Arduino samd boards before the fix is released then you can uninstall the arduino samd package and then we should resolve either the stm32duino or your custom toolchain. both are the same.

To uninstall the arduino 3 bit boards you can delete this folder then click Rescan or restart the ide:-
C:\Users\[your name]\AppData\Local\arduino15\packages\arduino

Based on the fact that you do not currently have the .hson index url for the arduino package in your list I suspect option (2) will be the easist because you don't use the arduino boards (arduino zero/due etc)

Does this make sense.

  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #9 - Mar 11th, 2020 at 6:21pm
Print Post  
I have been trying both of these on several different machines. For workaround #2, I still see all the basic Arduino boards even after I delete the folder in question. (\AppData\Local\Arduino15\packages\Arduino\). Same error when 

For workaround #1, where exactly do I place the toolchain line? I'll attach my boards.txt and platform.txt files, if you can tell me where I insert the new line I'd really appreciate it.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Custom board file produces errors
Reply #10 - Mar 11th, 2020 at 6:25pm
Print Post  
For Workaround #1 you need to add a Local Board.txt File: Right click on Project > Add > Local Board.txt

If you add the line to that file, then save and build again it use the new location.
  
Back to top
 
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #11 - Mar 26th, 2020 at 4:00pm
Print Post  
Unfortunately, this did not fix the problem. 

Debug output emailed.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #12 - Mar 26th, 2020 at 11:50pm
Print Post  
Hi

The debug output you sent does not include the build properties. 

Please follow the guide in yellow above and enable both properties from the compile menu then send the output. Also switch off debugging so we get a cleaner output.

Please also zip and email your project folder so that we can see the board.txt is located correctly.

Thanks

« Last Edit: Mar 26th, 2020 at 11:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #13 - Apr 12th, 2020 at 1:01am
Print Post  
Hi Tim,
Just emailed you. Still having the same issue, even when I  add a local board file.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Custom board file produces errors
Reply #14 - Apr 14th, 2020 at 5:47pm
Print Post  
Assuming you are using the latest release of Visual Micro. We are currently struggling to replicate this, would it be possible to attach a fresh build log with the build properties / verbose as shown at the top? (just so we can check all other factors afresh)
« Last Edit: Apr 14th, 2020 at 7:31pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #15 - Apr 15th, 2020 at 4:44pm
Print Post  
You don't need the board.txt with the latest visual micro versions.

You do need to switch on both options requested above because your emailed output only contains the build info. We need to see your config and we can not confirm which version of Visual Micro you are using without that info.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #16 - Apr 15th, 2020 at 10:16pm
Print Post  
Thanks for sending the trace files which show you are still on the old version and have not updated Visual Micro.
  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #17 - Apr 21st, 2020 at 10:13pm
Print Post  
I have updated Visual Studio and I have updated Visual Micro. I am still seeing the same results. Please find the output attached to this post. I have made sure that both build config and debug are both enabled.

https://ibb.co/ZJ6kvGp

edit: selected correct board and uploaded correct log
« Last Edit: Apr 21st, 2020 at 10:20pm by Justin Justin »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Custom board file produces errors
Reply #18 - Apr 22nd, 2020 at 11:19am
Print Post  
None of your tool are being found so maybe the .json index file is missing or some other tool is causing an issue.

Please show build output from the arduino ide with file>preference>verbose compile enabled.

Thanks
  
Back to top
WWW  
IP Logged
 
Justin Justin
Junior Member
**
Offline


Posts: 11
Joined: Mar 3rd, 2020
Re: Custom board file produces errors
Reply #19 - Apr 23rd, 2020 at 9:26pm
Print Post  
Arduino output attached!
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint