To get to where I am now, I have followed these basic steps.
-- Install Sourcery CodeBench Lite for ARM EABI arm-2014.05-28-arm-none-eabi.exe
-- Install Cygwin with "devel" option
-- git https://github.com/mprymek/ChibiOS-uGFX
-- Compile and run ChibiOS-uGFX demo for the STM32F429 discovery with LCD and do a happy dance because I found these great projects combined together.
-- Install ChibiStudio and use it's demo for the STM32F429, which allows stepping through C code. Again happy dance as I found this great project.
-- import make file project into ChibiStudio, copy debug folder from ChibiStudio demo, and update it's links to point to this imported project.
-- Fail to get code to step through C source like it does on the demo, google searching fails, so I then create forum post searching for help.
I have done make clean, which delete basically everything from the /build folder. From the console here's my compile command, note the -ggdb -O0 -g3
Code: Select all
C Compiler Options.... arm-none-eabi-gcc -c -ggdb -O0 -g3 -mcpu=cortex-m4 -falign-functions=16 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -ffunction-sections -fdata-sections -fno-common -flto -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -Icontrib/ugfx -Icontrib/ugfx/src/gdisp/mcufont -Icontrib/ugfx/3rdparty/tinygl-0.4-ugfx/include -Icontrib/ugfx/boards/base/STM32F429i-Discovery -Icontrib/ugfx/drivers/gdisp/STM32F429iDiscovery -Icontrib/ugfx/demos/modules/gdisp/basics -Icontrib/ChibiOS-RT-2.x/os/ports/common/ARMCMx/CMSIS/include -Icontrib/ChibiOS-RT-2.x/os/ports/common/ARMCMx -Icontrib/ChibiOS-RT-2.x/os/ports/GCC/ARMCMx -Icontrib/ChibiOS-RT-2.x/os/ports/GCC/ARMCMx/STM32F4xx -Icontrib/ChibiOS-RT-2.x/os/kernel/include -Icontrib/ChibiOS-RT-2.x/os/hal/include -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32F4xx -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/GPIOv2 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/I2Cv1 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/OTGv1 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/RTCv2 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/SPIv1 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/TIMv1 -Icontrib/ChibiOS-RT-2.x/os/hal/platforms/STM32/USARTv1 -Icontrib/ChibiOS-RT-2.x/boards/ST_STM32F429I_DISCOVERY -Icontrib/ChibiOS-RT-2.x/os/various -DGFX_USE_OS_CHIBIOS=TRUE -DGFX_USE_OS_CHIBIOS=TRUE -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o
I have the verbose option for the debugger, here is what I get from the console. The imported project makes this file ./.build/ChibiOS-uGFX.elf I wonder if that could be causing a problem, I know the .build style of folder naming is less common in windows. I wonder if perhaps this is the problem. I'm starting to grab at some straws here.
Code: Select all
92-environment-directory C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/dep C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj/CHIBIOS C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj/CHIBIOS/boards C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj/CHIBIOS/boards/ST_STM32F429I_DISCOVERY C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj/CHIBIOS/os C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/.build/obj/CHIBIOS/os/hal
trimmed to shorten message below max allow characters.
uGFX/contrib/ugfx/tools/gmake_scripts;C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/contrib/ugfx/tools/touch_driver_test;C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/contrib/ugfx/tools/uGFXnetDisplay;C:/Users/Vista_64_D630/Documents/Sync/compile/ChibiOS-uGFX/debug;$cdir;$cwd"
(gdb)
93-data-list-register-names
93^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","","","","","","","","","","xPSR","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","d10","d11","d12","d13","d14","d15","","","","","","","","","","","","","","","","","fpscr","msp","psp","primask","basepri","faultmask","control","s0","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24","s25","s26","s27","s28","s29","s30","s31"]
(gdb)
94-break-insert main.c:288
94^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
95-break-insert main.c:284
95^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
96-stack-list-frames 0 1
96^done,stack=[frame={level="0",addr="0x08005fa4",func="ResetHandler"}]
(gdb)
97 tbreak main
tbreak main
&"tbreak main\n"
continue
~"Temporary breakpoint 1 at 0x8005cde\n"
Temporary breakpoint 1 at 0x8005cde
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x08005cde",at="<main+6>",thread-groups=["i1"],times="0",original-location="main"}
97^done
(gdb)
98 continue
&"continue\n"
~"Continuing.\n"
Continuing.
~"Note: automatically using hardware breakpoints for read-only addresses.\n"
Note: automatically using hardware breakpoints for read-only addresses.
98^running
*running,thread-id="all"
(gdb)
99-data-list-changed-registers
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x08005cde",at="<main+6>",thread-groups=["i1"],times="1",original-location="main"}
~"\nTemporary breakpoint "
Temporary breakpoint ~"1, 0x08005cde in main ()\n"
1, 0x08005cde in main ()
*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x08005cde",func="main",args=[]},thread-id="1",stopped-threads="all"
=breakpoint-deleted,id="1"
(gdb)
99^done,changed-registers=["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","25","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128"]
(gdb)
100 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
100^done
(gdb)
101-break-list
101^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb)
102 info threads
&"info threads\n"
~" Id Target Id Frame \n"
~"* 1 Remote target 0x08005cde in main ()\n"
102^done
(gdb)
103-stack-info-depth
103^done,depth="1"
(gdb)
104-stack-list-frames 0 1
104^done,stack=[frame={level="0",addr="0x08005cde",func="main"}]
(gdb)
105-data-list-changed-registers
105^done,changed-registers=[]
(gdb)
106 info sharedlibrary
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
106^done
(gdb)
107-data-disassemble -s 0x8005cde -e 0x8005d16 -- 1
107^done,asm_insns=[{address="0x08005cde",func-name="main",offset="6",inst="bl\t0x8008810 <gfxInit>"},{address="0x08005ce2",func-name="main",offset="10",inst="ldr\tr0, [pc, #628]\t; (0x8005f58 <main+640>)"},{address="0x08005ce4",func-name="main",offset="12",inst="ldr\tr1, [pc, #628]\t; (0x8005f5c <main+644>)"},{address="0x08005ce6",func-name="main",offset="14",inst="movs\tr2, #200\t; 0xc8"},{address="0x08005ce8",func-name="main",offset="16",inst="movs\tr3, #0"},{address="0x08005cea",func-name="main",offset="18",inst="bl\t0x8001084 <msObjectInit>"},{address="0x08005cee",func-name="main",offset="22",inst="ldr\tr0, [pc, #616]\t; (0x8005f58 <main+640>)"},{address="0x08005cf0",func-name="main",offset="24",inst="ldr\tr1, [pc, #620]\t; (0x8005f60 <main+648>)"},{address="0x08005cf2",func-name="main",offset="26",inst="add\tr3, pc, #604\t; (adr r3, 0x8005f50 <main+632>)"},{address="0x08005cf4",func-name="main",offset="28",inst="ldrd\tr2, r3, [r3]"},{address="0x08005cf8",func-name="main",offset="32",inst="bl\t0x8005534 <chprintf>"},{address="0x08005cfc",func-name="main",offset="36",inst="ldr\tr3, [pc, #600]\t; (0x8005f58 <main+640>)"},{address="0x08005cfe",func-name="main",offset="38",inst="ldr\tr2, [r3, #4]"},{address="0x08005d00",func-name="main",offset="40",inst="ldr\tr3, [pc, #596]\t; (0x8005f58 <main+640>)"},{address="0x08005d02",func-name="main",offset="42",inst="ldr\tr3, [r3, #12]"},{address="0x08005d04",func-name="main",offset="44",inst="add\tr3, r2"},{address="0x08005d06",func-name="main",offset="46",inst="movs\tr2, #0"},{address="0x08005d08",func-name="main",offset="48",inst="strb\tr2, [r3, #0]"},{address="0x08005d0a",func-name="main",offset="50",inst="ldr\tr3, [pc, #600]\t; (0x8005f64 <main+652>)"},{address="0x08005d0c",func-name="main",offset="52",inst="ldr\tr3, [r3, #0]"},{address="0x08005d0e",func-name="main",offset="54",inst="mov\tr0, r3"},{address="0x08005d10",func-name="main",offset="56",inst="bl\t0x8009494 <gdispGGetWidth>"},{address="0x08005d14",func-name="main",offset="60",inst="mov\tr3, r0"}]
(gdb)
108-data-disassemble -s 0x8005cde -e 0x8005d16 -- 0
108^done,asm_insns=[{address="0x08005cde",func-name="main",offset="6",inst="bl\t0x8008810 <gfxInit>"},{address="0x08005ce2",func-name="main",offset="10",inst="ldr\tr0, [pc, #628]\t; (0x8005f58 <main+640>)"},{address="0x08005ce4",func-name="main",offset="12",inst="ldr\tr1, [pc, #628]\t; (0x8005f5c <main+644>)"},{address="0x08005ce6",func-name="main",offset="14",inst="movs\tr2, #200\t; 0xc8"},{address="0x08005ce8",func-name="main",offset="16",inst="movs\tr3, #0"},{address="0x08005cea",func-name="main",offset="18",inst="bl\t0x8001084 <msObjectInit>"},{address="0x08005cee",func-name="main",offset="22",inst="ldr\tr0, [pc, #616]\t; (0x8005f58 <main+640>)"},{address="0x08005cf0",func-name="main",offset="24",inst="ldr\tr1, [pc, #620]\t; (0x8005f60 <main+648>)"},{address="0x08005cf2",func-name="main",offset="26",inst="add\tr3, pc, #604\t; (adr r3, 0x8005f50 <main+632>)"},{address="0x08005cf4",func-name="main",offset="28",inst="ldrd\tr2, r3, [r3]"},{address="0x08005cf8",func-name="main",offset="32",inst="bl\t0x8005534 <chprintf>"},{address="0x08005cfc",func-name="main",offset="36",inst="ldr\tr3, [pc, #600]\t; (0x8005f58 <main+640>)"},{address="0x08005cfe",func-name="main",offset="38",inst="ldr\tr2, [r3, #4]"},{address="0x08005d00",func-name="main",offset="40",inst="ldr\tr3, [pc, #596]\t; (0x8005f58 <main+640>)"},{address="0x08005d02",func-name="main",offset="42",inst="ldr\tr3, [r3, #12]"},{address="0x08005d04",func-name="main",offset="44",inst="add\tr3, r2"},{address="0x08005d06",func-name="main",offset="46",inst="movs\tr2, #0"},{address="0x08005d08",func-name="main",offset="48",inst="strb\tr2, [r3, #0]"},{address="0x08005d0a",func-name="main",offset="50",inst="ldr\tr3, [pc, #600]\t; (0x8005f64 <main+652>)"},{address="0x08005d0c",func-name="main",offset="52",inst="ldr\tr3, [r3, #0]"},{address="0x08005d0e",func-name="main",offset="54",inst="mov\tr0, r3"},{address="0x08005d10",func-name="main",offset="56",inst="bl\t0x8009494 <gdispGGetWidth>"},{address="0x08005d14",func-name="main",offset="60",inst="mov\tr3, r0"}]
(gdb) I have tried this on Win7 and Vista 64 bit.