close

雖然過去也曾使用過8051MCU或其他如x86,MIPS,ARM...等CPU,但自從一年前第一次接觸這顆TI 的16-bit MCU後,就漸漸地習慣它,喜歡它. MSP430 也是一顆蠻省電的MCU. 基本上整個MCU IC的Core與Code都是免費的(這對Soho IC設計公司絕對是一個福音!); 一切相關軟體與軔體的開發環境也很容易輕易獲得,而且都是Free的.

以下謹介紹以MSP430 MCU為例,如何來架設Eclipse的韌體整合性開發環境(IDE). 

簡易的英文步驟和指令:

Download and install the necessary packages:

1. MSPGCC4 (based on GCC 4.x, Insight also included):
gcc-4.4.3-gdb-7.0.1-20100218
http://sourceforge.net/projects/mspgcc4/files/

Eclipse: eclipse-cpp-helios-win32.zip
http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliosr

Eclipse CDT 4.x or Newer:
cdt-master-7.0.0-I201006141710.zip

Zylin-embedded CDT:
And put under your eclipse directory,e.g.,D:\eclipse-cpp-helios-win32\eclipse

Install JRE(Java Runtime Environment,模擬器SimSDK需要在Java環境才能運行)

My Eclipse is at D:\SW\eclipse-cpp-helios-win32\eclipse

1. Run eclipse.
Create Eclipse workspace is at e.g.,C:\Documents and Settings\Paul\workspace

Now mspgcc is at C:\mspgcc, for instance.

Then we should install Zylin CDT to allow the connection of GDB using the remote feature of GDB in eclipse,
please follow the sequence to install Zylin CDT plugin via network:

In the Eclipse IDE select Help->Install New Software->
1.Work with --All Available Sites--
2.Uncheck "Show only the latest version of available software" and "Group items by category"
at the bottom wondow. Then select the necessary software(Work with Add zylin - http://www.zylin.com/zylincdt) to install. Or you can do by the following steps,

Install New Software:


Work with --All Available Sites—

Key-in "http://www.zylin.com/zylincdt" or check the Zylin box.


Select "Zylin Embedded CDT" packagethen press "Install..." to install the package.


After installation completed, restart Eclipse

Run->Debug Configurations->Command, e.g.,

target remote localhost:2000
monitor reset
load my_test.elf (my *.elf file's
相對路徑:./Debug/my_test.elf. The elf file includes the Debug information that
   can be used for symbolic debugging.)
break main

continue

 

Compiler Options

  1. GCC C Compiler options:

Add the compiler flag in the Miscellaneous field:

-mmcu=msp430x235

 

 


Linker Options

  1. File Properties->Settings->Tool Settings->MinGW C Linker All options:

Add the Linker Flags in the Miscellaneous field:

-T ../gemini_fpga.x -nostartfiles

p.s., -nostartfiles means Startup will directly jump to main

if there is no Startup code.(i.e.,Reset Vector=31. Available vector=0~31)


 

COM Port Debug connection

  1. download openmsp430_latest1.tar.gz, unzip and install:
    http://opencores.org/project,openmsp430
  2. Firstly, run \tools\freewrap642\generate_exec.bat only once in this openmsp430 directory.
  3. Then run \tools\bin\openmsp430-gdbproxy.exe in this openmsp430 directory.
    Run openmsp430-gdbproxy.exe and don't close it!!
    Enable "Verbose"->openmsp430-gdbproxy will display all messages in its own box.

 



 

 

Lapuda / Xuite日誌 / 回應(0) / 引用(0)
相對論要點 NASA總算證實....|日誌首頁|6/28 中國觀光客自由行‧初...上一篇相對論要點 NASA總算證實...下一篇6/28 中國觀光客自由行‧初體驗 - 自由行第一天 「台灣,真沒話說」...
回應