Closed AloyseTech closed 6 years ago
You probably need to set SCB->VTOR in the startup code. Look at the D11 startup and copy than one line from there.
It seems to boot correclty now. But I can't use the board using openocd... Do you have an example on how to use free-dap with openocd?
I tried the following command :
openocd -f freedap.cfg
freedap.cfg :
interface cmsis-dap
cmsis_dap_vid_pid 0x6666 0x6666
returns:
Open On-Chip Debugger 0.9.0 (2018-01-24-01:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Error: unable to find CMSIS-DAP device
No idea, I have not used OpenODC much. This looks like a reasonable tutorial https://mcuoneclipse.com/2015/03/22/openocdcmsis-dap-debugging-with-eclipse-and-without-an-ide/
Thanks for the link. Could you please share your test sequence? Like flashing an MCU? What tool did you test?
I've tested it with IAR, Keil and my own tool https://github.com/ataradov/edbg All 3 were working fine.
I tried using edbg on ubuntu (from windows integration) but it does not find the debugger. I do have the HID Peripheral showing up on windows device manager with VID/PID/SN matching 0x6666/0x6666/123456.
I tried with the following command :
./edbg -t atmel_cm0p -s 123456 -r
But got the following error :
Error: unable to find a debugger with a specified serial number
What does "./edbg -l" print?
Why not use native windows version?
"./edbg -l" show no debugger connected... I will try the windows version. EDIT : I have the same result on windows...
Sorry for replying to late. Does the Windows Device Manager show the attached device at all? If so, could you please post a screenshot showing the VID/UID? Just want to make sure that USB itself is actually initialized correctly by the MCU.
Relocating the vector fixed the firmware issue. The enumeration issue was in EDBG itself. It is now solved with latest EDBG version (see this commit). Thanks for your help @ataradov @ooxi !
Hi Alex,
I'm trying to port free-dap on the Tau. I would like to keep the bootloader installed. I've modified the linker script you provide to take care not override the bootloader region and matched the memory map as follow :
I modified the dap_config.h header to match the pinout as follow :
And the makefile as follow :
Build is succesfull and I flash using the Tau Arduino package Bossac :
bossac.exe -e -w -v -b free_dap.bin
Which seems succesfull too:
But when I reset the board, the USB peripheral does not enumerate... I'm able to re-enter bootloader using the double-tap magic (double press on reset in less than 500ms) from the Tau's bootloader.
I made blink code from the main which works as expected :
Do you know if I'm missing something to make it work on this platform? Could the USB code from the bootloader somehow screw free-dap initialisation?
Thanks for your help :)