[<<][electronics][>>][..]
Thu Jan 12 12:52:19 EST 2012

LeafLabs Maple r5

( TL;DR : Don't use the IDE.  Follow instructions in [3]. )

I had some trouble with one particular usb port.  Plugging it in a
powered hub seems to solve the issue.  Here's how it registers.


[5020582.977878] usb 1-4.1.4.2: new full speed USB device using ehci_hcd and address 100
[5020583.087990] usb 1-4.1.4.2: New USB device found, idVendor=1eaf, idProduct=0003
[5020583.087993] usb 1-4.1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[5020583.087995] usb 1-4.1.4.2: Product: Maple 003
[5020583.087997] usb 1-4.1.4.2: Manufacturer: LeafLabs
[5020583.087998] usb 1-4.1.4.2: SerialNumber: LLM 003
[5020585.575876] usb 1-4.1.4.2: USB disconnect, address 100
[5020585.793800] usb 1-4.1.4.2: new full speed USB device using ehci_hcd and address 101
[5020585.906534] usb 1-4.1.4.2: New USB device found, idVendor=1eaf, idProduct=0004
[5020585.906537] usb 1-4.1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[5020585.906539] usb 1-4.1.4.2: Product: Maple
[5020585.906541] usb 1-4.1.4.2: Manufacturer: LeafLabs
[5020586.229291] cdc_acm 1-4.1.4.2:1.0: ttyACM0: USB ACM device
[5020586.230219] usbcore: registered new interface driver cdc_acm
[5020586.230221] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters


I'd like to find out the following:

 - How to use the IDE[1]

 - How to bypass the IDE and build an eCos-based image and load it
   in DFU mode.

First, switching to DFU mode is done by holding the button through a
reset.  Doesn't seem to work, neither with reset nor power cycle
(unplug/replug USB).

Doesn't seem to work on 64bit.

tom@zoo:/opt/xc/maple$ ./maple-ide
java.lang.UnsatisfiedLinkError: /opt/xc/maple-ide-v0.0.12/lib/librxtxSerial.so: /opt/xc/maple-ide-v0.0.12/lib/librxtxSerial.so
32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/xc/maple-ide-v0.0.12/lib/librxtxSerial.so: /opt/xc/maple-ide-v
: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1047)
        at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123)
        at processing.app.Editor.populateSerialMenu(Editor.java:795)
        at processing.app.Editor.buildToolsMenu(Editor.java:612)
        at processing.app.Editor.buildMenuBar(Editor.java:413)
        at processing.app.Editor.<init>(Editor.java:187)
        at processing.app.Base.handleOpen(Base.java:608)
        at processing.app.Base.handleOpen(Base.java:573)
        at processing.app.Base.handleNew(Base.java:475)
        at processing.app.Base.<init>(Base.java:245)
        at processing.app.Base.main(Base.java:149)

So, running on 32bit with sun java 6 it comes up, but is hardly
usable.  The UI seems to be full of bugs...  Though this could be Java
interacting with XMonad, which I've seen do weird things before.

Let's switch to emacs and command line tools.  Seems that the only
thing the IDE does is compile and upload.

See reference/unix-toolchain.html [3] for info on using libmaple
without the IDE.  Tested: the first time I got a segfault in the dfu
upload as part of "make install".  After that it seemed to work.

Looks like the rest should be straightforward:

  - Figure out the memory layout for the DFU image.

  - Figure out the upload protocol, i.e. how does it actually switch
    to DFU?

  - Does eCos have drivers for this chip?

STM32F103RBT:   Maple.
STM32F103ZET6:  eCos port for the STM3210E-EVAL[4] board.

These seem to be similar enough to at least give it a try.  Essential
devices seem to be supported:

tom@zoo:~/ecos-build/src/cvs/packages/devs$ find -name '*stm32*' |grep cdl
./flash/cortexm/stm32/current/cdl/flash_stm32.cdl
./usb/cortexm/stm32/current/cdl/usb_stm32.cdl
./spi/cortexm/stm32/current/cdl/spi_stm32.cdl
./adc/cortexm/stm32/current/cdl/adc_stm32.cdl
./serial/cortexm/stm32/current/cdl/ser_cortexm_stm32.cdl
./wallclock/cortexm/stm32/current/cdl/wallclock_stm32.cdl

Next:
- build eCos config
- port LwIP to maple?

[1] http://leaflabs.com/docs/maple-ide-install.html#maple-ide-install-linux
[2] http://wiki.openmoko.org/wiki/Dfu-util
[3] http://leaflabs.com/docs/unix-toolchain.html
[4] http://www.st.com/internet/evalboard/product/204176.jsp




[Reply][About]
[<<][electronics][>>][..]