Closed Szum123321 closed 3 years ago
The library is included in include/I2CEEPROM.h file
You have to modify like this to use new C++ style hpp
#include <Arduino.h>
#include "I2CEEPROM.h"
I2CEEPROM mem;
void setup()
{
}
void loop()
{
}
#ifndef I2CEEPROM_H
#define I2CEEPROM_H
#include <Arduino.h>
#include <Wire.h>
#include <math.h>
#include "TimerInterrupt_Generic.h"
class I2CEEPROM {};
#include "I2CEEPROM_Impl.hpp"
#endif
#ifndef I2CEEPROM_IMPL_HPP
#define I2CEEPROM_IMPL_HPP
#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \
defined(STM32WB) || defined(STM32MP1) )
STM32Timer DEVICE_TICK_TIMER(TIM2);
#elif ( defined(CORE_TEENSY) || defined(TEENSYDUINO) )
TeensyTimer DEVICE_TICK_TIMER(TEENSY_TIMER_3);
#endif
/*library code here*/
#endif // I2CEEPROM_IMPL_HPP
Compile is OK on Arduino IDE, and should be OK on PIO, unless you have wrong settings / configurations
Hi!
I'm trying to compile some code for Teensy 3.5 with PlatformIO 2.3.2, and I'm getting multiple definitions error.
I followed the procedure described in README, which sadly didn't work even though I cleaned the build environment and restarted VScode all the time.
Error message looks like this: link
I'm using Arch based linux distro: Linux sz-81nh 5.11.14-arch1-1 #1 SMP PREEMPT Wed, 14 Apr 2021 12:06:34 +0000 x86_64 GNU/Linux
Also, the same code (the only difference being instead of TeensyTimer, I used STM32Timer) compiles and works perfectly on ST Nulceo F303RE
Steps to Reproduce
Minimal example: Teensy_minimal.zip
Expected behavior
Code compiles for Teensy
Actual behavior
Linker spews out a bunch of
Multiple definitions error