This file contains the kernel, hardware abstraction layer and libraries for development on the Sentio platform.
This code is intended to be included as a submodule in a Sentio application. The code can be neither compiled nor executed on its own. Nevertheless, to inspect the code or make changes, it can be cloned.
git clone git://github.com/mpfusion/sentio-framework.git
These tools can be obtained as binary version and source code from Mentor Graphics. The binaries that were used during development are also available from the following site. The version is not kept up-to-date.
- Sourcery CodeBench Lite 2012.09-63 for ARM EABI - i636 linux binaries
- Sourcery CodeBench Lite 2012.09-63 for ARM EABI - i636 windows binaries
Unpack the archive and add the bin
directory to your PATH
, e.g. as
follows:
cat >> $HOME/.profile << EOL
if [ -d "\$HOME/usr/opt/arm-2012.09/bin" ] ; then
PATH="\$HOME/usr/opt/arm-2012.09/bin:\$PATH"
fi
EOL
These tools are only available as binaries and can be obtained from energymicro. Here is a link to the Linux 686 binary package. If this download is unavailable, it can be found on the following site. The version is also not kept up-to-date.
Unpack the archive and add the bin
directory to your PATH
, e.g. as
follows:
cat >> $HOME/.profile << EOL
if [ -d "\$HOME/usr/opt/energymicro" ] ; then
PATH="\$HOME/usr/opt/energymicro:\$PATH"
fi
EOL
For this tools you need the 32 bit readline
and libusb
libraries.
Depending on your distribution the packages might be called differently, on
Debian it is lib32readline5
and libusb-1.0-0
.
On most Linux distributions only root has the right to flash the binary to the
platform. On Windows this should not be necessary, since non-administrators by
default have the right to access the device. In order to enable non-root users
to flash, one can use a udev
rule which automatically enables members of the
group plugdev
to launch the flasher. Run the following commands with root
privileges or alternatively follow the instructions in the doc
directory of
the energyAware tools.
cat >> /etc/udev/rules.d/50-jlink.rules << EOL
ACTION=="add", ATTR{idProduct}=="0101", ATTR{idVendor}=="1366", MODE="664", GROUP="plugdev"
ACTION=="add", ATTR{idProduct}=="0102", ATTR{idVendor}=="1366", MODE="664", GROUP="plugdev"
ACTION=="add", ATTR{idProduct}=="0103", ATTR{idVendor}=="1366", MODE="664", GROUP="plugdev"
ACTION=="add", ATTR{idProduct}=="0104", ATTR{idVendor}=="1366", MODE="664", GROUP="plugdev"
EOL
Finally ensure that the user is a member of the plugdev
group:
groupadd plugdev
usermod --append --groups plugdev <username>
To see the debug output one can use a terminal program like minicom
. The
necessary settings are as follows.
device /dev/ttyUSB0
baud rate 2000000
bits 8
parity odd
hardware flow control no
software flow control no
This can be accomplished with the following minicom configuration.
pu port /dev/ttyUSB0
pu baudrate 2000000
pu bits 8
pu parity O
pu stopbits 1
pu rtscts No
Place these lines in a file called $HOME/.minirc.dfl
and running minicom
on the console should display the debug output generated by the application.
Tabs are used for indentation and spaces for alignment. To maintain a uniform
code appearance the program astyle
is used with the following options.
astyle -T4pbcUDH -z2