IDE pro vyvoj pro MCU - MS VS + WinGDB

Michal Grunt michal.grunt na vynet.cz
Úterý Říjen 9 23:40:50 CEST 2012


C:\Development\insight\bin>arm-eabi-gdb.exe c:\Development\Workspace\iotogglem0\iotogglem0_rom.elf
GNU gdb (GDB) 7.4.50.20120202-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=i686-pc-mingw32 --target=arm-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\Development\Workspace\iotogglem0\iotogglem0_rom.elf...do
ne.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Remote 'g' packet reply is too long: 00000000000000000800000000100240fffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0020002093090008ad0
90008000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
(gdb)



****************
Ale z Eclipse se mi poradil vytahnout log GDB a kdyz zopakuji prikazy jako provadi Eclipse tak vse bezi! Takze ted uz jenom najit proc...

****************


C:\Development\insight\bin>arm-eabi-gdb.exe
GNU gdb (GDB) 7.4.50.20120202-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=i686-pc-mingw32 --target=arm-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) set confirm off
(gdb) set width 0
(gdb) set height 0
(gdb) interpreter-exec console echo
(gdb) show prompt
Gdb's prompt is "(gdb) ".
(gdb) set new-console on
No symbol table is loaded.  Use the "file" command.
(gdb) symbol-file C:\\Development\\Workspace\\iotogglem0\\iotogglem0_rom.elf
Reading symbols from C:\Development\Workspace\iotogglem0\iotogglem0_rom.elf...do
ne.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
main () at .\src\main.c:56
56      {
(gdb) monitor reset halt
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x08000964 msp: 0x20002000
(gdb)


________________________________________
Odesílatel: hw-list-bounces na list.hw.cz [hw-list-bounces na list.hw.cz] za uživatele Petr Labaj [labaj na volny.cz]
Odesláno: 9. října 2012 23:16
Komu: HW-news
Předmět: Re: IDE pro vyvoj pro MCU - MS VS + WinGDB

Pokud mate zajem, tak na svuj web jsem dal verzi Insight, ktera
mi na WinXP funguje.
www.volny.cz/labaj/insight-multiarch-debugger-7.1-mingw32-setup.zip

Jinak ke GDB:
spustit GDB s parametrem jmeno_souboru.elf, a pak
target remote localhost:3333        (pokud to mate na stejnem pocitaci a na default portu)
monitor reset halt
load
c                            (prikaz continue, spusti beh ladeneho programu)

PL

*********************************

From: "Michal Grunt" <michal.grunt na vynet.cz>
To: "HW-news" <hw-list na list.hw.cz>
Sent: Tuesday, October 09, 2012 10:51 PM
Subject: RE: IDE pro vyvoj pro MCU - MS VS + WinGDB


U me funguje bez problemu Eclipse, ale Insight ne (error remote g) a C::B taky ne (nejdou breakpointy, mozna pres prikazy, ale to pak skoro nemusim pouzivat IDE a muzu to taky psat v txt editoru a debug delat z prikazove radky...). Jaky je presny postup gdb prikazu na otestovani? Skoda ze z Eclipse nejde (resp. jsem ho nenasel) vytahnout log komunikace s gdb.

________________________________________
Odesílatel: hw-list-bounces na list.hw.cz [hw-list-bounces na list.hw.cz] za uživatele Petr Labaj [labaj na volny.cz]
Odesláno: 9. října 2012 22:36
Komu: HW-news
Předmět: Re: IDE pro vyvoj pro MCU - MS VS + WinGDB

Jinak jsem teda ten Insight taky vyzkousel, a u me to funguje.

PL

**************************************

----- Original Message -----
From: "Petr Labaj" <labaj na volny.cz>
To: "HW-news" <hw-list na list.hw.cz>
Sent: Tuesday, October 09, 2012 10:14 PM
Subject: Re: IDE pro vyvoj pro MCU - MS VS + WinGDB


A neni to nahodou tak, ze Insight ma v sobe rovnou zakompilovane GDB?
Pak by vymena externiho GDB nic neresila.
Zkousel jste spustit to GDB samostatne, bez omalovanek?

PL

**************************************

From: "Michal Grunt" <michal.grunt na vynet.cz>
To: "HW-news" <hw-list na list.hw.cz>
Sent: Tuesday, October 09, 2012 9:47 PM
Subject: RE: IDE pro vyvoj pro MCU - MS VS + WinGDB


Tak to nepomohlo. Stahl jsem Sourcery, nastavil path, zkompiloval (zkousel jsem to jak pres make tak i v C::B) a pres to kdyz chci otevrit elf soubor v Insight tak to napise chybu remote 'g'... Co s tim, kde by jeste mohla byt chyba? Nechybi mi neco v makefile? Parametr -g tam je.

Dekuji

________________________________________
Odesílatel: hw-list-bounces na list.hw.cz [hw-list-bounces na list.hw.cz] za uživatele Petr Labaj [labaj na volny.cz]
Odesláno: 9. října 2012 13:26
Komu: HW-news
Předmět: Re: IDE pro vyvoj pro MCU - MS VS + WinGDB

http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

Stahnout EABI release.
Je treba se zaregistrovat (free).

PL

************************************

----- Original Message -----
From: "Michal Grunt" <michal.grunt na vynet.cz>
To: "HW-news" <hw-list na list.hw.cz>
Sent: Tuesday, October 09, 2012 10:35 AM
Subject: RE: IDE pro vyvoj pro MCU - MS VS + WinGDB


Muzete mi poslat odkaz na funkcni Soucery? Dekuji.

________________________________________
Odesílatel: hw-list-bounces na list.hw.cz [hw-list-bounces na list.hw.cz] za uživatele Petr Labaj [labaj na volny.cz]
Odesláno: 8. října 2012 17:06
Komu: HW-news
Předmět: Re: IDE pro vyvoj pro MCU - MS VS + WinGDB

Problem "remote 'g' packet reply is too long: 000 ..." je znamy problem nekompatibility
mezi GDB a OpenOCD, kdy se GDB po startu snazi zjistit konfiguraci registru MCU.
Reseni je bud pouzivat jiny GDB, ktery to ma osetrene (napr. Sourcery), nebo doplnit
pri spousteni do konfigurace (napr. v .gdbinit) odkaz na XML soubor, ktery popisuje
dany procesor.

Pro STM32F4 napr. nejak takhle:

Tohle pribude  v .gdbinit:
set tdesc filename <cesta>\stm32f4.xml

Takhle vypada ten stm32f4.xml:
<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<feature name="org.gnu.gdb.arm.m-profile">
<reg name="r0" bitsize="32"/>
<reg name="r1" bitsize="32"/>
<reg name="r2" bitsize="32"/>
<reg name="r3" bitsize="32"/>
<reg name="r4" bitsize="32"/>
<reg name="r5" bitsize="32"/>
<reg name="r6" bitsize="32"/>
<reg name="r7" bitsize="32"/>
<reg name="r8" bitsize="32"/>
<reg name="r9" bitsize="32"/>
<reg name="r10" bitsize="32"/>
<reg name="r11" bitsize="32"/>
<reg name="r12" bitsize="32"/>
<reg name="sp" bitsize="32" type="data_ptr"/>
<reg name="lr" bitsize="32"/>
<reg name="pc" bitsize="32" type="code_ptr"/>
<reg name="" bitsize="96" type="arm_fpa_ext" regnum="16"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="96" type="arm_fpa_ext"/>
<reg name="" bitsize="32"/>
<reg name="xpsr" bitsize="32" regnum="25"/>
</feature>
</target>

Nejaky popis je napr. tady: https://answers.launchpad.net/gcc-arm-embedded/+question/193249

PL

**********************************

From: "Michal Grunt" <michal.grunt na vynet.cz>
To: "HW-news" <hw-list na list.hw.cz>
Sent: Monday, October 08, 2012 9:42 AM
Subject: RE: IDE pro vyvoj pro MCU - MS VS + WinGDB


Jo aha, on ten WinGDB neni zdarma... Discovery F0 jsem koupil pred cca tydnem a zkousel jsem Eclipse a Code::Blocks (debug verze na kterou tu byl odkaz). Eclipse sice fungovalo vcetne debugu, ale nejak mi nesedlo (treba automaticke doplnovani pri psani kodu - nutnost mackat ctrl-space). Code::Blocks se vice blizilo Visual Studiu (vcetne doplnovani), ale zase je problem s debugem (openocd), resp. zatim se mi to neodarilo uspokokojive rozchodit (ignoruje to breakpointy). A externi Insight mi pri otevireni .elf hlasi chybu "remote 'g'.." (a ted uz nevim jak dal, nemam to pred sebou) - bud nemam neco zapnuteho v kompileru nebo pouzivam nejakou jinou verzi gcc (arm-none-eabi-gcc) s kterou si Insight nerozumi. Ale doladit debug a byl bych s Code::Blocks spokojen.

_______________________________________________
HW-list mailing list  -  sponsored by www.HW.cz
Hw-list na list.hw.cz
http://list.hw.cz/mailman/listinfo/hw-list
_______________________________________________
HW-list mailing list  -  sponsored by www.HW.cz
Hw-list na list.hw.cz
http://list.hw.cz/mailman/listinfo/hw-list
_______________________________________________
HW-list mailing list  -  sponsored by www.HW.cz
Hw-list na list.hw.cz
http://list.hw.cz/mailman/listinfo/hw-list
_______________________________________________
HW-list mailing list  -  sponsored by www.HW.cz
Hw-list na list.hw.cz
http://list.hw.cz/mailman/listinfo/hw-list


Další informace o konferenci Hw-list