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 Send TopicPrint
Normal Topic 3rd party board (Read 3783 times)
in2
Newbies
*
Offline


Posts: 3
Joined: Dec 31st, 2015
3rd party board
Dec 31st, 2015 at 9:42pm
Print Post  
I'm trying to compile marlin dev firmware from https://github.com/MarlinFirmware/MarlinDev.

I had no trouble getting earlier versions to compile in Visual Micro, but dev version is heavily using 3rd party board definitions introduced with Arduino 1.5 platform and they seem to disagree with VM.

Developers provide couple of custom boards (here https://raw.githubusercontent.com/marlinfirmware/MarlinDev/platform/package_marl...) which I added to Arduino IDE Boards Manager Additional URL. They are available in Arduino IDE under Tool->Board menu and I can select any of them and compile firmware for them without problems.

In Visual Micro, all custom boards are visible and I can pick any of them except custom Marlin Arduino Mega boards. When either of two Mega boards is selected, VM changes the selected board to equivalent Arduino/Genuino Mega board. Marlin boards.txt uses prefix "mega" for these boards and when I change it to "mega2", they can be selected from drop down list in Visual Micro.

They're also doing some toolchain tweaking in platform.txt and it seems that VM is not picking it up. In particular (if I'm interpreting this correctly), they define MARLIN flag when calling the compiler (last parameter):

compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD {build.unique_id_flags} -DMARLIN
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD {build.unique_id_flags} -DMARLIN

This flag is checked in many header files, and compile error is raised when it's missing:
// Sanity check
#ifndef MARLIN
  #error Compilation using cores other than those provided in this distribution are unsupported
#endif

It seems that VM is not adding this flag as can be seen from the output:

r-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"..." "...\Arduino\libraries\MarlinDev\buzzer.cpp" -o .o"

Am I doing something wrong or is this a bug?

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: 3rd party board
Reply #1 - Dec 31st, 2015 at 9:57pm
Print Post  
Hi,

All the flags and the entire pattern is read from the platform.txt.

If you change the platform.txt it should force a recompile but just in case have you restarted the ide or click tools>reloadtoolchains, then clicked "Build>Clean Solution" which clears the cache.

If it still fails switch on "tools>options>compiler>show build properties" and also "verbose" then build and email the output to info[at]visualmicro.com

  
Back to top
IP Logged
 
in2
Newbies
*
Offline


Posts: 3
Joined: Dec 31st, 2015
Re: 3rd party board
Reply #2 - Jan 1st, 2016 at 1:17pm
Print Post  
Hi,

I tried everything you suggested, and it didn't help. I've sent you build outputs from VM and Arduino IDE 1.6.7.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: 3rd party board
Reply #3 - Jan 2nd, 2016 at 5:34pm
Print Post  
The new release 1601.01 has full support for all Marlin boards and also support for debug.

There were a number of issues relating to third party hardware configuration. Marlin bumped into most of them.

The release notes cover some of the fixes, more will be added during the next weeks.

Thanks for the reports.
  
Back to top
IP Logged
 
in2
Newbies
*
Offline


Posts: 3
Joined: Dec 31st, 2015
Re: 3rd party board
Reply #4 - Jan 3rd, 2016 at 4:39pm
Print Post  
It works perfectly now. 
This was what I'd call a fanatic support Smiley

Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint