Advantech RSB-4220 handleiding

72 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 56 van 72
RSB-4220 User Manual 50
3.7.10 OTG Mode Selection
USB connector of RSB4220 supports two modes: Host and Slave, which require
software and hardware support.The system is set to Host mode by default. If you do
not need to switch between the two modes, no operation is required; if you need to
switch, please refer to the following steps:
1. Please refer to section 2.1.3 “Jumper Setting” for the jumper selection of J4: 1-2
means “USB host” and 2-3 means “USB OTG device”.
2. Execute one of the following commands to switch to the corresponding mode
after the terminal is powered on.|
or
Notice: The first command sets USB connector to Host mode, while the second
one sets it to Slave mode. It should be consistent with the jumper setting in Step
1.
3. Reboot the system.
3.8 Development Guide and Reference
3.8.1 Development of C/C++ Programs
This section provides instructions on how to write a sample “Hello World” application.
Please refer to the following steps:
1. Open “terminal” on Ubuntu 14.04 LTS, and change to “root”.
Input the user password.
2. Create a development environment using the following command:
3. Edit helloworld.c using the following source code:
Save the file and exit.
4. Compile helloworld.c using the following command:
Hello world should be visible in the current directory.\
5. Run the helloworld executable file on RSB-4220.
Insert the Linux system SD card into the development computer.
root@am335x-adv:/ # echo “host” > /etc/otg-mode
root@am335x-adv:/ # echo “peripheral” > /etc/otg-mode
$ sudo su
#source /usr/local/cross_compiler/linux-devkit/environment-setup
# cd /root//RSB-4220LBVxxxx_yyyy_mm_dd/source
# mkdir helloworld
# cd helloworld
# gedit hellowrold.c
#include <stdio.h>
void main()
{
printf("Hello World!\n");
}
# $CC -o helloworld helloworld.c
# cp helloworld /media/rootfs/tool

Bekijk gratis de handleiding van Advantech RSB-4220, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.

Productinformatie

MerkAdvantech
ModelRSB-4220
CategorieNiet gecategoriseerd
TaalNederlands
Grootte6307 MB