Re: suggestion if you are struggling with the STM32 board #morsecodetutor #mct


David Leckie
 

Hi

 

Bit confused with tone libraries.

I can get it to compile OK but I want to understand what I am doing.

 

I am aware that Tone.h and tone.h are regarded as different files under Linux but the same under Windows.  (I am using Linux)

 

Normally on AVR boards you would use.

#include <Tone.h> this is for the ToneLibrary 1.7.1 by Brett Hagman.

 

This is for AVR architecture and not applicable and will not compile on STM32 architecture.

 

tone.h will be a different library and there is not one for AVR

 

Now if I look in

https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/STM32F1/libraries

 

There is no tone library.

 

However there is

 

https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F1/cores/maple/tone.h

 

 

So when I have a line #include <tone.h> where is the Arduino IDE finding the library?

 

If I look in

 

https://github.com/stm32duino/Arduino_Core_STM32/tree/master/cores/arduino

 

There is a Tone.h

 

Currently in preference→Additional Board managers I have 2 URLS

 

http://dan.drown.org/stm32duino/package_STM32duino_index.json

 

https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json



When I compile it first looks in the local Arduino libraries and finds Tone.h which is for AVR and gives an error message.

 

However if I use tone.h there is no such library on the local machine so it gets the one from the Additional Boards manager URL.

 

Would I be better removing the AVR Tone library (Tone.h) and installing a STM32 Tone library or a STM32 tone  library?

Any advice would be most welcome. 
73
Dave
GM4NFI

Join SoftwareControlledHamRadio@groups.io to automatically receive all group messages.