Hello everyone,
Currently I'm facing a new issue error exit 137 every time I try to upload and compile my project ESP32 to mesure temperature and humidity in Arduino IDE.
Any solution to suggest please !!
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
This is the easiest way to tidy up the code and add the code tags
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
I moved your topic to a more appropriate forum category @israa_ham.
The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Thanks in advance for your cooperation.
Hi @israa_ham. I'm going to ask you to post the full verbose output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
- Click the "OK" button.
The "Preferences" dialog will close. - Select Sketch > Verify/Compile from the Arduino IDE menus.
- Wait for the compilation to fail.
- You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
- Open a forum reply here by clicking the "Reply" button.
- Click the
<CODE/>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt
file and then attach that file to a reply here:
- Open any text editor program.
- Paste the copied output into the text editor.
- Save the file in
.txt
format. - Open a forum reply here by clicking the "Reply" button.
- Click the "Upload" icon (
) on the post composer toolbar:
The "Open" dialog will open. - Select the
.txt
file you saved from the "Open" dialog. - Click the "Open" button.
The dialog will close. - Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt
file onto the post composer field to attach it.
FQBN: esp32:esp32:esp32
Using board 'esp32' from platform in folder: /Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14
Using core 'esp32' from platform in folder: /Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14
bash -c "[ ! -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/.arduinoIDE-unsaved2024216-2936-1lx1con.6g5m/sketch_mar16a\"/partitions.csv ] || cp -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/.arduinoIDE-unsaved2024216-2936-1lx1con.6g5m/sketch_mar16a\"/partitions.csv \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/partitions.csv"
bash -c "[ -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/partitions.csv ] || [ ! -f \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/variants/esp32\"/partitions.csv ] || cp \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/variants/esp32\"/partitions.csv \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/partitions.csv"
bash -c "[ -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/partitions.csv ] || cp \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14\"/tools/partitions/default.csv \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/partitions.csv"
bash -c "[ -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/.arduinoIDE-unsaved2024216-2936-1lx1con.6g5m/sketch_mar16a\"/bootloader.bin ] && cp -f \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/.arduinoIDE-unsaved2024216-2936-1lx1con.6g5m/sketch_mar16a\"/bootloader.bin \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/sketch_mar16a.ino.bootloader.bin || ( [ -f \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/variants/esp32\"/bootloader.bin ] && cp \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/variants/esp32\"/bootloader.bin \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/sketch_mar16a.ino.bootloader.bin || \"/Users/israahamlili/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1\"/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o \"/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C\"/sketch_mar16a.ino.bootloader.bin \"/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/tools/sdk/esp32\"/bin/bootloader_qio_80m.elf )"
bash: line 1: 6407 Killed: 9 "/Users/israahamlili/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1"/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "/private/var/folders/mf/f29rs35x2nvgf_vcr9_8s_qc0000gn/T/arduino/sketches/D67CFB90194FB0624A787934C44B949C"/sketch_mar16a.ino.bootloader.bin "/Users/israahamlili/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/tools/sdk/esp32"/bin/bootloader_qio_80m.elf
exit status 137
Compilation error: exit status 137
I followed all your instructions and the message above is the error that I get when I compile the code.
Thank you
it's a compile error, which means that you may miss some library, or have something wrong in your code.
the output you pasted is missing something, the compile error doesn't know.
please post your entire code so other users can test the compile and possibly find where the error lies
#include <Arduino.h>
#if defined(ESP32)
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
#include <Firebase_ESP_Client.h>
//Provide the token generation process info.
#include "addons/TokenHelper.h"
//Provide the RTDB payload printing info and other helper functions.
#include "addons/RTDBHelper.h"
// partie pour calculer la temperature et l’humidité
#include <DHT.h>
// Insert Firebase project API Key
#define API_KEY "AIzaSyAsoTKakWKPUc5rDKCkyo8Q7ehOrjPRUmk"
// Insert RTDB URLefine the RTDB URL */
#define DATABASE_URL "https://dht11firebase-680c4-default-rtdb.europe-west1.firebasedatabase.app/"
//now we can create dht object that comes with the libary above
DHT dht(4, DHT11);
FirebaseData firebaseData;
FirebaseConfig config;
FirebaseAuth auth;
// Connexion à un réseau WiFi (mode station)
const char* ssid = "SFR_7A10_5GHZ "; //"iPhone de Israa";
const char* password = "gca65crjh2uhz92gvwg3"; //"israa123";
bool signupOK = false;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Setup start");
Serial.println("Setting up Firebase configuration...");
// Configuration de Firebase avant l'appel de la fonction firebase.begin
config.database_url = DATABASE_URL;
config.api_key = API_KEY;
Serial.println("Connecting to WiFi...");
WiFi.begin(ssid, password);
Serial.println("Tentative de connexion...");
while(WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(100);
}
if(WiFi.status() == WL_CONNECTED) {
Serial.println("WiFi connected!");
} else {
Serial.println("WiFi connection failed!");
// It may be useful to perform a reset or take some other action here
}
/* Sign up */
if (Firebase.signUp(&config, &auth, "", "")){
Serial.println("ok");
signupOK = true;
}
else{
Serial.printf("%s\n", config.signer.signupError.message.c_str());
}
/* Assign the callback function for the long running token generation task */
config.token_status_callback = tokenStatusCallback; //see addons/TokenHelper.h
// Une fois connecté à WiFi, commencez l'initialisation de Firebase
Firebase.begin(&config, &auth);
Firebase.reconnectWiFi(true); // Assurez-vous de la reconnexion WiFi si nécessaire
// Initialisez le capteur DHT après la configuration de Firebase
dht.begin();
Serial.println("\n");
Serial.println("Connexion etablie!");
Serial.print("Adresse IP: ");
Serial.println(WiFi.localIP());
}
void loop() {
// put your main code here, to run repeatedly:
delay(1000);
float temperature = dht.readTemperature();
float humidity = dht.readHumidity();
if(isnan(temperature) || isnan(humidity)){
Serial.println("Echec reception");
return;
}
Serial.printf("La température est : %f \n, l'humidité est : %f \n", temperature, humidity);
// Envoi des données à Firebase
if (Firebase.ready()) {
if (Firebase.RTDB.setFloat(&firebaseData, "/humidity", humidity)) {
Serial.println("Humidité envoyée avec succès à Firebase");
} else {
Serial.println("Échec de l'envoi de l'humidité à Firebase");
}
if (Firebase.RTDB.setFloat(&firebaseData, "/temperature", temperature)) {
Serial.println("Température envoyée avec succès à Firebase");
} else {
Serial.println("Échec de l'envoi de la température à Firebase");
}
}
delay(2000); // Délai avant la prochaine lecture
}
Here’s the code.
Thank you for your help!
Hi everyone,
any solutions suggested for my problem PLZZZ !!
Thank you
Hi @israa_ham. Unfortunately this error is quite mysterious.
Arduino IDE ran this command, which is a normal part of the compilation process:
The "Killed: 9
" part of the output shows that some external system killed that process before it completed. So the question is: why was the process killed? Unfortunately the output doesn't tell us anything and there are many different reasons why this might happen (e.g., a security system doesn't like the process, the computer is running out of memory):
https://www.google.com/search?q=macos+"killed%3A+9"'
I'm a bit doubtful that this could possibly be related to your code, but since that hypothesis was raised here, you can perform an experiment to check it:
- Select File > Examples > 01.Basics > BareMinimum from the Arduino IDE menus.
The "BareMinimum" sketch will open in a new Arduino IDE window. - Select Tools > Board > esp32 > ESP32 Dev Module from the Arduino IDE menus.
- Select Sketch > Compile/Verify from the Arduino IDE menus.
- Wait for the compilation process to finish.
Add a reply here on the forum thread to tell us whether the compilation was successful, or if the same "Compilation error: exit status 137
" error occurred.
If the cause of the error was something in your full sketch code, we would expect that the compilation of the known-good "BareMinimum" sketch will be successful. If the error also occurs when compiling the "BareMinimum" sketch, then we will know that the problem is unrelated to your sketch code and that hypothesis will be rejected.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.