VS Arduino
Visual Micro >> Installation & Troubleshooting >> Arduino Nano 33 BLE, Win 10
https://www.visualmicro.com/forums/YaBB.pl?num=1617022929

Message started by Sir Tom on Mar 29th, 2021 at 1:02pm

Title: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 29th, 2021 at 1:02pm
I can't get any upload to my Arduino Nano 33 BLE!

Board is ok, connection is ok, cable is ok, ports are ok, but upload doesn't work.
Arduino Nano 33 BLE seems to be special, as it uses COM5 for data and COM6 for bootloader.
Is there anything special I have to install / setup in VM?

I can use it by Arduion-IDE, but on each upload I have manually to switch to Com5 Arduino changes port and so looses SerialMonitor.

I was hoping VM would manage ports better. And besides I like and am used to work in VisualStudio in C#.
I DO get serial data in VM COM5, if I upload by Arduino IDE. But for uploading via A-IDE I have to stop VM Monitoring.

Quite impossible to work like this.

I've checked hundert combinations thousand times:
  • in normal mode, in bootloader mode (double reset),
  • starting with com5, starting with Com6
  • checking / updating Device manager (recognizes each change, but never shows the text 'Arduino')
  • testing different boards in VM (Cant find Nano 33 BLE, only similar)

System: Arduino NANO 33 BLE
WIN 10
Arduion IDE 1.8.13
Arduino Version in VM 1.6/1.8
User experienced programmer (in Visual Studio C#, Owner of Arduino since 3 Days)

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 29th, 2021 at 1:39pm
Thanks for the report.

Please attach a full build and upload log with the Verbose and Show Build Properties set, as shown at the top of this page.  Please also enable the Uploader > Verbose option.

There should be nothing special to set up in vMicro and we will be able to replicate more easily once we have the logs.

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 29th, 2021 at 3:12pm
Thanks for the quick answer:

Added log.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino-Build_BLINK1_Log.txt ( 56 KB | 3 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 29th, 2021 at 3:38pm
Is this the correct log for the Nano 33 BLE upload?

(I ask as it shows an Arduino Nano, which is the much older AVR based board, the BLE needs the Arduino nRF528x board package installing, and the "Arduino Nano 33 BLE" board selecting in Visual Micro)

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 29th, 2021 at 4:46pm

Simon@Visual Micro wrote on Mar 29th, 2021 at 3:38pm:
Is this the correct log for the Nano 33 BLE upload?

It's the only one I get.

Maybe that's my problem.

Sir Tom wrote on Mar 29th, 2021 at 1:02pm:
I've checked hundert combinations thousand times:
  • testing different boards in VM (Cant find Nano 33 BLE, only similar)

I cant find exactly "Nano 33 BLE", neither "nRF528x".

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 29th, 2021 at 6:33pm
I'm getting closer!
I got it to install the right board "NANO 33 BLE"! Hurray!

But nevertheless can't upload.

Log (see attachment) says:

Quote:

"C:\Users\TyE\AppData\Local\Temp\VMBuilds\Blink\nano33ble\Debug\Blink.cpp" -o "nul"
Das System kann die angegebene Datei nicht finden.
= System can't find file.


There is indeed no Blink.cpp, only Blink.ino.

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino-Build_BLINK_Log.txt ( 38 KB | 8 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Tim@Visual Micro on Mar 29th, 2021 at 7:52pm
Please post the verbose output, it w=is missing from your previous post.

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 30th, 2021 at 4:42pm
(Log Added, (sorry missed it first))
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino-Build_BLINK_Log_001.txt ( 38 KB | 7 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 30th, 2021 at 6:45pm
Thanks for the logs.

If you change the Debug option to Off do you still get the same compile error?
vMicro > Debugger > Debug: Off

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 30th, 2021 at 7:53pm
Yes. Still the same.
With DEBUG=off.

Quote:

Deep search for libraries ...

"C:\Users\TyE\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\bin\arm-none-eabi-g++"
     -c -w -g -Os -nostdlib
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/defines.txt"
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/cxxflags.txt" 
     -DARDUINO_ARCH_NRF52840 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -w -x c++ -E -CC
     -DARDUINO=108013 -DARDUINO_ARDUINO_NANO33BLE -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0
     -I"C:\Users\TyE\AppData\Local\ARDUIN~1\packages\arduino\hardware\mbed\1325B9~1.2\cores\arduino"
     -I"C:\Users\TyE\AppData\Local\ARDUIN~1\packages\arduino\hardware\mbed\1325B9~1.2\variants\ARDUIN~1"
     "-IC:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/api/deprecated"
     "-iprefixC:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino"
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/includes.txt"
     "C:\Users\TyE\AppData\Local\Temp\VMBuilds\Blink\nano33ble\Debug\Blink.cpp"
     -o "nul"
Das System kann die angegebene Datei nicht finden

Preprocess:
... same as above
Error: Unable to resolve macros for include


I wonder about highlighted lines: "-IC:\User...", but don't know if there is a problem, or how to solve?!?!

See attachment.

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino-Build_BLINK_Log_3__DEBUG_off_.txt ( 36 KB | 9 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 30th, 2021 at 8:59pm
Thanks again for the detail.

The paths have been shortened in an attempt to resolve issues with the toolchain version, but this may be too much.

If you select vMicro > Add Code > Add Local Board.txt, and add the below entries:
[code]vm.build.tools-8dot3=false
vm.build.compile-includes-8dot3=false
vm.build.compile-source-8dot3=false[/code]

Then do a Build > Clean Solution, and a build again.

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 30th, 2021 at 10:40pm
It's so exiting (your help) :D
and then frustrating (no solution) :(.

I added Board.txt.
But result ist the same (same error)
Only minor changes in Log:

Quote:

new lines:
Using project build property overrides from D:\TyE\Programmierung\C#\Blink\Blink\board.txt
...
vm.build.tools-8dot3=false
vm.build.compile-includes-8dot3=false
vm.build.compile-source-8dot3=false
...
iserial=6&2E6B96EA&1&0000
extra.time.local=1617149763
extra.time.utc=1617142563
...

changed line(s):
Deep search for libraries ...
"C:\Users\TyE\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\bin\arm-none-eabi-g++"
     -c -w -g -Os -nostdlib
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/defines.txt"
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/cxxflags.txt"
     -DARDUINO_ARCH_NRF52840 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -w -x c++ -E -CC -DARDUINO=108013 -DARDUINO_ARDUINO_NANO33BLE -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0
     -I"C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino"
     -I"C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE"
     "-IC:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/api/deprecated"
     "-iprefixC:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino"
     "@C:\Users\TyE\AppData\Local\arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/includes.txt"
     "C:\Users\TyE\AppData\Local\Temp\VMBuilds\Blink\nano33ble\Debug\Blink.cpp"
     -o
     "nul"
Das System kann die angegebene Datei nicht finden
Preprocess:
     ... same as above ...
Error: Unable to resolve macros for include
C:\Users\TyE\AppData\Local\Temp\VMBuilds\Blink\nano33ble\Debug\Blink.cpp


Old lines were: (Strange: Not ALL folders were renamed!)

Quote:

     -I"C:\Users\TyE\AppData\Local\ARDUIN~1\packages\arduino\hardware\mbed\1325B9~1.2\cores\arduino"
     -I"C:\Users\TyE\AppData\Local\ARDUIN~1\packages\arduino\hardware\mbed\1325B9~1.2\variants\ARDUIN~1"


See attatchment.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino-Build_BLINK_Log_4__with_Board_txt_.txt ( 36 KB | 7 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 31st, 2021 at 9:18am
Thanks for the detail, and apologies this did not work, we are unable to reproduce this on our side at present.

While we continue to investigate, would it be possible to try the below alternative work around?

The entries in board.txt can be removed for now (or commented out by prefixing with '#')

(GitHub Issue with Toolchain Path Length

To force in a later toolchain
1) Install the "STM32 Cores" Board package from Boards manager
2) Add a Local board.txt file to your project, by Right Clicking the Project in Solution Explorer > Add > Local Board.txt
3) Add the below property to a Local board.txt file, then save, and build the project again
[code]runtime.tools.arm-none-eabi-gcc.path={runtime.tools.xpack-arm-none-eabi-gcc.path}[/code]

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 31st, 2021 at 11:23am
OK. I'll give it a try.

But bevor trying this > just an idea:
Might it be possible that trying differnet versions of Arduino-IDE could be involved?
I struggled quite a while to  get it run on A-IDE, and so had to try a lot.
(Among installing different packages, several libraries and I even installed A-IDE 2 beta, and so on...
But nothing helped, until I recognized the changing ports.)

Might a dirty installation of A-IDE/Libraries cause the problem? Should I deinstall all Arduino-Software?
(I won't deinstall Visual Studio)

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Mar 31st, 2021 at 2:56pm
Would it be possible to perform build the same sketch in the Arduino IDE (Non-Pro, Non-Marketplace, Desktop version likely v1.8.13)?

If you could enable the File > Preferences > Show Verbose Output During > Compilation, this will reveal more information.

We should be able to advise better from there.

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 31st, 2021 at 6:56pm
THX!! THAT DID IT!!!

I'm (almost) done!!

Following you suggestion I saw, that ARDUINO uses folder "D:\TyE\Dokumente\ArduinoData\packages\..." though sketches are in "d:\TyE\Basteleien\..."

I had set up 'Optional Sketchbook location' to "d:\TyE\Basteleien\Arduino\". (As I wanted to use the same folders.)
THAT was the error!
Now I deleted this entry and all works like charm!
Even after deleting board.text.

THANKS a lot for you patience and help.

The only one I'm missing, is that I wanted to use this folder, as those works reffer to me to "handycraft" ("Bastelei" in german) and not "Programming".

So I'm pondering the 'Optional Sketchbook location' HAS TO BE empty, not only suggestion?!
Or how could I use a different sketchbook folder?

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Mar 31st, 2021 at 8:02pm
UPDATE


Sir Tom wrote on Mar 31st, 2021 at 6:56pm:

I had set up 'Optional Sketchbook location' to "d:\TyE\Basteleien\Arduino\". (As I wanted to use the same folders.)
THAT was the error!
Now I deleted this entry and all works like charm!
Even after deleting board.txt.

NOT TRUE!

Without board.txt I can't run any new project!
I have to include it on every new project, and first upload lasts for minutes!

So, conclusion:
  • 'Optional Sketchbook location' has to be empty
  • 4 (!) platforms MUST be installed:  Arduino AVR, Arduino megaAVR, Arduini mbed-enabled, STM32.
  • Board.txt must exist with the entry: runtime.tools.arm-none-eabi-gcc.path={runtime.tools.xpack-arm-none-eabi-gcc.path }

If I change/remove any of thse points it seems not to work (at least for my NANO 33 BLE).

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Apr 1st, 2021 at 3:11pm
Thanks for the detail.

The Optional Sketchbook can be set, but if there is a hardware folder beneath this, it can create conflicts with the board packages installed in \AppData\Arduino15\.

The only additional board packages I am aware of for this board is the "Arduino mbed enabled boards", and the "STM32" package for the work around.
Arduino AVR comes with the Arduino IDE (so pre-installed), and the megaAVR package was likely installed for a different "Nano" board when trying to find the correct package.

It may be worth cleaning up the packages installed:

  • Close all vMicro and Arduino IDEs
  • Renaming the folder in C:\Users\Username\AppData\Local\Arduino15 (e.g. Arduno15Old)
  • Then Start vMicro and re-install just the board packages needed


If this then works we can try the optional sketchbook location again:

  • Rename sketchbooklocation\hardware if it exists (e.g. hardwareOld)
  • Add the optional Sketchbook path to Visual Micro
  • This should still compile as before


Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Apr 5th, 2021 at 1:01pm
So it's working reasonably "well". Rather bad than good.

There are so many stumbling blocks, pitfalls and hurdles:

vMicro makes VS crash verrrry often.
(I hope I dont blame wrong vMicro, but I don't know any crash of VS when developing software.)
Just the simple act of changing a breakpoint leads to crash and reload!

The compilation of any new try lasts for minutes!
Even if I just restart working, (eg. after a crash!) without changing any line vMicor recompiles and I have to wait 2-3 mins.

Variables (even such as HIGH/LOW) do work properly, but are marked as syntax error / variable unknown, ..

Expressions in expression monitor have an extra line above the name, which cost a lot of space. How can I remove this?

Screenshot_2_questions.png ( 32 KB | 7 Downloads )

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Tim@Visual Micro on Apr 6th, 2021 at 11:38am
Hi,

1)

There is a crash in recent version sof VS related to floated tool windows. I suggest try docking the serial viewier and any other tool windows you have floated.

2)

It sounds like you have made some config changes. Please provide the info requested in yellow above so that we can see your config.

3)

Pleas ensure you have the English laguage pack installed into windows, even it is not being used by you.

Thanks

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Sir Tom on Apr 7th, 2021 at 7:16am
ad 1) All windows are attached. There are no floating windows. Even Expression Monitor and Pin Monitor are attached, allthough they were floating at their first apearence. (The Screenshot ist a package of 2 windows, as I didnt know how to add 2 pics.)

ad 2) What do you mean by Yellow?

ad 3) You mean in Win 10, or in VS, or ...? I think Win10 language pack ought to be installed automatic? Where would I get it?

Title: Re: Arduino Nano 33 BLE, Win 10
Post by Simon@Visual Micro on Apr 7th, 2021 at 1:30pm
Would it be possible to attach a new log from the Arduino IDE and Visual Micro as before, so we can investigate further?

The English Language Pack is for Visual Studio, and can be installed as shown at the end of Section 1 on the below page:
https://www.visualmicro.com/page/User-Guide.aspx?doc=Getting-started.html


VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.