Difference between revisions of "2012 SJ One Hello World Sample Project"
From Embedded Systems Learning Academy
Line 18: | Line 18: | ||
# Compile & Load the program onto the Board | # Compile & Load the program onto the Board | ||
# Open COM Port in Hercules and press RESET on the board to view your <code>printf</code> message. | # Open COM Port in Hercules and press RESET on the board to view your <code>printf</code> message. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 23:03, 4 September 2013
Introduction
This article will teach you:
- Write a simple program for the SJ One Board
- Output data from the Board Sensors
Please note that you need to read the Development Package article before following along this article.
The MAIN Function
The main() function is the entry point of a program. A lot of things may happen before main(), but it would be usually abstracted away from the user.
Hello World
Your "Hello World" project consists of printf message, compiling, loading the program onto the board, and confirming that your message comes out as you intended it. Follow these steps:
- Open up Eclipse
- Open Hello World Sample Project
- Open up main.cpp (You could search for it using shortcut key Ctrl+Shift+R)
- Write your own printf outputting your favorite message:
printf("My own hello world!");
- Compile & Load the program onto the Board
- Open COM Port in Hercules and press RESET on the board to view your
printf
message.