Erreurs STM32-F303K8 (nucléo)

Bonjour, je réalise un projet robotique, ma partie consiste à connecter plusieurs capteurs de télémétrie ensemble pour couvrir un angle assez large. Seul problème, quand je compile mon code, des erreurs surviennent et je n'arrive pas à voir d'où viennent toutes ces erreurs. Avant de mettre mon programme je précise que:

  • J'ai mis un fichier ".json" dans les préférences qui est par rapport à ma carte (sans celui-ci j'ai encore plus d'erreurs)
  • J'ai toutes les librairies pour que le code fonctionne (du moins jusqu'au message d'erreur).
  • Dans outils, j'ai tout paramétré (la carte, le port etc).
  • J'utilise la version 1.8.13 d'Arduino.
  • La carte est fonctionnelle car elle marche avec un autre programme.

Code:

#include <vl53l0x_api.h> #include <vl53l0x_api_calibration.h>
#include <vl53l0x_api_core.h>
#include <vl53l0x_api_ranging.h>
#include <vl53l0x_api_calibration.h>
#include <vl53l0x_api_core.h>
#include <vl53l0x_api_ranging.h>
#include <vl53l0x_api_calibration
. include <vl53l0x_i2c_platform.h>
#include <vl53l0x_interrupt_threshold_settings.h>
#include <vl53l0x_platform.h>
#include <vl53l0x_platform_log.h>
#include <vl53l0x_tuning.h>
#include <vl53l0x_types.h>
#include <FP_Examples.h>
#include <stdint.h>
#include "CANLidar.h"
#include "Adafruit_VL53L0X.h"

lidar CANLidar volatil;
#define LOX1_ADDRESS 0x30
#define LOX2_ADDRESS 0x31
#define LOX3_ADDRESS 0x32
#define LOX4_ADDRESS 0x33
#define LOX4_ADDRESS 0x34

#define SHT_LOX1 A0
#define SHT_LOX2 A1
#define SHT_LOX3 A2
#define SHT_LOX4 A3
#define SHT_LOX5 A4

Adafruit_VL53L0X LOX1 = Adafruit_VL53L0X ();
Adafruit_VL53L0X lox2 = Adafruit_VL53L0X ();
Adafruit_VL53L0X lox3 = Adafruit_VL53L0X ();
Adafruit_VL53L0X lox4 = Adafruit_VL53L0X ();
Adafruit_VL53L0X lox5 = Adafruit_VL53L0X ();

VL53L0X_RangingMeasurementData_t measure1;
VL53L0X_RangingMeasurementData_t measure2;
VL53L0X_RangingMeasurementData_t measure3;
VL53L0X_RangingMeasurementData_t measure4;
VL53L0X_RangingMeasurementData_t measure5;

void setID () {
digitalWrite (SHT_LOX1, LOW);
digitalWrite (SHT_LOX2, LOW);
digitalWrite (SHT_LOX3, LOW);
digitalWrite (SHT_LOX4, LOW);
digitalWrite (SHT_LOX5, LOW);
retard (10);

digitalWrite (SHT_LOX1, HIGH);
digitalWrite (SHT_LOX2, HIGH);
digitalWrite (SHT_LOX3, HIGH);
digitalWrite (SHT_LOX4, HIGH);
digitalWrite (SHT_LOX5, HIGH);
retard (10);

digitalWrite (SHT_LOX1, HIGH);
digitalWrite (SHT_LOX2, LOW);
digitalWrite (SHT_LOX3, LOW);
digitalWrite (SHT_LOX4, LOW);
digitalWrite (SHT_LOX5, LOW);

lox1.begin (0x30);
retard (10);

digitalWrite (SHT_LOX2, HIGH);
lox2.begin (0x31);
retard (10);

digitalWrite (SHT_LOX3, HIGH);
lox3.begin (0x32);
retard (10);

digitalWrite (SHT_LOX4, HIGH);
lox4.begin (0x33);
retard (10);

digitalWrite (SHT_LOX5, HIGH);
lox4.begin (0x34);
retard (10);
}

void read_dual_sensors () {

lox1.rangingTest (& measure1, false);
lox2.rangingTest (& mesure2, faux);
lox3.rangingTest (& mesure3, faux);
lox4.rangingTest (& mesure4, faux);
lox5.rangingTest (& mesure5, faux);

Serial.print ("1:");
if (mesure1.RangeStatus! = 4) {
Serial.print (mesure1.RangeMilliMeter);
}
else {
Serial.print ("Hors de portée");
}
Serial.print ("");

Serial.print ("2:");
if (mesure2.RangeStatus! = 4) {
Serial.print (mesure2.RangeMilliMeter);
}
else {
Serial.print ("Hors de portée");
}
Serial.print ("");

Serial.print ("3:");
if (measure3.RangeStatus! = 4) {
Serial.print (mesure3.RangeMilliMeter);
}
else {
Serial.print ("Hors de portée");
}
Serial.print ("");

Serial.print ("4:");
if (measure4.RangeStatus! = 4) {
Serial.print (measure4.RangeMilliMeter);
}
else {
Serial.print ("Hors de portée");
}
Serial.println ();

Serial.print ("5:");
if (measure5.RangeStatus! = 4) {
Serial. print (mesure5.RangeMilliMeter);
}
else {
Serial.print ("Hors de portée");
}
Serial.println ();
}

void setupTIM6 (uint16_t ms)
{
RCC-> APB1ENR | = RCC_APB1ENR_TIM6EN;
RCC-> APB1RSTR | = RCC_APB1RSTR_TIM6RST;
RCC-> APB1RSTR & = ~ RCC_APB1RSTR_TIM6RST;

asm ("nop");
TIM6-> PSC = 64000-1;
TIM6-> ARR = ms-1;
TIM6-> DIER | = TIM_DIER_UIE;
TIM6-> CR1 | = TIM_CR1_CEN;

NVIC_SetPriority (TIM6_DAC1_IRQn, 0);
NVIC_EnableIRQ (TIM6_DAC1_IRQn);
}

extern "C" {
void TIM6_DAC_IRQHandler ()
{
TIM6-> SR & = ~ TIM_SR_UIF;
digitalWrite (13, HAUT);
}
}
void setup () {
CANSetup ();

Serial.begin (115200);
setupTIM6 (500);
pinMode (SHT_LOX1, SORTIE);
pinMode (SHT_LOX2, SORTIE);
pinMode (SHT_LOX3, SORTIE);
pinMode (SHT_LOX4, SORTIE);
pinMode (SHT_LOX5, SORTIE);
Serial.println ("Shutdown pins inited ...");
digitalWrite (SHT_LOX1, LOW);
digitalWrite (SHT_LOX2, LOW);
digitalWrite (SHT_LOX3, LOW);
digitalWrite (SHT_LOX4, LOW);
digitalWrite (SHT_LOX5, LOW);

Serial.println ("Les deux en mode de réinitialisation ... (les broches sont faibles)");

Serial.println ("Démarrage ...");
Définir l'identifiant();
}
boucle void () {
}

J'ai mis en pièce jointe une image de mon câblage, qui est tout simple avec un capteur pour le moment.
Je vous mets les erreurs que je rencontre:

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Carte: "Nucleo-32, Nucleo F303K8, Mass Storage, Enabled (generic 'Serial'), None, Low / Pleine vitesse, le plus petit (-Os par défaut), Newlib Nano (par défaut) "
C: \Users\Florian\Documents\Arduino\bibliothèques\Adafruit_VL53L0X\src\core\src\vl53l0x_api_core.cpp: Dans la fonction 'VL53L0X_Error VL53L0X_Lestc_sig (VL53L0X_RangingMeasurementData_t *, FixPoint1616_t *, uint32_t *) ':
C: \Users\Florian\Documents\Arduino\bibliothèques \Adafruit_VL53L0X\src\core\src\vl53l0x_api_core.cpp: 1702: 50: erreur: appel de surcharge16_core.cpp »est ambigu
1702 | xTalkCorrection = abs (diff1_mcps / diff2_mcps);
| ^
Dans le fichier inclus à partir de c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2.1\cstdlib: 75,
depuis c:\ users\ florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2 .1\stdlib.h: 36,
depuis C:\Users\Florian\Documents\ArduinoData\packages\STM32\hardware\stm32\1.9.0\cores\arduino/câblage.h: 24, depuis C:\Users\Florian\Documents\ArduinoData\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,
de c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_i2c_platform.h:1,
à partir de c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_platform.h:33,
depuis c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_api_core.h:33,
depuis C:\Users\Florian\Documents\Arduino\bibliothèques\Adafruit_VL53L0X\src\core\src\vl53l0x_apicore: 29:
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none eabi\include\stdlib.h:70:5 :note: candidat: 'int abs (int)'
70 | int abs (int);
| ^ ~~
Dans le fichier inclus à partir de c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2.1\cstdlib: 77,
depuis c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1 \arm-none-eabi\include\c ++\9.2.1\stdlib.h: 36,
depuis C:\Users\Florian\Documents\ArduinoData\packages\STM32\hardware\stm32\1.9.0\cores\arduino/câblage.h: 24,
depuis c:\Users\Florian\Documents\ArduinoData\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h: 36,
de c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_i2c_platform.h: 1,
de c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_platform.h: 33,
de c:\users\florian\documents\arduino\bibliothèques\adafruit_vl53l0x\src\vl53l0x_api_core.h: 33,
de c:\Users\Florian\Documents\bibliothèques\Adafruit_VL53L0X\src\core\src\vl53l0x_api_core.cpp: 29:
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\ arm-none eabi\include\c ++\9.2.1\bits\std_abs .h: 79: 3: note: candidat: 'constexpr long double std :: abs (long double)'
79 | abs (long double __x)
| ^ ~~
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\ arm-none-eabi\include\c ++\9.2.1\bits\std_abs.h: 75: 3: note: candidat: 'constexpr float std :: abs (float)'
75 | abs (flottant __x)
| ^ ~~
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2.1\bits\std_abs.h: 71: 3: note: candidat: 'constexpr double std :: abs (double)'
71 | abs (double __x)
| ^ ~~
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2.1\bits\std_abs .h: 61: 3: note: candidat: 'long long int std :: abs (long long int)'
61 | abs (long long __x) {return __builtin_llabs (__x); }
| ^ ~~
c:\users\florian\documents\arduinodata\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c ++\9.2.1\bits\std_abs.h: 56: 3: note: candidat: 'long int std :: abs (long int)'
56 | abs (long __i) {return builtin_labs ( i); }
| ^ ~~
exit status 1
Erreur de compilation pour la carte Nucleo-32

Merci à vous par avance. J'espère avoir été assez clair et avoir donné les bonnes informations.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.