[ell-i-developers] Re: some problemas with stlink: unknown id!?

  • From: Lari Lehtomäki <lari@xxxxxxxxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Fri, 29 Aug 2014 23:17:23 +0300

Hi,

st-flash utility assumes the uploaded program to be in binary format.

Objcopy will help in creating the binary file.
arm-none-eabi-objcopy -O binary sketch sketch.bin



Lari Lehtomäki
lari@xxxxxxxxxxxx
050 320 7920

On 29.8.2014 20:55, Pekka Nikander wrote:
> Maybe such versions don't exist yet.  However, adding support for a new chip 
> isn't that hard, for either program.  
> 
> I did it for STM32F051 back when we started, for both stlink and stm32flash, 
> but I no longer remember how I did :-).  Took something like two days, IIRC, 
> where most of the time I spent in getting the Cortex-M0 flasher ARM binary 
> right, since it didn't exist.
> 
> You will probably get a good hint from my commits, first for stlink:
> 
> https://github.com/texane/stlink/commit/e8b15c0e787c7d5fc90c35d53165fcf36afb39e3
> 
> Or better yet newer ones introducing new chip ids:
> 
> https://github.com/texane/stlink/commit/276be4fa42ba7a6fb6de7f8e1f8c0988de8dc708
> 
> It is probably as easy as the latter commit, but I cannot say for sure.
> 
> stm32flash is probably even easier:
> 
> https://github.com/toxygen/stm32flash/commit/4e869cb275605a97717707a55c230703304252bf
> 
> --Pekka
> 
> On 2014–08–29, at 20:46 , Eero Hakala <eero.k.hakala@xxxxxxxxx> wrote:
> 
>> I took in in from stlink (texane/stlink) git repo, it was linked directly 
>> from stm32 web pages. There is no more recent version there, do you have a 
>> link to a more recent one?
>>
>>
>>
>> -eero-
>>
>>
>>
>> On Fri, Aug 29, 2014 at 8:06 PM, Pekka Nikander <pekka.nikander@xxxxxx> 
>> wrote:
>> Looks like too old versions of both pieces of software.  You have to update 
>> them to versions that support the chip.
>>
>> --Pekka
>>
>> On 2014–08–29, at 20:00 , Eero Hakala <eero.k.hakala@xxxxxxxxx> wrote:
>>
>>> So what on earth is going on, how do you get the stuff from unix uploaded 
>>> into our stm32F334 nucleo board? With st-util I get this error message:
>>> eero@eibari:~/sula/stlink$ sudo ./st-util -v99
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: stlink current mode: debug 
>>> (jtag or swd)
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: stlink current mode: debug 
>>> (jtag or swd)
>>> 2014-08-29T19:32:42 INFO src/stlink-common.c: Loading device parameters....
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: *** stlink_core_id ***
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: core_id = 0x2ba01477
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: *** stlink_read_debug32 
>>> 10016438 is 0xe0042000
>>> 2014-08-29T19:32:42 WARN src/stlink-common.c: unknown chip id! 0x10016438
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: *** looking up stlink version
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: st vid         = 0x0483 
>>> (expect 0x0483)
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: stlink pid     = 0x374b
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: stlink version = 0x2
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: jtag version   = 0x14
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: swim version   = 0x4
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: *** stlink_reset ***
>>> 2014-08-29T19:32:42 INFO gdbserver/gdb-server.c: Chip ID is 00000438, Core 
>>> ID is  2ba01477.
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: *** reading target voltage
>>> 2014-08-29T19:32:42 DEBUG src/stlink-common.c: target voltage = 3234mV
>>> 2014-08-29T19:32:42 INFO gdbserver/gdb-server.c: Target voltage is 3234 mV.
>>> 2014-08-29T19:32:42 INFO gdbserver/gdb-server.c: Listening at *:4242...
>>>
>>>
>>> and the st-flash doesn't want to play with me either:
>>> eero@eibari:~/sula/stlink$ sudo ./st-flash --reset write 
>>> ../RIOT/examples/hello-world/bin/stm32f3discovery/hello-world.hex 0x8000000
>>> 2014-08-29T19:41:45 INFO src/stlink-common.c: Loading device parameters....
>>> 2014-08-29T19:41:45 WARN src/stlink-common.c: unknown chip id! 0x10016438
>>>
>>> So how do you flash stuff into that d....d board?
>>>
>>>
>>> By the way, anybody done a led blinking program with RIOT as there is no 
>>> such example there?
>>>
>>>
>>> -eero-
>>>
>>>
>>
>>
> 

Other related posts: