Category Archives: AVR / Embedded

J-Kit 프로그래밍 하기

JCNET에서 만든 JKIT-128은 프로그래머로 stk500을 쓰는거같은데
리눅스에서 avrdude로 업로드 하려면 오류가 난다…. (이유가…?)

네이버 카페 보면 avrdude 설정값을 바꾼뒤에 재컴파일 하라고 하는데
나는 /etc/avrdude.conf 를 수정해서 해결하였다.

3280: id = “m128”;
3281: desc = “ATmega128”;
아래쪽의 memory “flash”섹션에있는
3361: page_size를 256 에서 128로
3362: num_pages 를 512에서 1024로
바꾼뒤에는 업로드가 잘된다!

http://cafe.naver.com/lazydigital/5419

죽은 G2 살려내기 (F320)

롬질하다가 G2가 죽었다면
아래의 방법으로 쉽게 살려낼 수 있다.

분해해야 하므로 정말로 완전히 죽었는지 확인할것(리커버리, 다운로드모드, 일반부팅)
전혀 답이없을때는 >>

뒷뚜껑을 살살 열어서
a
버튼이랑 심카드부분 제거,
bc
배터리 빼고 USB만 연결한 상태에서 여기 두군데 쇼트시키면 (잘안되면 한 2초정도 길~게)
Qualcomm HSUSB_BULK 이렇게 외장하드처럼 인식함
그러면 dd로 열심히 롬 다시 씌워주면됨 ^^* 퀄컴짱인듯.

ps. 왜 토시바 옆에 저런게 있는거지? ap 옆에 있어야될거같은데
ps2. 이런건 어떻게 찾는거야;

출처 : http://forum.xda-developers.com/lg-g2/general/fix-lg-g2-recovery-mode-download-mode-t2840458

죽은 NETIS WF2480 살려내기

펌웨어 업데이트하다가 WF2480이 죽(였)었다.
손쉽게 사용자가 debrick 할 수 있는데 서비스 센터에서는 자꾸 입고시키란다.(택배비 무료로!)
그것마저도 귀찮았기에 웹좀 돌아보니 TFTP로 손쉽게 복구시킬 수 있는 방법이 있었다.

먼저 정식펌웨어를 보면 aa요롷케 WF2480이라고 헤더가 7자리 차지하고있다(0x0A까지)
이거 날려서 원본펌웨어를 준비한다.  (dd if=./WF2480_v1.6.23.bin of=./fw.bin bs=1 skip=7)

다음은 벽돌된 장비를 리셋버튼을 누르고(?) 또는 부팅중 열라 눌러주면 아무런 반응이 없다.
내부적으로는 어떤 모드 (<RealTek> 이란 쉘이뜨는) 에 진입하는데 반응이 없다.
이 상태에서 랜선으로 컴퓨터랑 연결해주고 컴퓨터에서 ip 대충잡고 게이트웨이 192.168.1.6으로 잡아준다.
이후 (atftp -p -l fw.bin 192.168.1.6) 이런식으로 파일을 올려주면 아래와 같이 알아서 롬질하고 재부팅까지 해준다. DONE.

========== SPI =============
SDRAM CLOCK:181MHZ
 ------------------------- Force into Single IO Mode ------------------------ 
|No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
| 0 1c3017h  0h  800000h  10000h   1000h     100h   40   30           UNKNOWN|
 ---------------------------------------------------------------------------- 
Reboot Result from Watchdog Timeout!

---RealTek(RTL8198)at 2013.01.25-14:24+0900 version v1.2 [16bit](620MHz)
no sys signature at 00010000!
no sys signature at 00020000!
no sys signature at 00030000!
no rootfs signature at 000E0000!
no rootfs signature at 000F0000!
no rootfs signature at 00130000!
Set GPHY Parameter OK

---Ethernet init Okay!
<RealTek>
**TFTP Client Upload, File Name: fw.bin
/
**TFTP Client Upload File Size = 2A1784 Bytes at 80500000

Success!
<RealTek>
Webpages upgrade.
checksum Ok !
burn Addr =0x28000! srcAddr=0x80500000 len =0x20360 
.................................
Flash Write Successed!
<RealTek>
Linux kernel (root-fs) upgrade.
checksum Ok !
burn Addr =0x68000! srcAddr=0x80520360 len =0xed412 
................................................................................
Flash Write Successed!
<RealTek>
Root filesystem upgrade.
checksum Ok !
burn Addr =0x169000! srcAddr=0x8060d782 len =0x194002 
................................................................................
Flash Write Successed!
<RealTek>
reboot.......

아이노트 블루투스 스피커 BT-S15

아이노트 블루투스 스피커 BT-S15 는 모노 스피커이다…
RDA5851S 칩을 사용하고있으며 데이터 싵으는 여기
나는 열심히 프로브로 찍어서 RL찾아냄;

남아굴러다니는 스피커에 블루투스 심어줄려고 했으나 실패
(뭔가 전원으로 스피커에서 나온 12v 넣어줬는데 보드 사망… 아 12v였구나 …;)

http://www.rdaic.com/sites/default/files/public/RDA5851_Chip_Datasheet.pdf

b

사용후기 : 화이트 노이즈가 좀 있지만 가격이 다 용서해줌.. 저항좀 물리면 잠잠해질려나?

iPhone non official SDK aka ToolChain finally setup

iPhone non official SDK aka ToolChain finally setup

Woo.. after doing the process almost ten times, downloading the fullxodetools.dmg(~924mb) i finally have the iPhone toolchain working.. ihave setup the non official iPhone SDK ,, untill the official by Applecomes out in Feb’08 .
Start developing native iPhone apps today, no more web 2.0…
There are many guides out there, i am just telling my expierience, hope it works for you..
It uses the GC++, GCC compiler in linux..
I used Fedore 7 on VMware(virtual machine, you can grab both of them for free) to build the toolchain. I recomd.linux for good performance..
Content from –http://code.google.com/p/iphone-dev/wiki/Building,with my tips inBOLD.

HOWTO build the toolchain
Run terminal…

  • Ensure that you have a copy ofbisonandflexinstalled on your system. All major systems should have these tools installed or available in package management systems.Most linux flavours have the packages, you can skip this..
  • $ bison--version
    GNU
    Bisonversion1.28
    $ flex
    --version
    flex version
    2.5.4
  • Check out a copy of LLVMSVN, and build areleasebuild (as opposed to a debug one). Currently, due toIssue 70, we are limited to revision 42498.it will take some time while files are being downloaded to your PC from internet, probably no errors here
  • $ svn co http://llvm.org/svn/llvm-project/llvm/trunkllvm-svn -r 42498
    $ pushd llvm
    -svn
    $ .
    /configure --enable-optimized
    $ make ENABLE_OPTIMIZED=1
    $ sudo make install
    $ LLVMOBJDIR=`pwd`
    $ popd
  • Check out a copy of the iphone-dev SVN repository.(it will take large amount of time, the longest step of all)
  • $ svn checkout http://iphone-dev.googlecode.com/svn/trunk/iphone-dev
    $ pushd iphone
    -dev
  • Make a directory to hold the toolchain.
  • $ sudo mkdir/usr/local/arm-apple-darwin
  • Build odcctools. (you will get some error if you are using CYGWIN on windows here, refer to there site for details)
  • $ mkdir-p build/odcctools
    $ pushd build
    /odcctools
    $
    ../../odcctools/configure--target=arm-apple-darwin--disable-ld64
    $ make
    $ sudo make install
    $ popd
  • Geta copy of the iPhone root filesystem. This is usually obtained bydecrypting and extracting the iPhone restore software usingthese tools, but there are many other methods to obtain this, including simply usingscpto download all the files from the iPhone over Wi-Fi. (Scroll below for a download link of ready to use iPhone 1.0.2 image) Unpack the root filesystem somewhere, and set the environment variable$HEAVENLYto its path. (set this again if you restart system or terminal)
  • $ HEAVENLY=/usr/local/share/iphone-filesystem
  • Install the iPhone headers to the appropriate place. If you aren’t on Mac OS X, replace the/Developer/SDKs/MacOSX10.4u.sdkpath with the full path to the unpacked Mac OS X 10.4 Universal SDK(ie.MacOSX10.4u.sdk). If you don’t have a copy of this,scroll below..
  • $ pushd include
    $
    ./configure --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk
    $ sudo bash install
    -headers.sh
    $ popd
  • Install csu, which includescrt1.o,dylib1.o, andbundle1.o.Don’t rebuild them from source, as this requires a working cross-GCC,which you don’t have yet (and the build-from-source process for csu isbroken right now anyway). Binaries are provided for this reason.
  • $ mkdir-p build/csu
    $ pushd build
    /csu
    $
    ../../csu/configure--host=arm-apple-darwin
    $ sudo make install
    $ popd
  • Onlyif you are compiling onleopard10.5. This is an ugly workaround and compiling with the resulting toolchain will give you a warning.
  • $ mv llvm-gcc-4.0-iphone/configure llvm-gcc-4.0-iphone/configure.old
    $ sed
    's/^FLAGS_FOR_TARGET=$/FLAGS_FOR_TARGET=${FLAGS_FOR_TARGET-}/g'\
    llvm
    -gcc-4.0-iphone/configure.old>llvm-gcc-4.0-iphone/configure
    $
    exportFLAGS_FOR_TARGET="-mmacosx-version-min=10.1"
    $ sudo ln
    -s/usr/local/arm-apple-darwin/lib/crt1.o\
    /usr/local/arm-apple-darwin/lib/crt1.10.5.o
  • Configure and make LLVM-GCC. Make sure that$LLVMOBJDIRand$HEAVENLYare set per the instructions above.(igot the errors like error 1, error 2 more than 5 times, i solved thisproblem by changing lots of files,symlinks in /usr/lib folder of iphoneimage hence i have uploaded my modified working iphone image. see belowfor errors).
  • $ mkdir-p build/llvm-gcc-4.0-iphone
    $ pushd build
    /llvm-gcc-4.0-iphone
    $
    ../../llvm-gcc-4.0-iphone/configure--enable-llvm=`llvm-config --obj-root`\
    --enable-languages=c,c++,objc,obj-c++--target=arm-apple-darwin--enable-sjlj-exceptions\
    --with-heavenly=$HEAVENLY--with-as=/usr/local/bin/arm-apple-darwin-as\
    --with-ld=/usr/local/bin/arm-apple-darwin-ld
    $ make LLVM_VERSION_INFO
    =2.0-svn-iphone-dev-0.3-svn
    $ sudo make install
    $ popd
    $ popd

You’re done. Have fun!

Gotchas

  • Makesure that there are no spaces in any of the directory names that youuse. GCC does not build if there are spaces in the directory names, andthe shell scripts will not work. This is most often a problem onWindows.
  • Make sure that/usr/local/binis in yourPATH.This is not the case out of the box on Mac OS X, although chances areif you’ve installed things from source before you’ve added it already.
  • If LLVM failed to compile because of missingbisonand/orflex(evidence that this was the case is a failed compile onutils/TableGen/FileLexer.l), you mustmake cleananddeleteutils/TableGen/FileParser.hbefore trying again withbisonandflexinstalled. LLVM’smake cleanscript does not always properly clean up after a failed build.
  • Make sure that$HEAVENLYpoints to a copy of the full iPhone root filesystem, not just theunpacked update DMG. If you get errors about being unable to find-lc, then your$HEAVENLYis set incorrectly, you mistyped the--with-heavenlyoption toconfigure, or your copy of the root partition is incomplete. Your copy of the iPhone root filesystemmustinclude ausr/lib/libc.dylibfile.

HOWTO obtain the Mac OS X headers on Linux or Windows

=Install thecpioutility using your distribution’s standard package management system.All the major Linux distributions, as well as Cygwin, should have thisutility.
=No needtodownload the whole xcode tools dmg (~924mb). I extracted thepackage,uploaded it for you :), download the needed file from here-http://rapidshare.com/files/66764258/MacOSX10.4u.sdk.rar
=Extract RAR, then thepaxarchive by creating a new dir and using the following command in terminal

gunzip-c MacOSX10.4u.sdk.pax.gz|cpio-i

=FindMacOSX10.4u.sdkfolder in extracted contents and link it toolchain install procedure.

LOGIN as root to avoid weird errors, password prompts again and again..

–The envirnoment variables should be set properly to check there use this command in terminal- echo $VARIABLENAME, eg. –echo $HEAVENLYif it returns blank line set it again. the envirno. variable has aliftime till the terminal runs, if you close it, you have to set itagain

— errors i got ,when i do"make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn" its runs for a long time and then results in this error */usr/local/bin/arm-apple-darwin-ld:/home/Aakash/iphone/iphone-image/usr/lib/libc.dylib truncated ormalformed object (mach header extends past the end of the file)collect2: ld returned 1 exit status make2 [libgcc_s.dylib] Error 1make2 Leaving directory`/root/iphone-dev/build/llvm-gcc-4.0-iphone/gcc' make1 [stmp-multilib]Error 2 make1: Leaving directory`/root/iphone-dev/build/llvm-gcc-4.0-iphone/gcc' make: [all-gcc] Error 2*
i did this to get off the error"openall .dylib files (<=1 k) one by one in folder/iphone-image/usr/lib/, rename it – and for example libc.dylib showspath to libSystem and libSystem – path to libSystem.B.dylib. Just copylibSystem.B.dylib twice and rename 2 new files to libc.dylib andlibSystem.dylib. do this for all <=1kb .dylib files".
The iPhone image i uploaded here contains these changes, no need to do again.


Passwordfor all my rapidshare uploadsif neededin this post isaksblog.co.nr

Usefull links-

Post toolchain install–

Need any help, post as comment…