stm32f042 + can bus

tomas mainzer t.mainzer na gmail.com
Pátek Listopad 11 18:57:50 CET 2016


DD,
pouzivam do embitz "vestaveny" STLInk GDB server (STLinkGDB.exe,
207872Bytes).
Podle vypisu ve verbose modu se zda ze chip by mohl byt podporovan (neni
tam uvedeno unknown chip ID),
ale je fakt mozne ze nekde na hlubsi urovni neni.
mam tu jeste desticku s STM32F103 takze skusim jeste tu.

"Ukecany" vypis z Gbd serveru:

STLINK GDB Server (EmBitz Sep 30 2016 12:24:29)
Shutdown after disconnect is active.
Connect under reset is active.

Connected to STlink/V2 probe at 001:028
DEBUG: stlink current mode: mass
DEBUG: stlink current mode: mass
DEBUG: *** stlink_enter_swd_mode ***
INFO : Interface - SWD mode
DEBUG: *** stlink_reset ***
DEBUG: *** looking up stlink version
DEBUG: st vid         = 0x0483 (expect 0x0483)
DEBUG: stlink pid     = 0x3748
DEBUG: stlink version = 0x2
DEBUG: jtag version   = 0x1c
DEBUG: swim version   = 0x6
INFO : Loading device parameters....
DEBUG: *** stlink_core_id ***
DEBUG: core_id = 0x0bb11477
DEBUG: *** stlink_read_debug32 0 is 0xe0042000
DEBUG: *** stlink_read_debug32 10006445 is 0x40015800
DEBUG: *** stlink_read_debug32 ffff0020 is 0x1ffff7cc
INFO : Device connected is: F0 medium device, id 0x445
INFO : SRAM size: 0x1800 bytes (6 KiB), Flash: 0x8000 bytes (32 KiB) in
pages of
 1024 bytes
Chip ID is 00000445, Core ID is  0bb11477.
Target voltage: 3.24
DEBUG: *** stlink_enter_swd_mode ***
INFO : Interface - SWD mode
DEBUG: *** stlink_force_debug_mode ***
DEBUG: *** stlink_reset ***
DEBUG: *** stlink_read_debug32 1 is 0xe000edfc
DEBUG: *** stlink_write_debug32 1000001 to 0xe000edfc
DEBUG: *** stlink_write_debug32 0 to 0xe0001028
DEBUG: *** stlink_write_debug32 0 to 0xe0001038
DEBUG: *** stlink_write_debug32 0 to 0xe0001048
DEBUG: *** stlink_write_debug32 0 to 0xe0001058
DEBUG: *** stlink_write_debug32 3 to 0xe0002000
DEBUG: *** stlink_read_debug32 41 is 0xe0002000
DEBUG: *** stlink_write_debug32 0 to 0xe0002008
DEBUG: *** stlink_write_debug32 0 to 0xe000200c
DEBUG: *** stlink_write_debug32 0 to 0xe0002010
DEBUG: *** stlink_write_debug32 0 to 0xe0002014
Number of HW-breakpoints: 4
Listening at *:4242...
GDB connected.
DEBUG: *** stlink_read_all_regs ***
DEBUG: *** stlink_write_debug32 3 to 0xe0002000
DEBUG: *** stlink_read_debug32 41 is 0xe0002000
DEBUG: *** stlink_write_debug32 0 to 0xe0002008
DEBUG: *** stlink_write_debug32 0 to 0xe000200c
DEBUG: *** stlink_write_debug32 0 to 0xe0002010
DEBUG: *** stlink_write_debug32 0 to 0xe0002014
DEBUG: *** stlink_force_debug_mode ***
DEBUG: *** stlink_read_debug32 1000001 is 0xe000edfc
DEBUG: *** stlink_write_debug32 1000001 to 0xe000edfc
DEBUG: *** stlink_write_debug32 5fa0004 to 0xe000ed0c
DEBUG: *** stlink_read_debug32 3030003 is 0xe000edf0
DEBUG: *** stlink_read_debug32 30003 is 0xe000edf0
DEBUG: *** stlink_write_debug32 1000000 to 0xe000edfc
DEBUG: *** stlink_write_debug32 3 to 0xe0002000
DEBUG: *** stlink_read_debug32 41 is 0xe0002000
DEBUG: *** stlink_write_debug32 0 to 0xe0002008
DEBUG: *** stlink_write_debug32 0 to 0xe000200c
DEBUG: *** stlink_write_debug32 0 to 0xe0002010
DEBUG: *** stlink_write_debug32 0 to 0xe0002014
DEBUG: *** stlink_read_debug32 1000000 is 0xe000edfc
DEBUG: *** stlink_write_debug32 1000000 to 0xe000edfc
DEBUG: *** stlink_write_debug32 0 to 0xe0001028
DEBUG: *** stlink_write_debug32 0 to 0xe0001038
DEBUG: *** stlink_write_debug32 0 to 0xe0001048
DEBUG: *** stlink_write_debug32 0 to 0xe0001058
Reset: system
GDB Program Transfer:
**
done.
DEBUG: *** stlink_reset ***
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8000000 of 0x400 bytes.
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8000400 of 0x400 bytes.
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8000800 of 0x400 bytes.
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8000c00 of 0x400 bytes.
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8001000 of 0x400 bytes.
INFO : Starting verification of write complete
DEBUG: *** stlink_read_mem32 ***
INFO : Flash written and verified!
Flash skip unchanged page 0x8001400 of 0x400 bytes.
DEBUG: *** stlink_reset ***
DEBUG: *** stlink_write_reg
DEBUG: *** stlink_read_reg
DEBUG:  (16) ***
DEBUG: r_idx (16) = 0xc1000000
DEBUG: *** stlink_read_mem32 ***
DEBUG: *** stlink_read_all_regs ***
DEBUG: *** stlink_read_mem32 ***
DEBUG: *** stlink_read_reg
DEBUG:  (16) ***
DEBUG: r_idx (16) = 0xc1000000
DEBUG: *** stlink_force_debug_mode ***
DEBUG: *** stlink_read_debug32 1 is 0xe000edfc
DEBUG: *** stlink_write_debug32 1 to 0xe000edfc
DEBUG: *** stlink_write_debug32 5fa0004 to 0xe000ed0c
DEBUG: *** stlink_read_debug32 3030003 is 0xe000edf0
DEBUG: *** stlink_read_debug32 30003 is 0xe000edf0
DEBUG: *** stlink_write_debug32 0 to 0xe000edfc
DEBUG: *** stlink_write_debug32 3 to 0xe0002000
DEBUG: *** stlink_read_debug32 41 is 0xe0002000
DEBUG: *** stlink_write_debug32 0 to 0xe0002008
DEBUG: *** stlink_write_debug32 0 to 0xe000200c
DEBUG: *** stlink_write_debug32 0 to 0xe0002010
DEBUG: *** stlink_write_debug32 0 to 0xe0002014
DEBUG: *** stlink_read_debug32 0 is 0xe000edfc
DEBUG: *** stlink_write_debug32 1000000 to 0xe000edfc
DEBUG: *** stlink_write_debug32 0 to 0xe0001028
DEBUG: *** stlink_write_debug32 0 to 0xe0001038
DEBUG: *** stlink_write_debug32 0 to 0xe0001048
DEBUG: *** stlink_write_debug32 0 to 0xe0001058
Reset: system
Write memory: address 0xE000ED08 (Data = 0x8000000)
DEBUG: *** stlink_write_mem32 4 bytes to 0xe000ed08
DEBUG: *** stlink_read_all_regs ***


Dne 11. listopadu 2016 17:31 Josef Štengl <ok1ced na nagano.cz> napsal(a):

> Troufalý dotaz: co používáte za gdb? Respektive když přímo spustíte gdb,
> tak to pracuje nebo nikoliv?
>
>
> Dne 11.11.2016 v 15:20 tomas mainzer napsal(a):
>
>> ad embitz/debugovani (p.Buchta) - dekuji za zaslani projektu, ale ani se
>> (temer) stejnym nastavenim jako mate vy to neslo.
>> Sel jsem dokonce tak daleko ze jsem nainstaloval predchozi verzi embitz
>> (tj. ve ktere byl vytvoren Vas projekt), prelozil
>> jsem ho tam a skusil to debugovat. Bez vysledku.
>> tj. dosavadni zaver: zda se ze nemoznost debugovani je neco mimo kontrolu
>> prekladace (tj. ne nastavenim).
>> takze muj OS: windows8
>> ST-LINK Firmware version : V2J28S6
>> Pokud nekoho napada co dalsiho by by mohlo byt pricinou, rad vyzkousim.
>> TM.
>>
>>
>>
>>
>>
>>
>>
>> Dne 11. listopadu 2016 13:20 tomas mainzer <t.mainzer na gmail.com <mailto:
>> t.mainzer na gmail.com>> napsal(a):
>>
>>     ad embitz/debugovani (p.Buchta) - nastaveni interface mame totozne. V
>> nastaveni kompilatoru/linkeru jsem se jiz drive
>>     snazil nastavit co nejvice informaci, ale bez uspechu na moznost
>> bebugovani. Pokud mate nejaky projekt (nebo alespon
>>     *.epb soubor) ktery je mozne poslat pokusil bych se porovnat
>> nastaveni. Jako prekladac pouzivam ten Embitz baremetal.
>>     Diky. TM,
>>
>>
>>
>>     Dne 11. listopadu 2016 12:21 Jaroslav Buchta <
>> jaroslav.buchta na hascomp.cz <mailto:jaroslav.buchta na hascomp.cz>>
>> napsal(a):
>>
>>         S touto kombinaci pouzivam ladeni vsude a zcela bez problemu -
>> neni spis problem v nastaveni prekladu, linkovani z
>>         hlediska ladicich informaci?
>>         Jeste kouknete na nastaveni interface, me to funguje s timto:
>>
>>
>>
>>
>>         Dne 11.11.2016 v 12:13 tomas mainzer napsal(a):
>>
>>>         Dekuji za vsechny rady, reportuji prvni uspech - prvni odeslany
>>> paket na osciloskopu.
>>>         Pro prvni prihlizeni pomohl zakaz preruseni, ackoliv prerusovaci
>>> rutina tam je. Tedy je tam zakopan pes kolem
>>>         tohoto.
>>>         Uprava kodu:  CAN_ITConfig(CAN, CAN_IT_FMP0, DISABLE);  //bylo:
>>> ENABLE
>>>
>>>         K ladeni se poji dotaz - ma li nekdo zkusenosti - pouzivam
>>> Embitz + ST-link V2 (klon) - pripojeno pouze SWCLK a
>>>         SWDIO.
>>>         Procesor to naprogramuje, ale neni to ochotno spustit/krokovat.
>>> vypisuje to hlasku
>>>         "Cannot find bounds of current function".
>>>         pokud odpojim a pripojim napajeni program se normalne rozbehne,
>>> ale ladit se to neda.
>>>
>>>         Pro pripadne zajemce dodavam: Aby sli importovane STL examply v
>>> embitz prelozit bylo treba do COMPILER settings
>>>         / defines pridat jeste polozku STM32F042  (embitz tam
>>> automaticky pri tvrobe projektu definoval pouze STM32F0xx
>>>         a STM32F042K6 )
>>>
>>>         T.
>>>
>>>
>>>
>>>
>>>
>>
>>         _______________________________________________
>>         HW-list mailing list  -  sponsored by www.HW.cz <http://www.HW.cz
>> >
>>         Hw-list na list.hw.cz <mailto:Hw-list na list.hw.cz>
>>         http://list.hw.cz/mailman/listinfo/hw-list <
>> 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ší část ---------------
HTML příloha byla odstraněna...
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20161111/6a5645e7/attachment-0001.html>


Další informace o konferenci Hw-list