When using the toolchain to build a project for the Cypress FX3 it works, but running GDB gives..
[ur 23:21] ~/work/micro/ussio/ussio01 >bsdmake TCHAIN=/usr/local/gcc-arm-none-eabi-4_7-2013q3 TCHAIN_VER=4.7.4 debug
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gdb -x /Users/darius/work/micro/ussio/ussio01/gdb.cfg main.elf
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130913-cvs
Copyright (C) 2012 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-apple-darwin10 --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/darius/work/micro/ussio/ussio01/obj/main.elf...done.
0x00000000 in ?? ()
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000053 pc: 0x40007f50
MMU: enabled, D-Cache: enabled, I-Cache: enabled
JTAG tap: fx3.cpu tap/device found: 0x07926069 (mfg: 0x034, part: 0x7926, ver: 0x0)
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000053 pc: 0x40007fa0
MMU: enabled, D-Cache: enabled, I-Cache: enabled
NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
NOTE! Severe performance degradation without working memory enabled.
NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
cpsr (/32): 0x60000053
/Users/darius/work/micro/ussio/ussio01/gdb.cfg:26: Error in sourced command file:
Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x1d164 [in module /Users/darius/work/micro/ussio/ussio01/obj/main.elf]
This happens using the prebuilt OSX binaries for 4.7-2012q4, 4.7-2013q3 and 4.8-2014q4.
I am using OSX 10.9, uname -a says
Darwin ur.dons.net.au 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
I have a working toolchain that I installed using Home Brew a while ago which reports as..
[ur 23:17] ~ >/usr/local/Cellar/gcc-arm-none-eabi/20120614/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/Cellar/gcc-arm-none-eabi/20120614/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc-arm-none-eabi/20120614/libexec/gcc/arm-none-eabi/4.6.2/lto-wrapper
Target: arm-none-eabi
Configured with: /private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/src/gcc/configure --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --target=arm-none-eabi --prefix=/usr/local/Cellar/gcc-arm-none-eabi/20120614 --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-lto --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-sysroot=/usr/local/Cellar/gcc-arm-none-eabi/20120614/arm-none-eabi --with-gmp=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-mpfr=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-mpc=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-ppl=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-cloog=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-libelf=/private/tmp/homebrew-gcc-arm-none-eabi-20120614-RPZI/gcc-arm-none-eabi-4_6-2012q2-20120614/build-macosx/host-libs/usr --with-host-libstdcxx=-lstdc++ --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-extra-multilibs=armv6-m,armv7-m,armv7e-m
Thread model: single
gcc version 4.6.2 20120613 (release) [ARM/embedded-4_6-branch revision 188521] (GNU Tools for ARM Embedded Processors)
The code is built like so
[[ur 23:20] ~/work/micro/ussio/ussio01 >bsdmake TCHAIN=/usr/local/gcc-arm-none-eabi-4_7-2013q3 TCHAIN_VER=4.7.4
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc -Os -pipe -Wall -I/Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///inc -g -DTX_ENABLE_EVENT_TRACE -DDEBUG -DCYU3P_FX3=1 -D__CYU3P_TX__=1 -O0 -mcpu=arm926ej-s -mthumb-interwork -Wa,-adhlns=crc.lst -c /Users/darius/work/micro/ussio/ussio01/crc.c -o crc.o
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc -Os -pipe -Wall -I/Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///inc -g -DTX_ENABLE_EVENT_TRACE -DDEBUG -DCYU3P_FX3=1 -D__CYU3P_TX__=1 -O0 -mcpu=arm926ej-s -mthumb-interwork -Wa,-adhlns=main.lst -c /Users/darius/work/micro/ussio/ussio01/main.c -o main.o
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc -Os -pipe -Wall -I/Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///inc -g -DTX_ENABLE_EVENT_TRACE -DDEBUG -DCYU3P_FX3=1 -D__CYU3P_TX__=1 -O0 -mcpu=arm926ej-s -mthumb-interwork -Wa,-adhlns=dscr.lst -c /Users/darius/work/micro/ussio/ussio01/dscr.c -o dscr.o
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc -Os -pipe -Wall -I/Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///inc -g -DTX_ENABLE_EVENT_TRACE -DDEBUG -DCYU3P_FX3=1 -D__CYU3P_TX__=1 -O0 -mcpu=arm926ej-s -mthumb-interwork -Wa,-adhlns=cyfxtx.lst -c /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/common/cyfxtx.c -o cyfxtx.o
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc -Os -pipe -Wall -I/Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///inc -g -DTX_ENABLE_EVENT_TRACE -DDEBUG -DCYU3P_FX3=1 -D__CYU3P_TX__=1 -O0 -mcpu=arm926ej-s -mthumb-interwork -c /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/common/cyfx_gcc_startup.S
/usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-ld --no-wchar-size-warning --gc-sections -d -T /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/common/fx3_512k.ld crc.o main.o dscr.o cyfxtx.o cyfx_gcc_startup.o -Map=main.map --cref -o main.elf --entry CyU3PFirmwareEntry /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///lib/fx3_debug/cy_as0260.a /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///lib/fx3_debug/cyu3mipicsi.a /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///lib/fx3_debug/cyu3lpp.a /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///lib/fx3_debug/cyfxapi.a /Users/darius/work/micro/ussio/ussio01/../../lib/cyfx3sdk/1.3/firmware/u3p_firmware///lib/fx3_debug/cyu3threadx.a /usr/local/gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/lib/libc.a /usr/local/gcc-arm-none-eabi-4_7-2013q3/lib/gcc/arm-none-eabi/4.7.4/libgcc.a
/Users/darius/work/fx3/elf2img/elf2img -i main.elf -o main.img
Note: 256 bytes of interrupt vector code have been removed from the image.
Use the "-vectorload yes" option to retain this code.
Unfortunately the FX3 libraries are proprietary :(
There is source for most of it but not ThreadX which it uses for threading, locks etc.
From the log you provide, I saw something like below:
-------------
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000053 pc: 0x40007fa0
MMU: enabled, D-Cache: enabled, I-Cache: enabled
-------------
Is your target a bare metal target? And what's the command in line 26 for below output?
------------- darius/ work/micro/ ussio/ussio01/ gdb.cfg: 26: Error in sourced command file: darius/ work/micro/ ussio/ussio01/ obj/main. elf]
/Users/
Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x1d164 [in module /Users/
-------------