Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) long time to start debugger (Read 5406 times)
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: long time to start debugger
Reply #20 - Dec 3rd, 2020 at 12:01pm
Print Post  
Thanks for the detail, and without the build hooks there was an issue previously.

The delay added by the Build Timing hook is expected, though the COM Port has also changed from COM1 to COM5.

Looking at the timings there is no longer the 2 minute delay between build completion and upload start. The board.txt can be removed from the project now we have the timings.

Can you confirm:
If you remove the board.txt and leave the selected COM port on COM5 - its OK for Build + Upload?
If you put it back to COM1 - its slow to Build + Upload?
  
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #21 - Dec 3rd, 2020 at 3:23pm
Print Post  
In my desperation to find the solution, I trying them on different PCs with two different OS (Win 7 and Win 10). So there is the difference in the COM numbers. 

The timing results I posted earlier is for Win 7 PC. 

Now I am trying on the Win 10 PC. I will post the results. 
I started to feel that it may be process control of VS while receiving from VM.  
The reason being, after the delayed programming, I can debug by "Attach to Process" method. 
And I have to specify the "tools.stlinkv2.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin" in the board.txt. 
Otherwise VS complains "Unable to start debugging. The value of miDebuggerPath is invalid". Although the Micro Build shows the following

Code
Select All
# MI Debugger Properties
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": ebug",
  "MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
  "debugServerArgs": "-d2 -l \Debug/MnC2test.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -f \"target/stm32f4x.cfg\" -c \"init\"",
  "program": test.ino.elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": ebug\\debugger_tmp.natvis",
  "showDisplayString": true
} 



Sorry for the persistent nagging. I am trying to setup my systems to use STLink and J-Link debuggers for a project I am starting. Just for your info, on the Win 10 PC, I can debug using STLink under VSCode/PlatformIO combination without any issues.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: long time to start debugger
Reply #22 - Dec 3rd, 2020 at 4:35pm
Print Post  
Thanks for explaining the differences between your environments.

The additional in board.txt for the toolchain is required due to the variety of STM32 cores available for the Arduino Ecosystem.

Please confirm: The original issue reported is the delayed programming, which from the logs has gone away at least on one of your machines?

  
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #23 - Dec 5th, 2020 at 2:18pm
Print Post  
Hi,

Win 7 machine, delay is not apparent.

However, Win 10 machine there is no improvement. I tried both on VS 2017 & 2019. Same results. I am attaching the files for your review.

Code
Select All
VS 2019 W10
==========================================
Sat 05/12/2020 21:41:09.24	Build Start
==========================================
Sat 05/12/2020 21:41:22.69	Core Start
Sat 05/12/2020 21:41:22.88	Core End
Sat 05/12/2020 21:41:23.02	Lib Start
Sat 05/12/2020 21:41:23.69	Lib End
Sat 05/12/2020 21:41:23.85	Sketch Start
Sat 05/12/2020 21:41:25.21	Sketch End
Sat 05/12/2020 21:41:25.33	Prelink Start
Sat 05/12/2020 21:41:26.76	Prelink End
Sat 05/12/2020 21:41:26.88	ObjCopy Start
Sat 05/12/2020 21:41:27.07	ObjCopy End
Sat 05/12/2020 21:42:00.22	Upload Start
Sat 05/12/2020 21:42:06.04	Upload End
==========================================
Sat 05/12/2020 21:43:13.04	Build Start
==========================================
Sat 05/12/2020 21:43:26.38	Core Start
Sat 05/12/2020 21:43:26.61	Core End
Sat 05/12/2020 21:43:26.69	Lib Start
Sat 05/12/2020 21:43:27.54	Lib End
Sat 05/12/2020 21:43:27.70	Sketch Start
Sat 05/12/2020 21:43:29.07	Sketch End
Sat 05/12/2020 21:43:29.26	Prelink Start
Sat 05/12/2020 21:43:30.63	Prelink End
Sat 05/12/2020 21:43:30.92	ObjCopy Start
Sat 05/12/2020 21:43:31.15	ObjCopy End
Sat 05/12/2020 21:44:32.24	Upload Start
Sat 05/12/2020 21:44:38.04	Upload End

VS 2017 W10
==========================================
Sat 05/12/2020 21:52:28.83	Build Start
==========================================
Sat 05/12/2020 21:53:21.36	Core Start
Sat 05/12/2020 21:53:21.44	Core End
Sat 05/12/2020 21:53:21.50	Lib Start
Sat 05/12/2020 21:53:22.21	Lib End
Sat 05/12/2020 21:53:22.29	Sketch Start
Sat 05/12/2020 21:53:23.58	Sketch End
Sat 05/12/2020 21:53:23.67	Prelink Start
Sat 05/12/2020 21:53:24.94	Prelink End
Sat 05/12/2020 21:53:25.03	ObjCopy Start
Sat 05/12/2020 21:53:25.20	ObjCopy End
Sat 05/12/2020 21:54:07.71	Upload Start
Sat 05/12/2020 21:54:13.04	Upload End
==========================================
Sat 05/12/2020 21:56:05.71	Build Start
==========================================
Sat 05/12/2020 21:56:19.27	Core Start
Sat 05/12/2020 21:56:19.37	Core End
Sat 05/12/2020 21:56:19.43	Lib Start
Sat 05/12/2020 21:56:20.13	Lib End
Sat 05/12/2020 21:56:20.20	Sketch Start
Sat 05/12/2020 21:56:21.47	Sketch End
Sat 05/12/2020 21:56:21.57	Prelink Start
Sat 05/12/2020 21:56:22.82	Prelink End
Sat 05/12/2020 21:56:22.89	ObjCopy Start
Sat 05/12/2020 21:56:23.05	ObjCopy End
Sat 05/12/2020 21:58:22.40	Upload Start
Sat 05/12/2020 21:58:28.04	Upload End
 

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #24 - Dec 7th, 2020 at 10:36am
Print Post  
Hi Simon,

Were you able to look at the build output and conclude anything?

Thank you.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: long time to start debugger
Reply #25 - Dec 7th, 2020 at 11:06am
Print Post  
Is there anything on COM5 on the Win10 Machine?

Can you attach the same log from the working Win7 Machine for comparison?

We are not aware of any issues on Win10 starting the debugging process, as we have a Win10 Machine in our development environment which does not display this issue.
  
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #26 - Dec 8th, 2020 at 8:30am
Print Post  
There is a USB-Serial converter on COM5. I will remove that and try. 
  
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #27 - Dec 8th, 2020 at 2:58pm
Print Post  
I tried after physically removing COM5. But no improvement.

Appreciate if you could explain about the following. I select SWD as the programming method. However I notice the following in the Micro Build output. Why is it stating upload method will be bootloader?

Code
Select All
Uploading 'MnC2test' to 'Nucleo-144' using 'COM5'
recipe.hooks.deploy.preupload.1.pattern
cmd.exe /c ECHO %DATE% %TIME%	Upload Start >> D:\1\MnC2test\BuildTimings.txt
Uploader started for board Nucleo-144
Upload method will be: bootloader
Uploading via Bootloader
CubeProg.bat 0 .bin" -g 



  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: long time to start debugger
Reply #28 - Dec 8th, 2020 at 3:49pm
Print Post  
Thanks for the update, and just wanted to ensure the device on the COM port wasn't causing the delay.

The reason it says "bootloader" is due to the programmers in this core being on the boards menu, instead of being configured as programmers as is normally done for the Arduino platforms.

So just to recap: 
  • Both tests use the same physical board + programmer   
  • Both machines have same VS, VMicro, Arduino versions
  • Win10 machine has the 1min delay between compile and upload
  • Win 7 machine has no delay between compile and upload


  
Back to top
 
IP Logged
 
simma
Junior Member
**
Offline


Posts: 20
Joined: Apr 7th, 2019
Re: long time to start debugger
Reply #29 - Dec 8th, 2020 at 3:50pm
Print Post  
Yes, confirm.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: long time to start debugger
Reply #30 - Feb 5th, 2021 at 10:37am
Print Post  
Would it be possible to attach the Arduino IDE log for an upload through the same programmer?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint