Go Down

Topic: IDE sees everything as MKRWIFI1010 since update yesterday, won't compile (Read 286 times) previous topic - next topic

rob-garford

HI,

I'm having an issue with the IDE since an update was applied yesterday. I'm on ubuntu 18.04 and I'm not totally sure what was updated.

The IDE thinks everything is mkrwifi1010 with the same SN. I have a mkrzero and a mkrwifi1010 and neither of them is actually recognised, the 'get board info' never changes and I can't upload code that I know is fine for these boards.

Further to this the IDE will no longer compile anything as it has some issue with a library, again there was no problem compiling this code before. Please see verbose output of attempted compilation below.


Code: [Select]
Compiling sketch...
/home/rob/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino MKRZero\"" -I/home/rob/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/rob/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/deprecated -I/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/deprecated-avr-comp -I/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino -I/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/variants/mkrzero -I/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/libraries/Wire -I/home/rob/Arduino/libraries/hd44780 -I/home/rob/Arduino/libraries/ros2arduino/src -I/home/rob/Arduino/libraries/ezButton/src /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp -o /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp.o
In file included from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/SafeRingBuffer.h:25:0,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Uart.h:23,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/variants/mkrzero/variant.h:162,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Arduino.h:48,
                 from /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp:1:
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:22: error: expected unqualified-id before 'for'
 #define synchronized for (__Guard __guard; __guard.enter(); )
                      ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:44: error: '__guard' does not name a type; did you mean '__Guard'?
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                            ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:61: error: expected unqualified-id before ')' token
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                                             ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
Using library Wire at version 1.0 in folder: /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/libraries/Wire 
Using library hd44780 at version 1.3.2 in folder: /home/rob/Arduino/libraries/hd44780 
Using library ros2arduino at version 0.2.1 in folder: /home/rob/Arduino/libraries/ros2arduino 
Using library ezButton at version 1.0.3 in folder: /home/rob/Arduino/libraries/ezButton 
exit status 1
Error compiling for board Arduino MKRZERO.


I have to use the downloaded tar version as the one from apt has never worked at all. I have completely purged Arduino IDE from the system and when i reinstall along with all necessary libraries and the problem persists.

Any help would be greatly appreciated. First post so go easy on me if I used too many capitals etc. Thanks in advance.

Rob





pert

I'm having an issue with the IDE since an update was applied yesterday
What specifically did you update?
The IDE thinks everything is mkrwifi1010 with the same SN. I have a mkrzero and a mkrwifi1010 and neither of them is actually recognised, the 'get board info' never changes
I'm not sure about the situation with the serial number, but if you accidentally upload to a MKR Zero with the MKR WiFi 1010 selected from the Tools > Board menu then the MKR Zero board will then be identified as a MKR WiFi 1010. You can change it back to MKR Zero by uploading with the right board selected from the menu.

I can't upload code that I know is fine for these boards.

Further to this the IDE will no longer compile anything
Is the upload failure simply the compilation error, or is there a separate upload issue?

Code: [Select]
I/home/rob/Arduino/libraries/ezButton/src /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp -o /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp.o
In file included from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/SafeRingBuffer.h:25:0,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Uart.h:23,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/variants/mkrzero/variant.h:162,
                 from /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Arduino.h:48,
                 from /tmp/arduino_build_422084/sketch/ROS2Battery.ino.cpp:1:
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:22: error: expected unqualified-id before 'for'
 #define synchronized for (__Guard __guard; __guard.enter(); )
                      ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:44: error: '__guard' does not name a type; did you mean '__Guard'?
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                            ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:61: error: expected unqualified-id before ')' token
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                                             ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
Using library Wire at version 1.0 in folder: /home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/libraries/Wire
Using library hd44780 at version 1.3.2 in folder: /home/rob/Arduino/libraries/hd44780
Using library ros2arduino at version 0.2.1 in folder: /home/rob/Arduino/libraries/ros2arduino
Using library ezButton at version 1.0.3 in folder: /home/rob/Arduino/libraries/ezButton
exit status 1
Error compiling for board Arduino MKRZERO.

What happens if you try compiling the basic File > New sketch?

rob-garford

Still an issue 02/02/2021. Can be solved by rolling back board manager version, so definitely a bug in the 1.8.3 SAMD boards manager version.

pert

Still an issue 02/02/2021.
By "issue", do you mean this error?:
Code: [Select]
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:22: error: expected unqualified-id before 'for'
 #define synchronized for (__Guard __guard; __guard.enter(); )
                      ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:44: error: '__guard' does not name a type; did you mean '__Guard'?
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                            ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:61: error: expected unqualified-id before ')' token
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                                             ^
/home/rob/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~

If so, it's expected that the issue persists because there hasn't been a new release of Arduino SAMD Boards. However, there is progress. Someone made a bug report about this namespace pollution:
https://github.com/arduino/ArduinoCore-samd/issues/596
so at least now Arduino's developers are aware of the issues it caused.

Can be solved by rolling back board manager version, so definitely a bug in the 1.8.3 AVR boards manager version.
I doubt it's Arduino AVR Boards. Did you roll back Arduino AVR Boards, or Arduino SAMD Boards?

rob-garford

Apologies I didn't see your reply till I added my own. I accidentally agreed to the update again today and the issue came back.

It was the SAMD board manager that updated. Version 1.8.11 is the issue.

It makes no difference what I try to identify the board as. I have a zero and wifi 1010 and tried all combinations with no change it was always seen as a wifi 1010 with a random SN (although this time round this doesn't appear to be happening). The only thing that changes is the error message "  Error compiling for Arduino <selected board>"

The compilation error appears to prevent any upload, I can't burn a bootloader or even view the serial monitor through the IDE when this is happening.

A basic file new sketch does compile.

Thank you for your response.
Rob


pert

I have verified the ros2arduino library breakage you experienced and added it to the bug report I linked above with a reference back to this forum thread.

If you have a GitHub account, you can click the "Subscribe" button on that issue to get notifications about any developments toward resolving the issue.

Until then, I think your workaround of using Arduino SAMD Boards 1.8.10 is the easiest thing to do. If the Arduino IDE's updatable boards notification is annoying to you, you can uncheck the box next to the "Check for updates on startup" option in the Arduino IDE's File > Preferences dialog. But note that also controls the checks for new versions of the Arduino IDE itself as well as the libraries you installed via Library Manager, so you might want to check for new versions occasionally if you turn off that option.

The other option would be to do a search and replace in the source code to use a new name that doesn't have a conflict. You could either do that in the source code of the Arduino SAMD Boards core library:/home/rob/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino
or the ros2arduino library:
/home/rob/Arduino/libraries/ros2arduino

pert

The compilation error appears to prevent any upload

...

A basic file new sketch does compile.
Can you upload the File > New sketch?

I can't burn a bootloader or even view the serial monitor
Do you get the same error message, or a different one? If different, please post it here. It might be an unrelated issue because this "synchronized" name collision in the code shouldn't affect either of those things.

rob-garford

Thank you again for getting back to me. Ah so it is an issue with the ros2arduino library, that is good to know.

I could indeed upload the blank sketch.

I'll recreate the error and see what the bootloader output looks like when I get a moment later.

Rob

Go Up