Eclipse CDT & nxtOSEK (Updated: January 2009)
One of the biggest benefits of using a standard programming language for LEGO Mindstorm NXT is that you can use great existing development resources in the web. If you already succeeded to install nxtOSEK and upload a program to the NXT, you can write, build and upload nxtOSEK applications in Eclipse CDT environment.
Step 1: Install Eclipse CDT
- Download Eclipse and Eclipse CDT (we use Eclipse 3.2 and CDT 3.1.1, but other versions may be OK)
- Many installation instructions are available in the web, let's google it!
Step 2: Set the Windows Path to the installed Cygwin\bin directory
Step 3: Create a C/C++ project
- Open Eclipse
- Click File -> New -> Standard Make C Project (for C) / Standard Make C++ Project (for C++)…
- Choose HelloWorld sample in the nxtOSEK distribution package
- Click Project -> Build All
- If you wanted to add new C source files into the project, modify the Makefile in the project
Step 4: Upload a program
- Click Run->External Tools->External Tools...
- Select Program and click 'New' button
- To create External tools menu for uploading a nxtOSEK application using the Enhanced NXT firmware:
- Set rxeflash as Name:
- Set ...cygwin\bin\bash.exe as Location: via Browse File System... button
- Set ${project_loc} as Working Directory: via Variables... button
- Set ./rxeflash.sh as Arguments:
Afer that, click Run button. You can upload a nxtOSEK application using the Enhanced NXT firmware from Eclipse environment. External Tools configuration is required only for the first time.
- To create External tools menu for uploading NXT BIOS to the NXT:
- Set ...cygwin\bin\bash.exe as Location: via Browse File System... button
- Set ${project_loc} as Working Directory: via Variables... button
- Set ./biosflash.sh as Arguments:
Afer that, click Run button. You can upload NXT BIOS to the NXT from Eclipse environment.
External Tools configuration is required only for the first time.
- To create External tools menu for uploading a nxtOSEK application using NXT BIOS:
- Set appflash as Name:
-
Set ...cygwin\bin\bash.exe as Location: via Browse File System.. button.
- Set ${project_loc} as Working Directory: via Variables... button
-
Set ./appflash.sh as Arguments:
Afer that, click Run button. You can upload a nxtOSEK application to Flash from Eclipse environment. External Tools configuration is required only for the first time.
- To create External tools menu for uploading a nxtOSEK application without firmware:
- Set ramboot as Name:
-
Set ...cygwin\bin\bash.exe as Location: via Browse File System... button
- Set ${project_loc} as Working Directory: via Variables... button
- Set ./ramboot.sh as Arguments:
Afer that, click Run button. You can upload a nxtOSEK application without firmware from Eclipse environment. External Tools configuration is required only for the first time.
- By setting Organize Favorites... From next time, just click Run->External Tools->biosflash/appflash/ramboot to upload a program.
Home |