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
Hot Topic (More than 8 Replies) Prototype Generation Fails for Tasmota (Read 5014 times)
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Prototype Generation Fails for Tasmota
Apr 8th, 2020 at 2:51pm
Print Post  
Hi, 

I’m facing the same scenario, except it’s for latest version of all of them 
Which are :
        Visual Studio  2019 16.5.2
        Visual Micro   20.03.21.3
        Arduino :      1.8.10
     Tasmota        8.2 (https://github.com/arendst/Tasmota)

After reading this post, I thought it should be solved, so I’m certainly doing something wrong.

Your help would be greatly appreciated.

Thank you.


PS: Sorry, but I didn't find the button to attach log files

Quote:
Compiling 'sonoff' for 'Generic ESP8266 Module'
 
sonoff.ino: 170:1: error: expected unqualified-id before 'else
   uint8_t multipress[MAX_KEYS] = { 0 };       \\ Number of button presses within multiwindow
 
sonoff.ino: 171:1: error: expected unqualified-id before 'else
   uint8_t lastwallswitch[MAX_SWITCHES];       \\ Last wall switch states
 
sonoff.ino: 420:1: error: expected unqualified-id before 'else
 
sonoff.ino: 435:1: error: expected unqualified-id before 'else
   fallback_topic_flag = (strstr(topicBuf, mqtt_client) != NULL)
 
sonoff.ino: 596:1: error: expected unqualified-id before 'else
   * 3 = Set relays to last saved state after power on
 
sonoff.ino: 791:1: error: expected unqualified-id before 'else
   snprintf_P(stemp1, sizeof(stemp1), kModules[i].name)
Error compiling project sources
Build failed for project 'sonoff'
« Last Edit: Apr 10th, 2020 at 8:55pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #1 - Apr 8th, 2020 at 3:31pm
Print Post  
Would it be possible to email the logs and the solution to us (link in yellow box at the top, include link this posting), so we can investigate further?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #2 - Apr 9th, 2020 at 7:04am
Print Post  
We have investigated this, and a new release is available in the forum with a fix for the problem seen here with the Prototype Generation (20.03.21.7)

Let us know if you have any further issues
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #3 - Apr 9th, 2020 at 4:36pm
Print Post  
Hi Simon, 

Thank you very much for the updated version, but I'm confused, I didn't see any changes in the behaviour.

My actions : 
    Uninstalled previous version of the extension in VS2019
    Downloaded your latest version : Visual.Micro.Arduino.Studio_20_03_21_7.vsix 
    Launch VSix Installer 
    Cleaned - Compiled - 
    => Same Error

I sent you the Compiler output and the generated tasmota.cpp
It seems that AddLog_P2 is still not present 

Thank you for your support
Best Regards
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #4 - Apr 23rd, 2020 at 11:45am
Print Post  
We have found the secondary issue here, and a new release has been published to the forum (20.03.21.9), which should resolve this fully now and allow this project to build succesfully.

Let us know if you have any further issues around this.
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #5 - Apr 28th, 2020 at 4:25am
Print Post  
Hi Simon, 

Fantastic !
Everything works seamlessly, you did a Great job. 

The entire projects builds successfully and can be uploaded into the ESP8266.

Thank you so much for your professional efforts.

Best regards
Gregory
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #6 - Jun 9th, 2020 at 4:43am
Print Post  
Hi Simon,

I'm back, with certainly a similar issue Embarrassed

After several weeks of successfull compilations with your solution, I moved to the latest version of Tasmota framework (8.3.1), (solved many bugs and implemented new drivers).

After upgrading entire development tool chain (including also Arduino 1.8.12 and ESP Core 2.7.1) 

I could successfully compile it under Arduino, but not with VMicro. 

Extract of compilation output :

Code
Select All

Extracting .ino prototypes ...
5.0-4-b40a506\bin\xtensa-lx106-elf-g++" -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_GENERIC_OBJECT -DVM_DEBUGGER_SOFT_TRANSPORT_WRITER=Serial -DVM_DEBUGGER_SOFT_TRANSPORT=Serial -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUGGER_TYPE_GENERIC_OBJECT=21 -DVM_DEBUGGER_TYPE_NO_SERIAL=20 -DVM_DEBUGGER_TYPE_MS430_SERIAL_=19 -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0   -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ s/sdk/include" s/sdk/lwip2/include" s/sdk/libc/xtensa-lx106-elf/include" e" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -DBEARSSL_SSL_BASIC -w -x c++ -E -CC -DNONOSDK22x_191105=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=0 -DLWIP_IPV6=0 -DARDUINO=108012 -DARDUINO_ESP8266_GENERIC -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_GENERIC\" -DLED_BUILTIN=2 -DFLASHMODE_DOUT -DESP8266 s\esp8266" ants\generic" -I"c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\qgx1xzdm.dlw\Micro Platforms\default\debuggers\VM_DBG" -I"D:\_Arduino\Arduino1812\portable\sketchbook\libraries\esp-knx-ip-0.5.2" aries\EEPROM" aries\ESP8266WiFi\src" aries\ESP8266WebServer\src" aries\ESP8266HTTPClient\src" aries\ESP8266httpUpdate\src"  aries\ESP8266mDNS\src" aries\Wire" aries\Ticker\src" -I"D:\_Arduino\Arduino1812\portable\sketchbook\libraries\LinkedList-1.2.3" " c" aries\SPI" " ta.cpp" -o eproc\sketch-gcc-e.cpp"
problem running GCC-E during prototype extraction

Falling back and continuing. Please report this issue in our forum or send your .ino code to code@visualmicro.com. Thank you!

Building variant ...

  Using previously compiled variant

Building core ...


 



Please let me know if you need the full devlpt image.

Regards
Gregory
  

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


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #7 - Jun 9th, 2020 at 2:38pm
Print Post  
Thanks for the update, and if it is possible to send us the full image again that would be ideal, and we will investigate further.
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #8 - Jun 9th, 2020 at 8:10pm
Print Post  
Hi, 

Link to full image sent.

Regards
Gregory
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #9 - Jun 10th, 2020 at 6:48am
Print Post  
Hi, 

Just for your info, in case you're facing same trouble with null pointer in Board Manager, it seems that there is an issue with Arduino and BoardManager freshly on-going

https://github.com/arduino/Arduino/issues/10332

The package I sent over, was fully working until yesterday, but since ...

Regards
Gregory
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #10 - Jun 10th, 2020 at 11:47am
Print Post  
Thanks for the package and the update.

Running on my Machine the prototype discovery finds 0 prototypes, and reviewing your output it appears that the Serial Debugger is enabled as well?  I am seeing a different problem at present..

To ensure we are replicating everything correctly would it be possible to send:-
1) the full build output with verbose/properties options set (as shown in the yellow box at the top)
2) the merged tasmota.cpp file from the build directory?
« Last Edit: Jun 10th, 2020 at 11:51am by Simon@Visual Micro »  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #11 - Jun 10th, 2020 at 4:02pm
Print Post  
Hi,

After reviewing the resulting tasmota.cpp, 
I found something weird (at least for me)

Original code in support.ino line 439

Code (C++)
Select All
char IndexSeparator(void)
{
/*
  // 20 bytes more costly !?!
  const char separators[] = { "-_" };

  return separators[Settings.flag3.use_underscore];
*/
  if (Settings.flag3.use_underscore) {  // SetOption64 - Enable "_" instead of "-" as sensor index separator
    return '_';
  } else {
    return '-';
  }
}

 



Resulting code in tasmota.cpp Line 2969

Code (C++)
Select All
char IndexSeparator(void)
{
/*
  // 20 bytes more costly !?!
  const char separators[] = { "-_" };

  return separators[Settings.flag3.use_underscore];
*
  if (Settings.flag3.use_underscore) { 
    return '_';
  } else {
    return '-';
  }
}

 



For whatever reason, it misses the closing ‘/’ of the comment 

Then I simply removed this comment

Gave it try, and … voilà … it worked



Attached the output log file, and the generated tasmota.CPP

Hope this could help to nail down the root cause

edit:
Pushed a litlle bit further ...

This works/compiles
Code (C++)
Select All
char IndexSeparator(void)
{
/*
    // 20 bytes more costly !?!
    const char separators[] =

    return separators[Settings.flag3.use_underscore];
*/
 




and this not anymore ...

Code (C++)
Select All
char IndexSeparator(void)
{
/*
    // 20 bytes more costly !?!
    const char separators[] = "

    return separators[Settings.flag3.use_underscore];
*/
 



Just a comma " difference after the '=' sign ... in a comment

Hope this can help you

Regards
Gregory

BW : The guys from Arduino fixed the trouble with the Board Manager JSON download
« Last Edit: Jun 10th, 2020 at 4:19pm by GregS1000RR »  

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


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #12 - Jun 10th, 2020 at 4:05pm
Print Post  
Thanks for the update and analysis, this is the issue I experienced, but it didn't error and fallback so thought I had another difference...

We will investigate the issue with that specific comment, and update when a fix is available.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: Prototype Generation Fails for Tasmota
Reply #13 - Jun 11th, 2020 at 4:06pm
Print Post  
After deeper investigation we have improved the comment stripper to resolve this issue in the latest release 20.05.18.8

Let us know if you have any further issues around this project, and thanks again for the detail and project to replicate.
  
Back to top
 
IP Logged
 
GregS1000RR
Newbies
*
Offline


Posts: 8
Joined: Apr 7th, 2020
Re: Prototype Generation Fails for Tasmota
Reply #14 - Jun 12th, 2020 at 12:36pm
Print Post  

Great !

Worked perfectly.

Thank you for your professional work, highly appreciated   

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