I'm in the beginning stages of adding my non-audio application specific functionality to the main.c template provided with the Audio Weaver STM32 BSP. My target is the STM32F7 Discovery board. My IDE is OpenSTM32. I located the Eclipse project files and I'm able to build the project without changes. I can download the output .bin file using the ST-LINK Utility and it runs correctly. I'm not able to use the OpenSTM32 IDE to download and debug the .elf file. I absolutely need to debug so I can deug my application specific code while it's using the Audio Weaver libraries. My openocd log is shown below following my signature. I think the log shows what the problem is. I'm asking if anyone can provide help in solving it.
The linker control file specifies the DTCM and SDRAM memory sections. Eclipse is treating these sections as flash memory that should be written and verified. Of course these are RAM sections that should not be written and verified. See my bold/italic inline notations in the openocd log below.
Does anyone know how to tell Eclipse to treat the DTCM and SDRAM sections as RAM sections that should not be written and verified?
Thanks - John Speth
Openocd log:
Open On-Chip Debugger 0.10.0-dev-00010-g96aab7b (2018-07-13-06:51)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2.1 JTAG v25 API v2 M14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.234851
Info : Stlink adapter speed set to 1800 kHz
Warn : Silicon bug: single stepping will enter pending exception handler!
Info : STM32F746NGHx.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001648 msp: 0x20050000
Info : Stlink adapter speed set to 4000 kHz
adapter speed: 4000 kHz
** Programming Started **
auto erase enabled
Info : flash size probed value 1024
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000084 msp: 0x20050000
Info : flash size probed value 1024
Warn : no flash bank found for address 20000000 <----- First red flag (the DTCM section)
Warn : no flash bank found for address c0000000 <---- Second red flag (the SDRAM section)
wrote 524288 bytes from file Debug/STM32F746_Discovery.elf in 6.323586s (80.967 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20050000
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20050000
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20050000
Error: checksum mismatch - attempting binary compare
diff 0 address 0x20000000. Was 0x02 instead of 0x00 <---- Attempt to binary compare on RAM (guaranteed to fail)
diff 1 address 0x20000001. Was 0x46 instead of 0x00
diff 2 address 0x20000003. Was 0x20 instead of 0x00
diff 3 address 0x20000004. Was 0xc0 instead of 0x00
diff 4 address 0x20000005. Was 0x43 instead of 0x00
(... more of the same ...)
diff 125 address 0x20000089. Was 0x01 instead of 0x00
diff 126 address 0x2000008b. Was 0x20 instead of 0x00
diff 127 address 0x2000008c. Was 0x90 instead of 0x00
More than 128 errors, the rest are not printed.
** Verify Failed **
shutdown command invoked
11:44am
Hi John,
Since your question is outside the scope of using Audio Weaver, you may have more luck posting this question on the OpenSTM32 forums.
-Axel