ThaiEasyElecTPE
กลับไปหน้ารายชื่อกระทู้ ตอบกลับ เริ่มโพส

NXP Cortex-M3 จาก Mbed มาสู่ LPCXpresso !!!

หลังจาก NXP เริ่มปล่อย ARM Cortex ออกมาสู่ตลาดคือ Cortex-M3 LPC1700 ตามมาติดๆด้วย LPC1300 และที่กำลังจะออกคือ Cortex-M0 LPC1100




และก็ปล่อย platform แห่งอนาคต Mbed มาปฎิวัติรูปแบบการพัฒนา embedded ด้วยการย้าย compiler ไปไว้บนเว็บ และหลังจากได้ firmware แล้วก็โหลดลงบอร์ด Mbed แบบมองเป็น Thumb Drive กันเลย...




ล่าสุดในงาน  ARM TechCon3 จัดวันนี้จนถึงวันที่ 23 ก็จะมีการเปิดตัว IDE สำหรับ Cortex-M3 และ Cortex-M0 ที่มีชื่อว่า LPCXpresso ที่พัฒนาต่อยอดจาก IDE ระดับ Enterprise และเป็น opensource คือ Eclipse นั่นเอง ต้องคอยติดตามการเคลื่อนไหวอีกครั้งของ NXP ที่รุกตลาด Cortex อย่างเต็มตัวในขณะนี้ครับ

http://www.standardics.nxp.com/s ... llers/arm.techcon3/


อ่านแล้วไม่ค่อยมีข้อมูลเลยว่าตกลง LPCXpresso คือไรกันแน่
IDE อย่างเดียว หรือรวม Compiler Debugger ไว้ด้วย

ใครมีข้อมูลบ้างครับเนี่ย เผื่อจะไ้ด้ย้ายจาก AVR ไปเล่น ARM บ้าง
ไม่มีปัญญา ซื้อ Software License

เชษฐ์ เชษฐชัยยันต์
LPCXpresso น่าจะ compile และ debug ได้น่ะครับ แต่อาจจะขายตัว jtag เหมือนทางค่าย st รึเปล่า ที่ตัวแบบ limit ราคาถูก ถ้าแบบไม่จำกันก็แพงขึ่นไปอีก

แต่ถ้าฟรีหมด หรือ ขาย jtag ถูกๆ จะของแท้ของก็อบ งานนี้มีเฮ แน่ๆ ครับ
LPCXpresso น่าจะ compile และ debug ได้น่ะครับ แต่อาจจะขายตัว jtag เหมือนทางค่าย st รึเปล่า ที่ตัวแบบ limit ราคาถูก ถ้าแบบไม ...
ต้นฉบับโพสโดย VooDooHeRo เมื่อ 2009-10-21 16:33
คิดพอๆกัน เหมือนผมน่ะ ARM ดูเหมือนจะพยายามทำฟรีแต่ เอาเข้า จริงๆ cost แฝงเพียบ ครับ.. เอาไปเอามา ออกแนวเสียน้อยเสียยาก เสียมากเสียง่าย ต้องคำนวน วางแผนกันให้ดี
ปั่นยอด 100 FP , มา Like ให้ซ่ะดีๆ คนล่ะจึก.. สองจึก  


LPCXpresso น่าจะ compile และ debug ได้น่ะครับ แต่อาจจะขายตัว jtag เหมือนทางค่าย st รึเปล่า ที่ตัวแบบ limit ราคาถูก ถ้าแบบไม่จำกันก็แพงขึ่นไปอีก
ต้นฉบับโพสโดย VooDooHeRo เมื่อ 2009-10-21 16:33
สำหรับการเริ่มต้นที่ยังไม่ต้องการ debug เจ้า ARM ของ NXP มีทางโปรแกรมชิพได้หลากหลายครับ

1) Serial Bootloader ที่มาพร้อมกับชิพทุกตัวจากโรงงาน (ใช้คู่กับ FlashMagic)
2) Ethernet Bootloader อันนี้มาสไตล์ TFTP เหมือน ARM รุ่นใหญ่ครับ (ใช้คู่กับ FlashMagic)
3) USB Bootloader อันนี้ล่าสุดที่ถูกประยุกต์ใช้กับบอร์ด Mbed ทำให้มองเห็นบอร์ดเราเป็น Thumb Drive แค่ลากไฟล์ firmware ที่คอมไพล์เสร็จแล้วไปทิ้งในบอร์ดแล้วกด reset ก็รันกันเลย

AN10866 LPC1700 secondary USB bootloader
http://www.nxp.com/acrobat_downl ... notes/AN10866_1.pdf



*** ที่น่าสนใจคือการทำชุดพัฒนา IDE (LPCXpresso) ที่สำเร็จพร้อมใช้ต่อยอดมาจาก Eclipse ซึ่งคิดว่าคงแจกฟรีตามสไตล์ opensource และเตรียมพวก ไฟล์ header, startup scripts, ไฟล์ CMSIS สำหรับ NXP Cortex กับ setup พวก toolchain gcc-arm ให้เสร็จสรรพ แค่นี้ก็เริ่มต้นแบบรวดเร็วและประหยัดสบายๆครับ
ท้อกับ Package ตัวถังของชิพอย่างเดียว รู้สึกจะมาแบบโหดๆทั้งนั้น
ท้อกับ Package ตัวถังของชิพอย่างเดียว รู้สึกจะมาแบบโหดๆทั้งนั้น
ต้นฉบับโพสโดย MicroMan เมื่อ 2009-10-21 20:18
NXP Cortex-M3 pitch แค่ 0.5mm ไปเจอ Microchip มีต่ำลงไปถึง 0.4mm น่าจะหนาวกว่านี้อีกครับท่าน MicroMan

แต่หลังๆผมเริ่มชอบ TQFP ซะแล้วสิครับ เพราะว่าปาดหัวแร้ง 4 ที เรียบร้อย บัดกรีขาเสร็จไปเป็น 100 ขา !!! (แต่ picth ต้องไม่เล็กมากนะครับ ไม่งั้นมีซับฯ)
โดยปกติแล้ว ผมชอบขับ โตโยต้า หรือ หากหา อีแต๋นได้ ก็จะใช้ไปทำงาน ไมเคยคิดซื้อของแพงๆ หรือ วิวิสมาหรา ใช้ เช่น Benz or BMW
แต่คราวนี้ ต้องขอลอง ของแปลก ของแพงหน่อย ได้ผลอย่างไร จะมารายงานทีหล้ง

http://dkc1.digikey.com/us/en/ph/NXP/mbed.html

ที่สั่งซื่อตัวนี้ เพราะ เห็นอย่างที่ ท่าน uC2005 ว่ามานั่นแหละ ที่ว่า

ง่ายสุดๆ
====
Elegant Simplicity
The mbed tool has been designed for the best trade-off between versatility and immediate connectivity. The LPC1768, housed in an LQFP package, is mounted on the mbed board, which uses a 40-pin DIP with a 0.1in pitch. The convenient form factor works seamlessly with broad-boards, strip-boards, and PCBs.

Burn hex ก็ง่าย
=========
There is no software to install – everything, even the compiler, is online. The compiler and libraries are completely modular, so they’re easy to use, yet they’re powerful enough to take on complex, real-world applications.

Hassle-Free Startup
Getting started is as simple as using a USB Flash drive. The mbed NXP LPC1768 board can easily be connected to a Windows, Mac or Linux computer and it will appear as a USB drive. The link on the board can be used to connect to the mbed website, where individuals can sign up and begin designing. There are no drivers to install or setup programs to run.

Online Compiler
ฮืม..... อันนี้ ไม่แน่ใจว่าจะดีแค่ใหน ไม่มีอยู่บนตัวเครื่องเรา ก็น่าห่วงเหมือนกัน หากไปอยู่ในเรือ ติดต่อ internet ไม่ได้ก็ซวยไป
The mbed compiler lets a designer write programs in C++ and then compile and download them to run on the mbed NXP LPC1768 Microcontroller. There’s no need to run an install or setup program, since the compiler runs online. Supported browsers include Internet Explorer, Safari, or Chrome running on a Windows, Mac, or Linux PC. Engineers can log in from anywhere and simply pick up where they left off.

จะมารายงานความก้าวหน้า หรือไม่ก็เอาขึ้นหิ้ง ดองเค็ม หากไปไม่ถึงใหน
Be not afraid of growing slowly, be afraid of standing still.
Chinese proverb.
โดยปกติแล้ว ผมชอบขับ โตโยต้า หรือ หากหา อีแต๋นได้ ก็จะใช้ไปทำงาน ไมเคยคิดซื้อของแพงๆ หรือ วิวิสมาหรา ใช้ เช่น Benz or BMW
แต่คราวนี้ ต้องขอลอง ของแปลก ของแพงหน่อย ได้ผลอย่างไร จะมารายงานทีหล้ง
.
.
.
ต้นฉบับโพสโดย samira เมื่อ 2009-10-21 21:50
ลองดูตัวอย่าง SPI ของ Mbed รู้สึกว่าง่ายดีกครับ
  1. #include "mbed.h"

  2. SPI spi(p5, p6, p7); // mosi, miso, sclk
  3. DigitalOut cs(p8);

  4. Serial pc(USBTX, USBRX); // tx, rx

  5. int main() {
  6.     // Setup the spi for 8 bit data, high steady state clock,
  7.     // second edge capture, with a 1MHz clock rate
  8.     spi.format(8,1,1);
  9.     spi.frequency(1000000);

  10.     // Select the device by seting chip select low
  11.     cs = 0;

  12.     // Send 0x8f, the command to read the WHOAMI register
  13.     spi.write(0x8F);

  14.     // Send a dummy byte to receive the contents of the WHOAMI register
  15.     int whoami = spi.write(0x00);
  16.     pc.printf("WHOAMI register = 0x%X\n", whoami);

  17.     // Deselect the device
  18.     cs = 1;
  19. }
คัดลอกไปที่คลิปบอร์ด


ชอบตรงการกำหนดขา I/O ง่ายมากๆ => DigitalOut cs(p8)
แล้วเวลาใช้งานก็ใช้เป็น cs = 0; หรือ cs = 1; ได้เลย

การใช้งาน class library ต่างๆ ก็สะดวกดีเหมือนมี constructor กำหนดให้ตอนนำไปใช้เลย =>
SPI spi(p5, p6, p7); // mosi, miso, sclk
กลับไปหน้ารายชื่อกระทู้