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 Build error: a15 cannot be used in asm here (SOLVED core does not support no optimization) (Read 2509 times)
Arnaud
Newbies
*
Offline


Posts: 7
Joined: May 23rd, 2020
Build error: a15 cannot be used in asm here (SOLVED core does not support no optimization)
May 23rd, 2020 at 3:52pm
Print Post  
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
Select All
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: i_pro\Debug\ESP8266WiFi\WiFiServer.cpp.o
  Using previously compiled file: i_pro\Debug\ESP8266WiFi\WiFiServerSecureAxTLS.cpp.o
  Using previously compiled file: i_pro\Debug\ESP8266WiFi\WiFiServerSecureBearSSL.cpp.o
  Using previously compiled file: i_pro\Debug\ESP8266WiFi\WiFiUdp.cpp.o 



Line 107 in that file is the closing curly bracket in that function:
Code (C++)
Select All
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
« Last Edit: May 25th, 2020 at 1:39pm by Tim@Visual Micro »  

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: Build error: a15 cannot be used in asm here
Reply #1 - May 23rd, 2020 at 3:58pm
Print Post  
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?
« Last Edit: May 23rd, 2020 at 4:00pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Arnaud
Newbies
*
Offline


Posts: 7
Joined: May 23rd, 2020
Re: Build error: a15 cannot be used in asm here
Reply #2 - May 24th, 2020 at 2:46am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build error: a15 cannot be used in asm here
Reply #3 - May 24th, 2020 at 1:26pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build error: a15 cannot be used in asm here
Reply #4 - May 24th, 2020 at 1:28pm
Print Post  
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: 7
Joined: May 23rd, 2020
Re: Build error: a15 cannot be used in asm here
Reply #5 - May 25th, 2020 at 12:30am
Print Post  
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.
« Last Edit: May 25th, 2020 at 12:31am by Arnaud »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint