I want to switch from Windows to Mac, I can upload some programs but have a problem with dma.h.
This is the error;
Arduino: 1.9.0-beta (Mac OS X), Board: “Generic STM32F103 series, BluePill F103C8, 64k (default), STLink, Enabled with generic Serial, Smallest (-Os default), Newlib Nano (default)”
_9kHz_steps_need_reduction:54:26: error: libmaple/dma.h: No such file or directory
#include <libmaple/dma.h>
^
compilation terminated.
exit status 1
libmaple/dma.h: No such file or directory
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
I can locate this file in my Mac under; libmaple-master > libmaple> dma.h
How to put it in right place ?
I think the problem is with it because another simple program
HardwareTimer pwmtimer3(3);
void setup() {
// pinMode(PA7, PWM);
pinMode(PB0, PWM);
pwmtimer3.pause();
pwmtimer3.setPrescaleFactor(100); // Timer input clock Prescaler = 1 (= 72MHz input ?)
pwmtimer3.setOverflow(100-1); // PWM Period width for 720kHz ?
pwmtimer3.setCompare(TIMER_CH3, 83); // PWM High Pulse width is 50% duty (1:1)
//95=48hz,90 =45hz,88=43hz 85=42hz, 83=
pwmtimer3.refresh();
pwmtimer3.resume();
}
void loop() {
}
In STM official core there is no “libmaple” stuff.
The results;
https://github.com/rogerclarkmelbourne/ … 2_Libmaple
rogerclarkmelbourne/WS2812B_STM32_Libmaple – GitHub
WS2812B_STM32_Libmaple. WS2812B (Neopixel) library for Arduino STM32 (Libmaple core) Written by Roger Clark www.rogerclark.net, from first principals. This library uses SPI DMA to control a strip of WS2812B (NeoPixel) LEDS
github.com
Error from simple program
Arduino: 1.8.8 (Mac OS X), Board: "Generic STM32F103 series, BluePill F103C8, 64k (default), STLink, Enabled with generic Serial, Smallest (-Os default), Newlib Nano (default)"
bash: line 0: [: /Users/tedkor/Desktop/backup/magnet: binary operator expected
_10khz_pito:1:1: error: 'HardwareTimer' does not name a type
HardwareTimer pwmtimer3(3);
^~~~~~~~~~~~~
/Users/tedkor/Desktop/backup/magnet ok/Magnet/_10khz_pito/_10khz_pito.ino: In function 'void setup()':
_10khz_pito:6:16: error: 'PWM' was not declared in this scope
pinMode(PB0, PWM);
^~~
_10khz_pito:7:3: error: 'pwmtimer3' was not declared in this scope
pwmtimer3.pause();
^~~~~~~~~
_10khz_pito:10:24: error: 'TIMER_CH3' was not declared in this scope
pwmtimer3.setCompare(TIMER_CH3, 83); // PWM High Pulse width is 50% duty (1:1)
^~~~~~~~~
exit status 1
'HardwareTimer' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
[ted – Tue Jan 15, 2019 6:54 am] –
Arduino: 1.8.8 (Mac OS X), Board: “Generic STM32F103 series, BluePill F103C8, 64k (default), STLink, Enabled with generic Serial, Smallest (-Os default), Newlib Nano (default)”
Again: this line shows that you have selected in Arduino IDE a board belonging to STM official core.
This means, you are using the STM official core, not the Roger’s core.
If you want to use Roger’s core, you have to select a board belonging to this core.
as Steve said you mix core and library.
You have installed the Arduino_Core_STM32 not the Arduino_STM32 core from Roger.
This is the one you have to use to compile this library that’s why you have this error as Arduino_Core_STM32 doesn’t have HardwareTimer.
Please, follow instruction to install Arduino_STM32 cor then you will be able to build the library.
https://github.com/rogerclarkmelbourne/Arduino_STM32
I copied and pasted it to the Arduino hardware and this is the error;
Arduino: 1.8.8 (Mac OS X), Board: “Generic STM32F103 series, BluePill F103C8, 64k (default), STLink, Enabled with generic Serial, Smallest (-Os default), Newlib Nano (default)”
bash: line 0: [: /Users/tedkor/Desktop/backup/magnet: binary operator expected
_10khz_pito:1:1: error: ‘HardwareTimer’ does not name a type
HardwareTimer pwmtimer3(3);
^~~~~~~~~~~~~
/Users/tedkor/Desktop/backup/magnet ok/Magnet/_10khz_pito/_10khz_pito.ino: In function ‘void setup()’:
_10khz_pito:6:16: error: ‘PWM’ was not declared in this scope
pinMode(PB0, PWM);
^~~
_10khz_pito:7:3: error: ‘pwmtimer3’ was not declared in this scope
pwmtimer3.pause();
^~~~~~~~~
_10khz_pito:10:24: error: ‘TIMER_CH3’ was not declared in this scope
pwmtimer3.setCompare(TIMER_CH3, 83); // PWM High Pulse width is 50% duty (1:1)
^~~~~~~~~
exit status 1
‘HardwareTimer’ does not name a type
[ted – Tue Jan 15, 2019 5:56 pm] –
Arduino: 1.8.8 (Mac OS X), Board: “Generic STM32F103 series, BluePill F103C8, 64k (default), STLink, Enabled with generic Serial, Smallest
You are picking the wrong board from the tools board menu. At some point you must have installed the ST core instead of Roger’s libmaple.
The board selected should show up on the status line as :
“Generic STM32F103C series, STM32F103C8 (20k RAM, 64k Flash), STLink, 72MHz (Normal), Smallest (default)”
Your screenshot was very helpful and solve my problem.
Now I can upload the sketches 5 time faster then on windows.
Hi
After fixing the problem in my previous thread I have another one.
If I select the board as Rick says – STM32F1 boards (STM32duino.com) I have this error
Arduino: 1.8.8 (Mac OS X), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STLink, 72Mhz (Normal), Smallest (default)"
Sketch uses 14172 bytes (21%) of program storage space. Maximum is 65536 bytes.
Global variables use 3136 bytes (15%) of dynamic memory, leaving 17344 bytes for local variables. Maximum is 20480 bytes.
usage: dirname path
/Users/tedkor/Documents/Arduino/hardware/Arduino_STM32-master 3/tools/macosx/stlink_upload: line 2: /stlink/st-flash: No such file or directory
An error occurred while uploading the sketch
Invalid library found in /Users/tedkor/Documents/Arduino/libraries/libmaple-master: no headers files (.h) found in /Users/tedkor/Documents/Arduino/libraries/libmaple-master
Invalid library found in /Users/tedkor/Documents/Arduino/libraries/libmaple-master: no headers files (.h) found in /Users/tedkor/Documents/Arduino/libraries/libmaple-master
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.