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 Send TopicPrint
Normal Topic How to use DAPlink to upload? (Read 2573 times)
sstm..
Junior Member
**
Offline


Posts: 12
Joined: Jul 4th, 2021
How to use DAPlink to upload?
Jul 7th, 2021 at 4:24pm
Print Post  
I don't know how to use DAPlink to upload.
I didn't find the option about DAPlink.

Uploading 'test' to 'Generic STM32F1 series' using 'COM46'
Uploader started for board Generic STM32F1 series
Upload method will be: bootloader
Uploading via Bootloader 
C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/stlink.cfg" -f "target/stm32f1x.cfg" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "reset_config; telnet_port disabled; program {C:\Users\XH\AppData\Local\Temp\VMBuilds\test\STMICR~1\Release/test.ino.elf} reset;reset_config;shutdown"
Open On-Chip Debugger 0.10.0+dev-01058-g853a05287 (2020-02-13-16:41)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
The uploader process failed
****[vMicro]**** Uploading ELF :Info : clock speed 1000 kHz
Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: How to use DAPlink to upload?
Reply #1 - Jul 7th, 2021 at 4:41pm
Print Post  
Do you have a specific DAPLink device? (and if possible a link to more information about it, or how to create it if custom?)

I have read in the past that the specific MBED DAPLink firmware may not work well with OpenOCD (which we use in vMicro in many cases), but we can definitely try to get it running.

  
Back to top
 
IP Logged
 
sstm..
Junior Member
**
Offline


Posts: 12
Joined: Jul 4th, 2021
Re: How to use DAPlink to upload?
Reply #2 - Jul 8th, 2021 at 5:06am
Print Post  
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: How to use DAPlink to upload?
Reply #3 - Jul 8th, 2021 at 3:19pm
Print Post  
Hopefully the below will work as a test of what I believe should work as a configuration:

Enable the vMicro > Uploader > Verbose option
Select the vMicro > Upload Method: STLinkv2 + OpenOCD (vMicro)
Then add a Local board.txt to the project from vMicro > Add Code > Add Local Board.txt
Paste the below configuration into the board.txt and save it.
Code
Select All
tools.stlinkv2.upload.boardCmd=-f "interface/cmsis-dap.cfg" -c "transport select swd; adapter speed 1000"
 



Then try the upload again and hopefully it will work, however if not please attach the full output with the failed upload as a text file.
  
Back to top
 
IP Logged
 
sstm..
Junior Member
**
Offline


Posts: 12
Joined: Jul 4th, 2021
Re: How to use DAPlink to upload?
Reply #4 - Jul 8th, 2021 at 3:58pm
Print Post  
Solved!
I truly appreciate your timely help. Smiley
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: How to use DAPlink to upload?
Reply #5 - Jul 8th, 2021 at 4:17pm
Print Post  
No problem, and you should also be able to use this as a Debugger with this additional entry in the local board.txt file:
Code
Select All
tools.stlinkv2.server.boardCmd=-f "interface/cmsis-dap.cfg" -c "transport select swd; adapter speed 1000" 



Then select the Debug: Hardware, and STLinkv2 debugger, then build and upload again.  After that it should just be Debug > Attach to Process.

We will get this added to the menu options for upload and debug in a release soon, and will update this thread when it is available.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: How to use DAPlink to upload?
Reply #6 - Jul 9th, 2021 at 10:52am
Print Post  
The DAPLink probe has been added to the Debug and Upload Menu Options for STM32 boards in the latest release (21.06.06.15), available at the top of the board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Once installed the local board.txt file can be removed (or comment out all entries using #)
« Last Edit: Jul 9th, 2021 at 12:31pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint