|
From: Etienne D. <eti...@im...> - 2012-02-09 08:30:04
|
Le 08/02/2012 12:45, Konstantin Klubnichkin a écrit : > Hello, Etienne! > > Thank you for the reply. > > Well, in more details, there are 3 issues: > 1. The latest stm32w_flasher for Linux (version 2.x.x.x) is not > working at all on my Ubuntu computer > 2. The previous version of stm32w_flasher (version 1.x.x.x) starts up > but able to flash only FTDI-based boards > 3. Nothing works on MB951 board (except of the nodetest application > from the EmberZNet SDK) > > You right, FTDI boards are recognized by FTDI driver and named > ttyUSBxx, the STM32F-based looks like ttyACM0, but there are > differences inside. > > Also if you use 2.x.x.x version of the stm32w_flasher with the "old" > board, the first thing it does is an upgrade of the STM32F(?? not > sure, but looks like) firmware. > After this upgrade the USB device become composite with HID and USB > serial devices. And after upgrade I'm unable to flash it even in > virtual machine, have to reboot to WinXP. > With "old" STM32F firmware it recognized as composite device with one > serial USB, and this I'm able to flash using virtual machine. > > I have no idea what is inside the firmware of the STM32F, and there > are no sources for it, or I failed to find. The best I can do if I by > incident the STM32F firmware is upgraded - just plug the board in with > the button pressed. After this I "speak" not to STM32W, but to STM32F, > and I can xmodem STM32F firmware into it. That's interesting, where did you find this info? > BTW, again, it's not documented or mentioned anywhere, but STM32F > firmware can be found in CompositeForSTM32W.bin file near stm32w_flasher. > > All this leads me to the idea that it will be easier to reverse > engineer the protocol between STM32F and stm32w_flasher and write a > flasher myself, than make this work using vendor-provided tools. > That was about the stm32w_flasher mystery. > > Regarding the MB951 mystery - I have no idea how to use it. I can > flash Contiki inside, but it doesn't work. Actually I've switched to > Contiki after failed try to burn pre-compiled EmberZNet example into > it (stack claims that it is not compatible with the device). I can't > debug it because there are no soldering pads or something to connect > JTAG to. So now the best application for the stick is to put it on the > Christmas tree... > > Could you please notice the stm32w_flasher version? I mean the one > that work under Linux with STM32F-based boards? Actually we have : - MB851 boards rev.B -> FTDI - MB851 boards rev.C -> STM32F - MB954 boards -> FTDI Also, I modified a Makefile in order to call the flasher with "sudo": $ grep sudo cpu/stm32w108/Makefile.stm32w108 FLASHER = *sudo* $(CONTIKI)/tools/stm32w/stm32w_flasher/stm32w_flasher $ Then it works, for example on a MB851 boards rev.C (STM32F): [...] sudo ../../../tools/stm32w/stm32w_flasher/stm32w_flasher -f -i rs232 -p /dev/ttyACM0 -r test-button.bin [sudo] password for etienne: INFO: STM32W flasher utility version 2.0.0b2 for Linux WARNING: Device firmware is more recent than expected. Are you using an old version of this software ? INFO: Programming user flash INFO: Erasing pages from 0 to 28...done INFO: Programming 29660/29660 INFO: Done INFO: Resetting device INFO: Done [...] > And the PORT environment variable - how did you find it? Looking at some source, I don't remember exactly... For example, if you type "make login" to connect to the serial device, the "PORT" env variable is also checked. So, even if you have only one kind of boards, this env variable is very useful, as soon as you want to connect several boards to your computer. i.e. I have one terminal with PORT=/dev/ttyUSB0, another one with PORT=/dev/ttyUSB1, etc., each terminal dealing with its own board. If your question was about the path /dev/ttyACM<n> thing, I found it in the kernel messages after connecting a MB851 boards rev.C board (dmesg | tail). Regards Etienne > Thank you! > > 2012/2/8 Etienne Dublé <eti...@im... > <mailto:eti...@im...>> > > Hello Konstantin, > Here at LIG we have FTDI-based and STM32F-based boards. I work on > Linux and the stm32w_flasher provided with contiki works fine for > me, in both cases. The only difference I see is that the serial > device created by the kernel is not the same: > - /dev/ttyUSB<n> for FTDI-based boards > - /dev/ttyACM<n> for STM32F-based boards > So I just have to specify the port, for example: > export PORT=/dev/ttyACM0 > Then I can flash. > Have a good day > Etienne > > > -- > Best regards, > Konstantin Klubnichkin > -- CNRS / LIG - Equipes Drakkar et Hadas 681 rue de la passerelle - 38400 Saint Martin d'Hères Bureau D308 - Tel 0476827276 |