How to use the development environment
If you are writing a program in C/C++, run Yocto’s environment variable setup script.
$ . /opt/poky/2.1.1/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
The minimum command options are set in the environment variable CC to compile C or in the environment variable CXX to compile C++, so you can compile as follows
C example: a
Cの例： $ $CC APS.c –o APS C++ example: $ $CXX APS.cc –o APS
Read here to learn more!
The case of the script
Linux supports many scripts such as Python, Perl, Shell Script, etc.
If you use these scripts, install each package in SMART.
What is Systemd
Systemd to manage the system
Systemd is a framework for managing Linux systems. It provides not only the system startup, which replaces the traditional init daemon, but also many basic OS features such as inter-process communication, device manager, logging, containers and bootloaders. Many Linux distributions, such as pre-installed Angstrom, use Systemd.
Build with Systemd enabled.
In the poky directory, the $ . oe-init-build-env build.armv7 At the end of conf/local.conf DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" VIRTUAL-RUNTIME_initscripts = "“ Add. Build! $ bitbake core-image-sato
Read here to learn more!
After building it, install it in SMART.
How to auto-launch the app
Systemd manages tasks in units of units. To auto-launch the app, register it as follows
aps-linux.service [Unit] Description=APS Linux sample script # Transition to a state of waiting to wake up [Service] Type=oneshot # Specify how to manage it; oneshot will consider the app finished when it has finished running ExecStart=/home/root/aps-linux.sh # Specify the app to run [Install] WantedBy=multi-user.target # Specify when to run the app
Save the unit file in /lib/systemd/system. Then run the following command to complete the autostart configuration.
$ systemctl daemon-reload $ systemctl enable aps-linux
Read here to learn more about how to write unit files!
If you want to know more about the whole Systemd, read here!
Check to see if it’s auto-starting!
$ systemctl status aps-linux ● aps-linux.service - APS Linux sample script Loaded: loaded (/lib/systemd/system/aps-linux.service; enabled; vendor preset: enabled) Active: activating (start) since Fri 2015-10-09 11:49:00 UTC; 21s ago Main PID: 1221 (aps-linux.sh) CGroup: /system.slice/aps-linux.service ├─1221 /bin/sh /home/root/aps-linux.sh └─1280 sleep 60 Oct 09 11:49:00 atlas systemd: Starting APS Linux sample script... After 60 seconds $ systemctl status aps-linux ● aps-linux.service - APS Linux sample script Loaded: loaded (/lib/systemd/system/aps-linux.service; enabled; vendor preset: enabled) Active: inactive (dead) since Fri 2015-10-09 11:50:01 UTC; 28s ago Process: 1221 ExecStart=/home/root/aps-linux.sh (code=exited, status=0/SUCCESS) Main PID: 1221 (code=exited, status=0/SUCCESS) Oct 09 11:49:00 atlas systemd: Starting APS Linux sample script... Oct 09 11:50:01 atlas systemd: Started APS Linux sample script.
aps-linux.sh #!/bin/sh cd /sys/class/leds/fpga_led0 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led1 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led2 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led3 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led4 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led5 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led6 echo timer > trigger sleep 0.1 cd /sys/class/leds/fpga_led7 echo timer > trigger sleep 60
Cyclone V SoC-equipped board by Altera
The Altera SoC integrates an Arm-based hard processor system (HPS) consisting of processor, peripherals and memory interfaces with a customizable FPGA fabric on a high-bandwidth interconnector backbone. The hard IP includes PCI Express Gen2, multi-memory ports, ECC, memory protection and high-speed serial transceivers, combining features of low performance and power consumption with programmable logic flexibility. It significantly reduces the system board size, which previously consisted of a CPU and FPGA. In this course, the DE0-Nano-SoC Kit/Atlas-SoC Kit from Terasic will be used.
Japan Altera Corporation
TRACE32 made by Lauterbach
The world’s most used hardware-assisted debugger, TRACE32, which supports more than 70 processor architectures, not to mention Arm as well as Nios II. The multicore support of SMP systems allows you to control multiple cores simultaneously and to use the reference core as a Debugging can proceed seamlessly while switching between them. Another feature is the OS recognition function, which supports debugging of SMP-compatible operating systems such as Linux, as standard equipment. This allows you to smoothly debug a program running in user space without worrying about which core the task to be debugged is assigned to.
Japan Roterbach Corporation
Embedded Linux Deployment / Development Support Services
Embedded Linux brings new value to your equipment development.
Fujitsu Computer Technologies