Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Build error: a15 cannot be used in asm here (SOLVED core does not support no optimization) (Read 138 times)
Arnaud
Newbies
*
Offline



Posts: 6
Build error: a15 cannot be used in asm here (SOLVED core does not support no optimization)
May 23rd, 2020 at 4:52pm
 
Hi everybody,

New user here.

I am using an esp8266 Wemos D1 mini pro.
My desktop environment is Win 10 64.
My Arduino version is 1.8.12.


I got the error in the title with my Arduino sketch when trying to debug. It compiled fine in Release mode and I was able to upload the sketch to my board where it behaved as expected. When I try to debug, the compiler fails to build and the debugging process cannot even start, as a result there is no output in the Output window for debug.

I followed the information here to try and use the debug mode: https://www.visualmicro.com/page/ESP8266-Debugging.aspx

My sketch shows "No issues found" with a white tick mark on a green background.

I switched on verbose and build properties for the compiler.

The crux of the problem seems to be linked to a file called pgmspace.h on line 107 but I am not sure what that problem is.

Code:
stdio.h:6: In file included from
stdio.h:63: from
cstdio:42: from
random:39: from
stl_algo.h:65: from
algorithm:62: from
WiFiClientSecureBearSSL.cpp:27: from

pgmspace.h: In function uint32_t pgm_read_dword_unaligned(const void*)

pgmspace.h: 107:1: error: a15 cannot be used in asm here
  Using previously compiled file: C:\Users\addiv\AppData\Local\Temp\VMBuilds\20200523_RootaBoota_01\esp8266_d1_mini_pro\Debug\ESP8266WiFi\WiFiServer.cpp.o
  Using previously compiled file: C:\Users\addiv\AppData\Local\Temp\VMBuilds\20200523_RootaBoota_01\esp8266_d1_mini_pro\Debug\ESP8266WiFi\WiFiServerSecureAxTLS.cpp.o
  Using previously compiled file: C:\Users\addiv\AppData\Local\Temp\VMBuilds\20200523_RootaBoota_01\esp8266_d1_mini_pro\Debug\ESP8266WiFi\WiFiServerSecureBearSSL.cpp.o
  Using previously compiled file: C:\Users\addiv\AppData\Local\Temp\VMBuilds\20200523_RootaBoota_01\esp8266_d1_mini_pro\Debug\ESP8266WiFi\WiFiUdp.cpp.o 



Line 107 in that file is the closing curly bracket in that function: Code (C++):
static inline uint32_t pgm_read_dword_unaligned(const void *addr) {
  uint32_t res;
  pgm_read_dword_with_offset(addr, res);
  return res;
} 



If anybody knows how to get solve that issue it would be great. I am attaching the build log as well as the pgmspage.h file that crashed the party in the attached zip file.

Thanks,
Arnaud
Back to top
« Last Edit: May 25th, 2020 at 2:39pm by Visual Micro »  

BuildProblem.zip (31 KB | 2 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10653
United Kingdom
Re: Build error: a15 cannot be used in asm here
Reply #1 - May 23rd, 2020 at 4:58pm
 
Thanks for the info. The error is with the DNSServer which I expect does not support switching off optimization. I suggest you set "disabled optimization" to "project only" or "off".

When you switch off optimization we add the -O0 flag to the compiler. We are due to experiment with -Og or a high optimization value than 0.

Does this help?
Back to top
« Last Edit: May 23rd, 2020 at 5:00pm by Visual Micro »  
WWW  
IP Logged
 
Arnaud
Newbies
*
Offline



Posts: 6
Re: Build error: a15 cannot be used in asm here
Reply #2 - May 24th, 2020 at 3:46am
 
Thank you for your feedback and suggestions.

In terms of debugging optimizations, I have 4 choices. Following what the debugging tutorial was suggesting, I used "No Project + Libraries Optimization" which failed. I have tested all 4 configurations and the results are below:

* Default Optimization: No error, builds ok.
* No Project Optimization: Error
* No Project + Libraries Optimization: Error
* No Optimization : Error

So changing to "Default" fixed my problem eventually.

If there is anything else you want to investigate with this problem you need my help with, feel free to ask, happy to provide additional data.

In the meantime, your suggestion to play around with the optimizations did help me to fix my problem.  Cool

Thank you!
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10653
United Kingdom
Re: Build error: a15 cannot be used in asm here
Reply #3 - May 24th, 2020 at 2:26pm
 
Off-Topic replies have been moved to this Topic.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10653
United Kingdom
Re: Build error: a15 cannot be used in asm here
Reply #4 - May 24th, 2020 at 2:28pm
 
The optimization settings that each board can support is different. Some toolchains and cores have been written in a way that does requires optimization to remain at default.

It is not something we can directly control but we are always looking to see if we can improve.
Back to top
 
WWW  
IP Logged
 
Arnaud
Newbies
*
Offline



Posts: 6
Re: Build error: a15 cannot be used in asm here
Reply #5 - May 25th, 2020 at 1:30am
 
Understood, thanks.

For the second part of my issue I saw that you moved it to another topic in another part of the forum. I was hesitating whether I should do that or not.

So for this specific issue in the current thread, it is solved as far as I am concerned and then we can look to deal with the other problem in the other thread.

Cheers.
Back to top
« Last Edit: May 25th, 2020 at 1:31am by Arnaud »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print