Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Proteus/Arduino Compiler "No rule to make target `math.l', needed by `libraries'."

Status
Not open for further replies.

???? ??? ??????

Newbie level 3
Joined
Aug 1, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
Proteus/Arduino Compiler "No rule to make target `math.l', needed by `libraries'."

I purchased Proteus 8.1 software recently to simulate my Arduino projects , the simulator work with simple codes , but when I try to include <math.h> library the compiler won't build my project and I got the following message :
Code:
mksketch -C pro328 -N atmega328p -F 8000000  ../main.ino
[COLOR="#FF0000"]Can't copy Arduino library math[/COLOR]

make -f arduino/Makefile

...

[COLOR="#FF0000"]make[1]: *** No rule to make target `math.l', needed by `libraries'.  Stop.
make: *** [main.cpp] Error [/COLOR]2

Error code 2

I have tried to change the compiler settings to include arduino libraries directories but the changes don't seem to effect the compiler behavior.

I have read that I must link math.h library manually in some compiler but I don't know how to do it exactly In Proteus ..
 

Re: Proteus/Arduino Compiler "No rule to make target `math.l', needed by `libraries'.

Compile Arduino code in Arduino Compiler which is free. It will create a .hex file in Temp folder. Use this .hex file in Proteus with Arduino board model.
 

Re: Proteus/Arduino Compiler "No rule to make target `math.l', needed by `libraries'.

Compile Arduino code in Arduino Compiler which is free. It will create a .hex file in Temp folder. Use this .hex file in Proteus with Arduino board model.

That's what I'm doing now as a workaround, I was hoping to use one IDE for all my work on arduino..that was one reason why I bought Proteus..
 

Re: Proteus/Arduino Compiler "No rule to make target `math.l', needed by `libraries'.

That's what I'm doing now as a workaround, I was hoping to use one IDE for all my work on arduino..that was one reason why I bought Proteus..
this is a bad workaround, as the default arduino compiler doesn't output debug symbols needed for line-by-line debugging!

here's the solution, and the explanation of Proteus' library location logic:
* the main Arduino libraries are located in Arduino IDE's folder in Program Files, where you installed them from Proteus' compilers dialog. these include LiquidCrystal, ethernet, EEPROM, etc, but not the default avr-gcc libs. when you want to add more libraries you downloaded - put them there (C:\Program Files (x86)\Arduino\libraries on my computer). you include them with these brackets: <>. for example:
Code:
#include <EEPROM.h>
* when you split your code into .h/.c files for your current project, creating your own libraries for that project only, you include them with quote marks "". this is a nice way to organize your project as it gets larger. also, your project's code is embedded in Proteus' .pdsprj project file. You can move them to a real filesystem folder (the one your .pdsprj is) by right clicking your project's folder in Proteus' VSM section > Project Settings > uncheck Embed Files > OK. You can then edit them using Notepad++ or CodeBlocks Arduino IDE (my recommendation!). example:
Code:
#include "MyLedBlinker.h"
*on compilation, the default Arduino and avr-libc code is copied to the compilation directory (either a temp folder or your project's folder) and compilation is carried out. this means that you access those libraries as you would your own, with "". examples:
Code:
#include "math.h"
#include "avr/pgmspace.h"
#include "util/delay.h"

finally, that's the answer to your question:
math.h is included with:
Code:
#include "math.h"
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top