Compiler Exit Status 1 - But No Errors

Thundercat

Well-known member
Hi all,

I've got a weird one - I'm just trying to export a compiled binary, and there's no error messages shown, but "exit status 1", and no compiled binary appears.

If I just try to compile with the check mark, it compiles fine, no exit 1 code. In fact I can also upload to a Teensy 4.0 no problem, and it flashes fine.

I just can't export the compiled binary.

Here's the exact error message:

Code:
Memory Usage on Teensy 4.0:
  FLASH: code:395052, data:1619176, headers:9192   free for files:8196
   RAM1: variables:49504, code:392852, padding:364   free for local variables:81568
   RAM2: variables:31008  free for malloc/new:493280
exit status 1

Compilation error: exit status 1

This has occurred with the sketch getting larger, and I had to change from the "Faster" compilation to "Fast" or the code wouldn't fit.

Any ideas how I can chase this down, with no error messages?

Oh, I should mention if it's relevant, if I try to compile with the "Fast with LTO" option, I do get an error about having changed a name, but I don't think it's a blocking error:

Code:
/Users/Mikey/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/usb_desc.c:2724:44: warning: size of 'usb_string_product_name' differ from the size of original declaration [-Wlto-type-mismatch]
 2724 | extern struct usb_string_descriptor_struct usb_string_product_name
      |                                            ^
/Users/Mikey/Documents/Arduino/Fader_Pro_Premium_V6_00/name.c:15:37: note: 'usb_string_product_name' was previously declared here
   15 | struct usb_string_descriptor_struct usb_string_product_name = {
      |                                     ^
Memory Usage on Teensy 4.0:
  FLASH: code:379952, data:1618128, headers:8956   free for files:24580
   RAM1: variables:48512, code:377972, padding:15244   free for local variables:82560
   RAM2: variables:31008  free for malloc/new:493280

Thanks for any insights.

Mike
 
I neglected to add - I'm using Arduino IDE 2.x.

I just tried exporting the compiled binary using Teensyduino and it worked.

I mostly stopped using Teensyduino because the sketch is very large and I get constant out of memory errors on Teensyduino.

In any case, I'd still love to know how to fix this for the Arduino IDE if anyone has any insights. I tried rebooting the system too, no joy.

Thanks again,

Mike
 
What do you mean by "using Teensyduino"? It's the core library that provides all the board support code, not a tool...

The only difference between hitting compile and choosing "export compiled binary" is the destination folder and which output files are kept. Maybe there's a filesystem permissions error (like the sketch folder is read-only preventing the export directory from being created), or you have a cranky antivirus program blocking one of the output files from being written.
 
What do you mean by "using Teensyduino"? It's the core library that provides all the board support code, not a tool...

The only difference between hitting compile and choosing "export compiled binary" is the destination folder and which output files are kept. Maybe there's a filesystem permissions error (like the sketch folder is read-only preventing the export directory from being created), or you have a cranky antivirus program blocking one of the output files from being written.
Thank you. I literally have an app labelled "Teensyduino" so I'm not sure what you are saying. It is a tool, an app, for me, on my Mac. But thank you.

I've been compiling binaries with this system for awhile and this is the first time this has popped up. I don't have any AV running.

And yes it is behaving as I stated - I can upload the sketch to a Teensy, no errors no problem, but when I try exporting the compiled binary it quits exit status 1 and no other stated errors. This is with the Arduino IDE.

When I used Paul's Teensyduino add-on program, that for me is called Teensyduino, it exports the binary fine, no errors.

Thank you again for your expertise.

Mike
 
Try turning on verbose output during compile in File > Preferences. Does Arduino IDE give more info about the error with this turned on?
Now you may mock me and laugh.

When I turn on the verbose compiling, it exports the binary fine. Tons of messages, but the binary is there. No need to even post it all here as there's no error.

When I turn the verbose compiling back off, it still compiles fine (now). As if the act of turning on the verbose had changed something.

I cant' explain it. Call me a fool. But that's what I've been dealing with the last 1.5 hours trying to figure out.

In any case, if I have anything of value to add I will respond here again, and I'm sorry to have bothered you all. I hate intermittent errors like these.

Thank you again,

Mike
 
I literally have an app labelled "Teensyduino"

That's Arduino IDE 1.8.19 + Teensyduino on MacOS.

People who use Windows and Linux haven't seen it that way, because they install Arduino IDE 1.8.19 and then run the Teensyduino installer which adds all the Teensy specific stuff. On Windows and Linux, it's clearly still Arduino 1.8.19.

Long ago we did this on MacOS too. As Apple started tightening security rules around 10.8 (Mountain Lion, the last version named after a big cat) the installer became more and more difficult. Then finally with MacOS 10.15 (Catalina) Apple added a process called Notarization. To get Apple's digital signature for your software to run on MacOS without turning off security settings (and jumping through other inconvenient hoops even when settings are changed) you have to send a complete copy of your software to Apple. Their automated tools check that you've conformed with all their rules. The installer approach became impossible with Notarization.

So for MacOS running the old IDE, we publish a completely pre-installed copy. The name appears as "Teensyduino" rather than "Arduino" and there are a few other superficial changes MacOS requires. But it's really just Arduino 1.8.19 with Teensyduino pre-installed and then the whole thing is signed and Apple Notarized.

Fortauntely Arduino improved a lot in version 2 so Teensyduino can be installed automatically by Boards Manager.
 
Most of the time that I am developing Teensy applications, I am using Arduino IDE 1.8.19 plus Teensyduino 1.59 (via command line install), all running under Windows 10 Pro (22H2) and/or Windows 11 Pro (23H2). I've also played with using Arduino IDE 2.3.2 plus Tensyduino 1.59 (via additional boards manager URL in File > Preferences), running under Windows 10 Pro (22H2) and/or Windows 11 Pro (23H2).

I have investigated the appearance and disappearance of the "Compilation error: exit status 1" under the conditions that I have here to see if I could reproduce the same (mis)behavior as reported earlier.

I am able to cause the error report to appear when attempting to "Export Compiled Binary" in Arduino IDE 2.3.2, as well as selectively & repeatedly cause the same error report to not appear when attempting to "Export Compiled Binary" in Arduino IDE 2.3.2, all as follows:

= = = = = = =
PRE-NOTES:
= = = = = = =


- performing an "Export Compiled Binary" from Arduino IDE 1.8.19 causes a hex file (& an ehex file, but it is not pertinent to this analysis) to be placed in the primary sketch folder
- performing an "Export Compiled Binary" from Arduino IDE 2.3.2 causes a hex file (& an ehex file, but it is not pertinent to this analysis) to be placed in a "build" folder, which is a subdirectory of the primary sketch folder

= = = = = = = = = = = = = = = =
CAUSE THE ERROR TO APPEAR:
= = = = = = = = = = = = = = = =


- perform an "Export Compiled Binary" from Arduino IDE 2.3.2, either having never performed an "Export Compiled Binary" from Arduino IDE 1.8.19, or after deleting the hex file in the primary sketch folder (In either case, no hex file is present in the primary build folder) - the "Compilation error: exit status 1" error is reported

= = = = = = = = = = = = = = = = = =
CAUSE THE ERROR TO NOT APPEAR:
= = = = = = = = = = = = = = = = = =


- perform an "Export Compiled Binary" from Arduino IDE 1.8.19 first (creating a hex file in the primary sketch folder), then perform an "Export Compiled Binary" from Arduino IDE 2.3.2- the "Compilation error: exit status 1" error is not reported

I do not have access to a Mac, so I have no way to test if these same conditions wil cause the same behavior. However, I thought I'd report my findings here, just in case what I've found shares some commonality on all platforms.

Mark J Culross
KD5RXT
 
Last edited:
Back in Feb '24, I reported this same (mis)behavior in a <previous post>. Back then, I was very new to Arduino IDE 2.x & we were troubleshooting a different set of problems, which may have been masking the real cause of the error being generated !! Note (as indicated in the other post) that, in my case anyway, the hex & ehex files were actually created by the Arduino IDE 2.x (in the "build" folder), in spite of the reported error.

Mark J Culross
KD5RXT
 
Back
Top