0

In this step of the "Getting start" guide:

  1. Click F1 again, type and select Azure IoT Device Workbench: Upload Device Code

It starts to compile and upload the code to DevKit. I get the error below. Any idea? Thanks.

from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino\httpserver\app_httpd.cpp:33: C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\system/platform/wait_api.h:21:2: warning: #warning wait_api.h has been replaced by mbed_wait_api.h, please update to mbed_wait_api.h [since mbed-os-5.3] [-Wcpp]
#warning wait_api.h has been replaced by mbed_wait_api.h, please update to mbed_wait_api.h [since mbed-os-5.3]
In file included from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino/system/mbed.h:95:0,
from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino/EEPROMInterface.h:7,
from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino\httpserver\app_httpd.cpp:33: C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\system/platform/sleep.h:21:2: warning: #warning sleep.h has been replaced by mbed_sleep.h, please update to mbed_sleep.h [since mbed-os-5.3] [-Wcpp]
#warning sleep.h has been replaced by mbed_sleep.h, please update to mbed_sleep.h [since mbed-os-5.3]
In file included from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino/system/mbed.h:96:0,
from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino/EEPROMInterface.h:7,
from C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\cores\arduino\httpserver\app_httpd.cpp:33:
C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\system/platform/rtc_time.h:21:2: warning: #warning rtc_time.h has been replaced by mbed_rtc_time.h, please update to mbed_rtc_time.h [since mbed-os-5.3] [-Wcpp]
#warning rtc_time.h has been replaced by mbed_rtc_time.h, please update to mbed_rtc_time.h [since mbed-os-5.3]
C:\Users\ayung\AppData\Local\Arduino15\packages\AZ3166\tools\arm-none-eabi-gcc\5_4-2016q3/bin/arm-none-eabi-ar: unable to rename 'core\core.a'; reason: File exists
exit status 1
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[Error] Exit with code=1

Made sure board settings are correct in VSCode and in Arduino

Vasilisa
  • 4,604
  • 3
  • 20
  • 25
  • I have seen similar failures before and the only way I found to resolve it was by reinstalling the Arduino IDE. Can you give this a try? – Stefan Wick MSFT Feb 05 '19 at 14:39
  • I re-installed Arduino IDE and updated firmware. Got same error. Then re-installed VSCode. Now cannot install board in VSCode. VSCode gives error: [Starting] Install package - AZ3166... Loading configuration... Initializing packages... Preparing boards... java.lang.NullPointerException at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679) at processing.app.Base.onBoardOrPortChange(Base.java:1312) at processing.app.Base.(Base.java:282) at processing.app.Base.main(Base.java:151) Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true [Error] Exit with code=255 – Anthony Feb 07 '19 at 02:17
  • It seems the Arduino IDE was still not installed correctly. After uninstall Arduino, could you also remove the cached files in %Program Files%\Arduino and %User Profile%\AppData\Local\Arduino15. Then install Arduino IDE again. – renhel Feb 10 '19 at 12:20

1 Answers1

0

I had the same problem, and my searches only found this and the FAQ where I found "Failed to install Arduino Package for IoT DevKit" but it was not my issue. That reference was about a corrupted install <https://microsoft.github.io/azure-iot-developer-kit/docs/faq/>.

After several attempts this is what worked for me:

  1. Uninstalled the Extension pack from VSCode
  2. Uninstalled all of the Azure extension packs I have in VSCode.
  3. I forgot to update the settings.json
  4. Quit VSCode and went for a cup of coffee
  5. Restarted VSCode
  6. Re-installed the Arduino extension
  7. Press F1
  8. Launch Arduino Board Manager
  9. I watched the Output window and it went through without a problem! (This is where I was getting the error before)
  10. Installed Azure IoT Tools
  11. Went back to the Arduino Board Manager, entered AZ and it found it!
  12. I installed the latest version of MXChip - Microsoft Azure IoT Developer Kit by Microsoft

Hope this helps you. Good Luck