Difference between revisions of "MINGW Development Package(MAC OS)"
From Embedded Systems Learning Academy
(→Program the Hex file into SJOne board) |
(→Program the Hex file into SJOne board) |
||
Line 68: | Line 68: | ||
* Open Terminal from your Mac | * Open Terminal from your Mac | ||
* Type "ls /dev/ | grep usbserial*" | * Type "ls /dev/ | grep usbserial*" | ||
− | | [[ | + | | [[usb_path.png|left|frame|100px|Find USB path]] |
|- | |- | ||
Line 77: | Line 77: | ||
* Find '''sDeviceFile''' and '''sHexFilePath''' | * Find '''sDeviceFile''' and '''sHexFilePath''' | ||
* Replace these two path with your local device path and hex file path | * Replace these two path with your local device path and hex file path | ||
− | | [[File:python_script1.png|left|frame|100px| | + | | [[File:python_script1.png|left|frame|100px|Modify python script]] |
<br/> | <br/> | ||
Line 87: | Line 87: | ||
* Go to '''Run''' from the menu bar | * Go to '''Run''' from the menu bar | ||
* Click '''External Tool''' -> '''python''' | * Click '''External Tool''' -> '''python''' | ||
− | | [[File: | + | | [[File:run_python_tool.png|left|frame|100px|Start python tool from Eclipse]] |
|- | |- | ||
Line 95: | Line 95: | ||
* Run the following command on the python external tool | * Run the following command on the python external tool | ||
* execfile("pyFlash-Hyperload.py") | * execfile("pyFlash-Hyperload.py") | ||
− | | [[File: | + | | [[File:python_command.png|left|frame|100px|Program SJOne board]] |
|} | |} |
Revision as of 19:59, 27 December 2016
This tutorial shows you how to compile a C/C++ program in Mac OS using Eclipse. Remember that GNU is the linux-based compiler and hence if we want to use it for Mac OS, we have to have certain executable(s) to be running in Mac OS.
Contents
Development Package
You can get the same development package as the one we promote for ARM processors.
- Get the Development Package and unzip to an absolute directory such as Desktop
- SourceForge SJSU Development Package
- The unzipped path should not have spaces
Required Package
You might need to get and install the following package:
- Command Line Tools
Open Eclipse and Create New Project
1. Open Eclipse.
|
|
2. Open lpc1758_freertos Project
|
|
3. Write your source code
|
#include <stdio.h>
int main(void)
{
/* Without this, printf() will not work */
setvbuf(stdout, 0, _IONBF, 0);
setvbuf(stdin, 0, _IONBF, 0);
/* Write rest of your code here */
printf("Hello World\n");
return 0;
} |
4. Run your program
|
Program the Hex file into SJOne board
1. Find USB path
|
left|frame|100px|Find USB path |
2. Modify python script
|
|
3. Run External python tool from eclipse
|
|
4. Program SJOne board
|