Code works on Arduino One but not on the Arduino Nano 33BLE

Hey Guys,

du u have any idea why my code, wich works on the arduino uno, won't work on the Arduino Nano 33BLE?
When I upload the code to the Nano I get the error "exist stauts 1, couldn't compile for the Arduino Nano 33 BLE board"

Thanks!

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.


Please post your full sketch.

If possible, you should always post code directly in the forum thread as text using code tags:

  • Do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code. This will make it easier for you to spot bugs and make it easier for us to read.
  • In the Arduino IDE or Arduino Web Editor, click on the window that contains your sketch code.
  • Press “Ctrl + A”. This will select all the text.
  • Press “Ctrl + C”. This will copy the selected text to the clipboard.
  • In a forum reply here, click the “Reply” button.
  • click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the sketch between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.
  • Repeat the above process if your sketch has multiple tabs.

This will make it easy for anyone to look at it, which will increase the likelihood of you getting help.

If the sketch is longer than the 9000 characters maximum allowed by the forum, then it’s OK to add it as an attachment. After clicking the “Reply” button, you will see an “Attachments and other settings” link.

When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

Follow pert's instructions. Exit status 1 is the last message printed from any error, and the important messages were further up.

My guess, though, is that you have code or a library that only supports classic avr microcontrollers (like 328p used on uno/nano/promini), not the new fancy ones that the nano 33 (which has nothing in common with a nano other than the physical shape) uses

"C:\\Users\\Raoul\\AppData\\Local\\Temp\\arduino_build_934451\\core\\Serial.cpp.o"
C:\Users\Raoul\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-ar: unable to rename 'C:\Users\Raoul\AppData\Local\Temp\arduino_build_934451\core\core.a'; reason: File exists

Using library TSIC at version 1.0.1 in folder: C:\Users\Raoul\Documents\Arduino\libraries\TSIC 
Using library SPI in folder: C:\Users\Raoul\Documents\ArduinoData\packages\arduino\hardware\mbed\1.1.4\libraries\SPI (legacy)
Using library SD at version 1.2.4 in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\libraries\SD 
exit status 1
Error compiling for board Arduino Nano 33 BLE.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Tanks for your reply. Thats the “short” error message. The long version is in the .txt. My code uses the TSIC-, SPI- and SD-libary.

Error_message.txt (63.1 KB)

This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.

Yup - funny that the Uno doesn’t do the same thing, honestly!

Though it wouldn’t be too weird if it was treated differently, since if you haven’t updated arduino core, it’s running the compiler from inside program files (where the installation requires admin privs), whereas the compiler for board packages added through board manager run from the Arduino15 folder inside your AppData (where writing stuff does not require admin, hence is less trustworthy).

Some antivirus programs see the compiler executing a ton of commands and moving a ton of files around really fast, and assume it’s gotta be something bad…

I need help:

my code work on anruino nano but not ona nano 33 BLE

Arduino: 1.8.12 (Windows 10), Board: “Arduino NANO 33 IoT”

…\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp: In member function ‘void LiquidCrystal::initSPI(uint8_t)’:

…\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp:55:18: error: invalid conversion from ‘uint8_t {aka unsigned char}’ to ‘BitOrder’ [-fpermissive]

SPI.setBitOrder(_bitOrder);

^~~~~~~~~

In file included from …\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.h:7:0,

from …\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp:1:

…\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\libraries\SPI/SPI.h:135:8: note: initializing argument 1 of ‘void SPIClass::setBitOrder(BitOrder)’

void setBitOrder(BitOrder order);

^~~~~~~~~~~

…\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp: In member function ‘void LiquidCrystal::spiSendOut()’:

…\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp:276:19: error: invalid conversion from ‘uint8_t {aka unsigned char}’ to ‘BitOrder’ [-fpermissive]

SPI.setBitOrder(_bitOrder);

^~~~~~~~~

In file included from …\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.h:7:0,

from …\Documents\Arduino\libraries\ShiftedLCD-master\src\ShiftedLCD.cpp:1:

…\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\libraries\SPI/SPI.h:135:8: note: initializing argument 1 of ‘void SPIClass::setBitOrder(BitOrder)’

void setBitOrder(BitOrder order);

^~~~~~~~~~~

exit status 1
Error compiling for board Arduino NANO 33 IoT.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.