Hi,

I've gotten an STM32F7-Discovery board and tried to use OpenOCD to start debugging via Eclipse, based on existing board configurations I came up with two file additions:

openocd/scripts/board/stm32f7discovery.cfg
openocd/scripts/target/stm32f7x.cfg

Files are available here: https://gist.github.com/mojzu/ecaeaa2af325f4f90b08

And running 'openocd -f scripts/board/stm32f7discovery.cfg', appears to be successful in connecting to the board and reporting the number of break/watchpoints. However when trying to connect via gdb it fails and openocd reports:

"""
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v23 API v2 SWIM v9 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.214679
Info : stm32f4x.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10016449
Warn : Cannot identify target as a STM32 family.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
"""

After looking at the source code in openocd/src/flash/nor/stm32f2x.c it appeared that two switch statements at lines 771 and 891 need additions, so I added the cases:

"""
src/flash/nor/stm32f2x.c:771
case 0x449:
    max_flash_size_in_kb = 1024;
    break;

src/flash/nor/stm32f2x.c:891
case 0x449:
    device_str = "STM32F746";
    rev_str = "A";
    break;
"""

However as I don't currently have a working linux installation I'm trying to compile this using MinGW under Windows with little success (the guide I found was only about cross compiling for mingw32 under linux), I apologise if these questions are a little vague but here goes.

Is there any guide for compiling OpenOCD under windows that I could use to test these changes, or will it be a lot less hassle just to set up an ubuntu install? Am I even in the right ballpark for these changes to work? It's an ST-Link v2.1 SWD debugger onboard which I know works with the nucleo parts, but are there also likely to be changes elsewhere in the source for supporting the STM32F7?

Best Regards,
Sam


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to