Implementing Arduino into CubeIDE
I have already spent hours trying to get the Arduino library working in my CubeIDE (1.12.0 IDE; latest STM32duino; Firmware F3 1.11.4). I set up all the include paths, and changed the arduino stuff, to point to the CubeIDE generated files.
I had some issues, that the Serial was not declared, but this could be fixxed, when i changed my user_man file to *.cpp. But now it says " undefined reference to `setup' ".
main.c:
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "user_main.h"user_man.cpp:
#include "user_main.h"
#include "stdio.h"
#include "stm32f3xx_nucleo_32.h"
#include <stdbool.h>
#include "arduino.h"
void setup(){
}
void loop(){
}user_main.h:
extern void setup();
extern void loop();What has to be done in order to make it work?




