unable to debug win32 simulator cygwin64
Posted: Fri Mar 31, 2017 3:56 pm
I've realized that I've lost win32 simulator debugging ability at some point, looking for hints or help please.
========================================================
Scenario #1: cygwin64 toolchain, ChibiOS master. win32-simulator demo as is (it has "-O2 -ggdb" by default I only change "TRGT = i686-w64-mingw32-")
Here's the outcome - https://ibb.co/gctrva
========================================================
Scenario #2: cygwin64 gbd works on another project, but not on my ChibiOS project (that's a copy-paste of my http://stackoverflow.com/questions/4312 ... ource-info post)
Under Windows with same i686-w64-mingw32-gcc I have two C++ projects. Both with "-ggdb -g3 -O0" - the smaller not ChibioOS project I can debug in Eclipse but the larger chibiOs one says "No source available". Both projects with " -static-libgcc -static-libstdc++"
I am failing to figure out what breaks it
Smaller not ChibioOS project happy gdb:

Larger ChibiOS prodject not happy gdb:

Good makefile: https://github.com/rusefi/rusefi/blob/t ... s/Makefile https://github.com/rusefi/rusefi/blob/t ... s/rules.mk
Bad makefile: https://github.com/rusefi/rusefi/blob/t ... s/Makefile https://github.com/rusefi/rusefi/blob/t ... s/rules.mk
Both projects show symbols with objdump.exe --syms:
Good project symbols: https://github.com/rusefi/rusefi/blob/t ... ts/symbols
Bad project symbols: https://github.com/rusefi/rusefi/blob/t ... ts/symbols
I would like to be able to debug both projects. What am I doing wrong?
========================================================
Question#3: what is the official toolchain for Win32 simulator? I am looking at "TRGT = mingw32-" so I've downloaded https://sourceforge.net/projects/mingw/files/ (did they not update it since 2013?) and here are the issues compiling with that toolchain:
Which 'cat' do we depend on? Have I missed cat embedded into mingw32? I am failing to locate a package which would have it.
========================================================
Scenario #1: cygwin64 toolchain, ChibiOS master. win32-simulator demo as is (it has "-O2 -ggdb" by default I only change "TRGT = i686-w64-mingw32-")
Here's the outcome - https://ibb.co/gctrva
========================================================
Scenario #2: cygwin64 gbd works on another project, but not on my ChibiOS project (that's a copy-paste of my http://stackoverflow.com/questions/4312 ... ource-info post)
Under Windows with same i686-w64-mingw32-gcc I have two C++ projects. Both with "-ggdb -g3 -O0" - the smaller not ChibioOS project I can debug in Eclipse but the larger chibiOs one says "No source available". Both projects with " -static-libgcc -static-libstdc++"
I am failing to figure out what breaks it
Smaller not ChibioOS project happy gdb:

Larger ChibiOS prodject not happy gdb:

Good makefile: https://github.com/rusefi/rusefi/blob/t ... s/Makefile https://github.com/rusefi/rusefi/blob/t ... s/rules.mk
Bad makefile: https://github.com/rusefi/rusefi/blob/t ... s/Makefile https://github.com/rusefi/rusefi/blob/t ... s/rules.mk
Both projects show symbols with objdump.exe --syms:
Good project symbols: https://github.com/rusefi/rusefi/blob/t ... ts/symbols
Bad project symbols: https://github.com/rusefi/rusefi/blob/t ... ts/symbols
I would like to be able to debug both projects. What am I doing wrong?
========================================================
Question#3: what is the official toolchain for Win32 simulator? I am looking at "TRGT = mingw32-" so I've downloaded https://sourceforge.net/projects/mingw/files/ (did they not update it since 2013?) and here are the issues compiling with that toolchain:
10:15:33 **** Incremental Build of configuration Default for project RT-Win32-Simulator.master ****
make -j4 all
'cat' is not recognized as an internal or external command,
operable program or batch file.
'cat' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
Compiler Options
The syntax of the command is incorrect.
mingw32-gcc -c -O2 -ggdb -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/ -DSIMULATOR -MD -MP -MF .dep/build.d -I. -I../../../os/license -I../../../os/rt/include -I../../../os/common/oslib/include -I../../../os/common/ports/SIMIA32/compilers/GCC -I../../../os/common/ports/SIMIA32 -I../../../os/hal/osal/rt -I../../../os/hal/include -I../../../os/hal/ports/simulator/win32 -I../../../os/hal/ports/simulator -I../../../os/hal/boards/simulator -I../../../test/lib -I../../../test/rt/source/test -I../../../os/hal/lib/streams -I../../../os/various/shell main.c -o main.o
The syntax of the command is incorrect.
../../../os/common/startup/SIMIA32/compilers/GCC/rules.mk:105: recipe for target 'build/obj' failed
make: *** [build/obj] Error 1
make: *** Waiting for unfinished jobs....
../../../os/common/startup/SIMIA32/compilers/GCC/rules.mk:108: recipe for target 'build/lst' failed
make: *** [build/lst] Error 1
ECHO is off.
Which 'cat' do we depend on? Have I missed cat embedded into mingw32? I am failing to locate a package which would have it.