I'm having trouble booting my project and would appreciate some help. I have had success in the past with F0 and F1 parts, but am having some trouble with the F2.
The board is custom, based on STM32F205RGT6 using the STLinkV2-1/SWD from a Nucleo board. I can successfully flash and debug bare metal code using the defaults in SW4STM32 (openocd), so I know the hardware is OK. I setup a ChibiOS 16.1.5 project, based on RT-STM32F207-DISCOVERY demo project, except with the mcu type define changed to STM32F205xx, and pins set as inputs to avoid contention. I can compile/link no problem.
When I download and attempt to debug (using texane/st-util and gdb, a combination that works for me with an F0 part), I get the following output:
Code: Select all
cmerck@klendathu:~/src/xanthos/firmware/RT-STM32F207-DISCOVERY$ sudo ./debug.stlink.sh -f
***
PROJECT=ch
HEXFILE=build/ch.hex
***
make: Nothing to be done for `all'.
**** Reset board now! ****
2016-04-06T14:52:44 INFO src/stlink-common.c: Loading device parameters....
2016-04-06T14:52:44 INFO src/stlink-common.c: Device connected is: F2 device, id 0x20076411
2016-04-06T14:52:44 INFO src/stlink-common.c: SRAM size: 0x20000 bytes (128 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 131072 bytes
Mass erasing................
**** Success! ****
2016-04-06T14:53:02 INFO src/stlink-common.c: Loading device parameters....
2016-04-06T14:53:02 INFO src/stlink-common.c: Device connected is: F2 device, id 0x20076411
2016-04-06T14:53:02 INFO src/stlink-common.c: SRAM size: 0x20000 bytes (128 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 131072 bytes
2016-04-06T14:53:02 INFO gdbserver/gdb-server.c: Chip ID is 00000411, Core ID is 2ba01477.
2016-04-06T14:53:02 INFO gdbserver/gdb-server.c: Target voltage is 3245 mV.
2016-04-06T14:53:02 INFO gdbserver/gdb-server.c: Listening at *:4242...
GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/ch.elf...done.
2016-04-06T14:53:02 INFO gdbserver/gdb-server.c: Found 6 hw breakpoint registers
2016-04-06T14:53:02 INFO gdbserver/gdb-server.c: GDB connected.
0x1fff3de4 in ?? ()
Loading section startup, size 0x1c0 lma 0x8000000
Loading section .text, size 0x6910 lma 0x80001c0
Loading section .data, size 0xb8 lma 0x8006ad0
2016-04-06T14:53:03 INFO src/stlink-common.c: Attempting to write 16384 (0x4000) bytes to stm32 address: 134217728 (0x8000000)
EraseFlash - Sector:0x0 Size:0x4000
Flash page at addr: 0x08000000 erased
2016-04-06T14:53:03 INFO src/stlink-common.c: Finished erasing 1 pages of 16384 (0x4000) bytes
2016-04-06T14:53:03 INFO src/stlink-common.c: Starting Flash write for F2/F4/L4
2016-04-06T14:53:03 INFO src/stlink-common.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 16384
2016-04-06T14:53:03 INFO src/stlink-common.c: Starting verification of write complete
2016-04-06T14:53:03 INFO src/stlink-common.c: Flash written and verified! jolly good!
2016-04-06T14:53:03 INFO src/stlink-common.c: Attempting to write 16384 (0x4000) bytes to stm32 address: 134234112 (0x8004000)
EraseFlash - Sector:0x1 Size:0x4000
Flash page at addr: 0x08004000 erased
2016-04-06T14:53:04 INFO src/stlink-common.c: Finished erasing 1 pages of 16384 (0x4000) bytes
2016-04-06T14:53:04 INFO src/stlink-common.c: Starting Flash write for F2/F4/L4
2016-04-06T14:53:04 INFO src/stlink-common.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 16384
2016-04-06T14:53:04 INFO src/stlink-common.c: Starting verification of write complete
2016-04-06T14:53:04 INFO src/stlink-common.c: Flash written and verified! jolly good!
Start address 0x80001c0, load size 27528
Transfer rate: 14 KB/sec, 6882 bytes/write.
<here there was no more console output, and I pressed Ctrl-c>
^CError detected on fd 7
.gdbinit:3: Error in sourced command file:
Remote communication error. Target disconnected.: Interrupted system call.
(gdb) quit
The line which stands out to me is:
Code: Select all
0x1fff3de4 in ?? ()The fact that I can download & debug a bare metal project in SW4STM32 leads me to believe this is a software issue. My OS is Ubuntu 14.04 LTS if that matters.
Thanks for any pointers.
-Chris