Andes Workshop

It is currently Sun Nov 17, 2019 3:07 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 燒錄程式IntelJ3的編譯方式(BSP v310)
PostPosted: Wed Apr 06, 2011 5:43 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
(本文於2011.08.29更新)

在BSP v310裡提供IntelJ3 flash的燒錄程式及原始碼。
如果使用不同的flash,可以參考這個原始碼來改code。
以下分享compile IntelJ3這個程式的方法。

首先要安裝MinGW。
下載頁面 http://sourceforge.net/projects/mingw/files/
我裝的是這一版,mingw-get-inst-20110316.exe。
以後更新版也是ok的。
我裝好的Mingw在C:\MinGW。

Note:
安裝MinGW時,記得勾選C++ compiler,這樣子才會有g++.exe。如下圖:
Attachment:
cpp.gif
cpp.gif [ 11.42 KiB | Viewed 6677 times ]


IntelJ3的原始碼在這裡:(我改過3行)
Attachment:
src-IntelJ3.7z [6.77 KiB]
Downloaded 414 times

IntelJ3.h我改過一行,將第58行變成註解,因為引用的library原本就已定義INT8了。
Code:
//typedef char                            INT8;


IntelJ3.h裡的第782、783行去掉。
Code:
        //fprintf (log, "Branch%s\n", BRANCH_NAME);
        //fprintf (log, "%s\n", COMMIT_ID);


build IntelJ3.exe,
請先將Windows的環境變數裡,把C:\MinGW\bin也加到path中。
Attachment:
path.gif
path.gif [ 21.04 KiB | Viewed 6721 times ]

就可以在C:\MinGW\bin之外的地方,使用MinGW的g++。

開cmd.exe視窗,以下列指令編譯:
Code:
g++ -g3 -O0 -Wall -DBUILD_ID=20110820 IntelJ3.cpp -lwsock32 -lm -lgdi32 -luser32 -lcfgmgr32 -lsetupapi -lcomctl32 -o IntelJ3.exe

完成!
Attachment:
dos.gif
dos.gif [ 7.97 KiB | Viewed 6509 times ]


Last edited by cindy on Wed Feb 15, 2012 4:06 pm, edited 2 times in total.

Top
 Profile Send private message E-mail  
 
 Post subject: Re: 燒錄程式IntelJ3的編譯方式(AndeSight v200 mcu beta)
PostPosted: Thu Sep 15, 2011 7:06 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
BSP 310裡的IntelJ3有一些修改,
我把code打包在這裡。

Code:
g++ -g3 -O0 -Wall -DBUILD_ID=20110820 IntelJ3.cpp -lwsock32 -lm -lgdi32 -luser32 -lcfgmgr32 -lsetupapi -lcomctl32 -o IntelJ3.exe


Attachments:
src-IntelJ3-bsp310.7z [405.58 KiB]
Downloaded 454 times
Top
 Profile Send private message E-mail  
 
 Post subject: Re: 燒錄程式IntelJ3的編譯方式(AndeSight v200 mcu beta)
PostPosted: Thu Sep 15, 2011 7:17 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
這個版本是燒完code之後,
自動reset並且跑新的bootcode。
只改一個地方:
void terminate(void)
{
send_cmd (RESET_TARGET);
char send_data[2];
send_data[0] = 4;
SEND(sock, send_data, 1);
}

Attachment:
src-IntelJ3-bsp310-reset.7z [407.24 KiB]
Downloaded 429 times


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group