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 ATMEL ICE - USB SERIAL MONITOR (Read 2165 times)
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
ATMEL ICE - USB SERIAL MONITOR
Sep 13th, 2019 at 7:26am
Print Post  
Hi.
I would like to highlight two possible problems or improvements.

1) with SAM3X8E (arduino DUE), when I use Atmel ICE as debugger and upploader and I want to use the USB(native) serial as a normal serial connected to the PC for data exchange, visualmicro keeps telling me that the monitor is not active. I tried to make this change too - I removed the hardware debugger and used only the usb (native)  the debugger works and the COM (identical) opens and displays the received data. In case of use with hardware debugging I suspect that VM only uses the USB port connected to the debugger or that there is a problem on selecting a 2nd COM to use for a normal serial monitor.

2)2) I don't know if this is really a problem, but I'm working on ten boards, all these boards are Arduino DUE clones. The Atmel processor has never been programmed, they are all boards just arrived from the factory. When I connect for the first time the debugger Atmel ICE (JTAG), VM loads the program without errors, the board enter an undefined state, does not execute the program, if I launch the debugger (press START) VM enters in to  debugger, but does not stop at any breakpoint, even at the breakpoint on SETUP. So I tried to remove the ATMEL debugger, and I set VM again with ATMEL and magically it worked all, including breakpoint. I tried this procedure on 3 other cards and all of them show this same behavior. What can we think of?
Shocked

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


Posts: 2143
Joined: Feb 13th, 2019
Re: ATMEL ICE - USB SERIAL MONITOR
Reply #1 - Sep 13th, 2019 at 9:56am
Print Post  
1) 

This all works fine on the programming port (debug with ICE + Serial output), is there a reason not to use this? 

When you uploaded with the hardware debug disabled, did you upload via the Atmel ICE as programmer? 

Can you provide the logs for the working / non working scenarios?

After upload with ICE, check the port hasn't changed as well as this may happen.

2) 

If you tap reset on the board after the debugger has attached this should then land on the break point, and continue to debug as expected.

3) 

Make sure the baud rate of the serial monitor matches the baud rate you have used for serial.begin(baud) in your code.
« Last Edit: Sep 13th, 2019 at 9:52pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ATMEL ICE - USB SERIAL MONITOR
Reply #2 - Sep 14th, 2019 at 6:57am
Print Post  
Hi updartes:

point 1) Now work fine, is necessary re-opened the monitor alway before use. If monitor is already open dosen't work, 

point 2): after 10 boards the problem is alway the same: is not possibile lunch the debug if before you do not upload via USB. No erros occours. Below the output window on NO working condition.

Shocked
Debugger: Atmel ICE
Compiling 'MT2040-1909.01ETH' for 'Arduino Due (Native USB Port)'
Program size: 40.264 bytes (used 8% of a 524.288 byte maximum) (0,72 secs)
 
Uploading 'MT2040-1909.01ETH' to 'Arduino Due (Native USB Port)' using 'ATMEL-ICE'
Uploader started for board Arduino Due (Native USB Port)
Uploader will use programmer name: openocd_atmelice
C:\ProgramData\vmicro\tools\openocd-0.10.0.1\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.1/share/openocd/scripts/" -c "interface cmsis-dap" -c "cmsis_dap_vid_pid 0x03eb 0x2141" -c "set CHIPNAME at91sam3X8E" -c "source [find target/at91sam3ax_8x.cfg]" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "telnet_port disabled; program ug/MT2040-1909.01ETH.ino.elf}} reset; shutdown"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
at91sam3X8E
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 500 kHz
adapter_nsrst_delay: 100
cortex_m reset_config sysresetreq
****[vMicro]**** Uploading ELF :Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 01.27.0082
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
Info : SWD DPIDR 0x2ba01477
Info : at91sam3X8E.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0010004c msp: 0x20001000
** Programming Started **
auto erase enabled
Info : sam3 auto-erases while programming (request ignored)
wrote 49152 bytes from file /MT2040-1909.01ETH.ino.elf in 6.327702s (7.586 KiB/s)
** Programming Finished **
** Resetting Target **
shutdown command invoked
     The upload process has finished.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint