[Openocd-development] Oenocd git building under Mac OS X Lion
I am have two problems building openocd git head under my newly bought Mac Mini running Mac OS X Lion. The main problem is related to jimtcl. I am not so sure why options like "--enable-jlink --enable-ft2232_libftdi --disable-werror" are passed to jimtcl and apparently jimtcl does not like these options under Mac OS X. Under Ubuntu 11.10, things works since the top level configure is passing --disable-option-checking to the jimtcl configure. Not so sure why this does not work under Mac OS X. BTW, I am not using Macports or Fink, but rather homebrew. So the tools mostly come from XCode. mcuee@GX620Ubuntu:~/Desktop/build/openocd/openocd/build$ ... === configuring in jimtcl (/home/mcuee/Desktop/build/openocd/openocd/build/jimtcl) configure: running /bin/bash ../../jimtcl/configure.gnu --disable-option-checking '--prefix=/usr/local' '--enable-maintainer-mode' '--enable-jlink' '--enable-ft2232_libftdi' '--disable-werror' '--disable-shared' --cache-file=/dev/null --srcdir=../../jimtcl ... There is also a strange problem related to libusb-1.0 but that may be a separate issue. BTW, 0.5.0 release has no problem. Xiaofans-Mac-mini:build_libftdi xiaofanc$ ../configure --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi --disable-werror --disable-shared ... checking Build & Link with libftdi.. Success checking for libftdi highspeed device support... yes checking libusb-1.0/libusb.h usability... yes checking libusb-1.0/libusb.h presence... yes checking for libusb-1.0/libusb.h... yes checking for environ in unistd.h and stdlib.h... no checking for extern environ... yes checking for a C compiler for build tools... gcc -std=gnu99 checking for suffix of executable build tools... configure: creating ./config.status config.status: creating Makefile ... config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands === configuring in jimtcl (/Users/xiaofanc/work/openocd/openocd/build_libftdi/jimtcl) configure: running /bin/sh ../../jimtcl/configure.gnu '--prefix=/usr/local' '--enable-maintainer-mode' '--enable-jlink' '--enable-ft2232_libftdi' '--disable-werror' '--disable-shared' --cache-file=/dev/null --srcdir=../../jimtcl Host System...x86_64-apple-darwin11.2.0 Build System...x86_64-apple-darwin11.2.0 C compiler... cc -g -O2 C++ compiler... c++ -g -O2 Build C compiler...cc Checking for stdlib.h...ok Error: Unknown option --werror Try: 'configure --help' for options configure: error: ../../jimtcl/configure.gnu failed for jimtcl Xiaofans-Mac-mini:build_libftdi xiaofanc$ cd jimtcl/ Xiaofans-Mac-mini:jimtcl xiaofanc$ /bin/sh ../../jimtcl/configure.gnu '--prefix=/usr/local' '--enable-maintainer-mode' '--disable-shared' This works. Xiaofans-Mac-mini:jimtcl xiaofanc$ cd .. Xiaofans-Mac-mini:build_libftdi xiaofanc$ make ... /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -o openocd main.o libopenocd.la ../jimtcl/libjim.a -lftdi -lusb libtool: link: gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -o openocd main.o ./.libs/libopenocd.a -L/usr/local/Cellar/libusb/1.09rc3/lib /usr/local/lib/libusb-1.0.0.0.0.dylib ../jimtcl/libjim.a -lftdi /usr/local/Cellar/libusb-compat/0.1/lib/libusb.dylib /usr/local/Cellar/libusb/1.09rc3/lib/libusb-1.0.0.1.0.dylib -lobjc -pthread i686-apple-darwin11-llvm-gcc-4.2: /usr/local/lib/libusb-1.0.0.0.0.dylib: No such file or directory make[4]: *** [openocd] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 I am not so sure why it asks for /usr/local/lib/libusb-1.0.0.0.0.dylib, there is no such file. Change that one and I can build openocd git. Xiaofans-Mac-mini:build_libftdi xiaofanc$ ls /usr/local/lib/libusb* /usr/local/lib/libusb-0.1.4.dylib /usr/local/lib/libusb-1.0.la /usr/local/lib/libusb-1.0.0.1.0.dylib /usr/local/lib/libusb.a /usr/local/lib/libusb-1.0.0.dylib /usr/local/lib/libusb.dylib /usr/local/lib/libusb-1.0.a /usr/local/lib/libusb.la /usr/local/lib/libusb-1.0.dylib Xiaofans-Mac-mini:build_libftdi xiaofanc$ cd src/ Xiaofans-Mac-mini:src xiaofanc$ gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -o openocd main.o ./.libs/libopenocd.a -L/usr/local/Cellar/libusb/1.09rc3/lib /usr/local/lib/libusb-1.0.0.1.0.dylib ../jimtcl/libjim.a -lftdi /usr/local/Cellar/libusb-compat/0.1/lib/libusb.dylib /usr/local/Cellar/libusb/1.09rc3/lib/libusb-1.0.0.1.0.dylib -lobjc -pthread Xiaofans-Mac-mini:src xiaofanc$ ./openocd -v Open On-Chip Debugger 0.6.0-dev-00287-g886ea0b (2011-12-16-21:27) Licensed under GNU GPL v2 For bug reports, read http://openocd.so
Re: [Openocd-development] Slow NAND flashing
> Block Erase Time according to the data sheet for the flash memory is 1.5-2ms > and for 24 (0x30/0x2) blocks that makes max 48ms. And page program > time is 200-700 us, 64 * 700us = 44800us for a block. > And Amontec specifies that the baudrate for JTAGkey is 6Mbits/s The turnaround time for USB is 1ms, whereas it can be in the us range for e.g. ZY1000. You may be able to find out where you're loosing performance due to USB latency and then optimize it to use larger read/writes. -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free 1-866-980-3434 http://www.zylin.com/ ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Slow NAND flashing
On Fri, Dec 16, 2011 at 2:17 PM, Øyvind Harboe wrote: > On Fri, Dec 16, 2011 at 1:53 PM, Erik Ahlén > wrote: > > Am I doing something wrong or is NAND flashing always slow? > > I'm using a Amontec JTAGkey-2 to flash a boot loader on an i.MX35. The > > erasing takes ~21s and the writing takes ~35s. Erasing 0x0-0x30 and > the > > boot loader is 130K. > > What's the maximum theoretical performance according to the datasheets? > > > > > -- > Øyvind Harboe - Can Zylin Consulting help on your project? > US toll free 1-866-980-3434 > http://www.zylin.com/ > Block Erase Time according to the data sheet for the flash memory is 1.5-2ms and for 24 (0x30/0x2) blocks that makes max 48ms. And page program time is 200-700 us, 64 * 700us = 44800us for a block. And Amontec specifies that the baudrate for JTAGkey is 6Mbits/s ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] Slow NAND flashing
On Fri, Dec 16, 2011 at 1:53 PM, Erik Ahlén wrote: > Am I doing something wrong or is NAND flashing always slow? > I'm using a Amontec JTAGkey-2 to flash a boot loader on an i.MX35. The > erasing takes ~21s and the writing takes ~35s. Erasing 0x0-0x30 and the > boot loader is 130K. What's the maximum theoretical performance according to the datasheets? -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free 1-866-980-3434 http://www.zylin.com/ ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] Slow NAND flashing
Am I doing something wrong or is NAND flashing always slow? I'm using a Amontec JTAGkey-2 to flash a boot loader on an i.MX35. The erasing takes ~21s and the writing takes ~35s. Erasing 0x0-0x30 and the boot loader is 130K. Regards, Erik Ahlén ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development