Wiki
Note: This tutorial assumes that you have completed the previous tutorials: ROS Tutorials. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Tutorial Level: INTERMEDIATE
Next Tutorial:Hello world publisher for EK-TM4C123GXL
Introduction
Energia IDE is great for quick development of TivaC applications. However on bigger projects it can become cumbersome or unmanageable.
This tutorial assumes you already have set up a cross-compilation environment based on GNU toolchain and TivaWare libraries on Linux, and already are completly comfortable compiling and flashing your applications.
Compatible with SW-TM4C-2.1.1.71 onwards
Only the following boards are compatible with :
- EK-TM4C123GXL
- EK-TM4C1294XL
Setting up cross-compilation environment
Here are some quick steps to configure your toolchain if you haven't already. These instruction are not extensive by any means. You may run into problems, errors and incompatibilities.
Obtain your GNU toolchain for ARM Cortex-M & Cortex-R processors.
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa sudo apt-get update sudo apt-get install gcc-arm-embeddedGet the flashing tool
Build and install
git clone https://github.com/utzig/lm4tools.git cd lm4tools/lm4flash make sudo cp lm4flash /usr/local/binAdd rules for USB devices
If you haven't already done so, you have to add device rules.
echo 'ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", GROUP="users", MODE="0660"' | \ sudo tee /etc/udev/rules.d/99-stellaris-launchpad.rulesDownload and extract TivaWare
Download from TI's website.
Extract it to directory of your choosing. Example:
mkdir <TivaWarePah> cd <TivaWarePah> mv <directory_downloaded>/SW-TM4C-2.1.1.71.exe unzip SW-TM4C-2.1.1.71.exe rm SW-TM4C-2.1.1.71.exeTest cross-compilation and flashing
Navigate into one of the example projects and build a test project.
cd <path_to_tivaware>/examples/boards/ek-tm4c123gxl/blinky make lm4flash gcc/blinky.binIf no error occurred so far, you can continue the guide.
Set up environment variables
uses two environment variables to find Tivaware path and the flash tool.
In your set the variables:
export TIVA_WARE_PATH=$HOME/<path_to_tivaware_root> export TIVA_FLASH_EXECUTABLE=lm4flashAnd run:
source .bashrcInstall rosserial_tivac
You can install from source, either using the remaining pacakges from debs or from source.
Follow one of the two options:
- rosserial_tivac from binaries
- rosserial_tivac from source + rosserial binaries
rosserial and rosserial_tivac from ROS repositories
Example of how to install rosserial packages in binary form for Jade.
sudo apt-get install ros-jade-rosserial ros-jade-rosserial-msgs ros-jade-rosserial-client ros-jade-rosserial-python ros-jade-rosserial-tivacrosserial_tivac from source + rosserial binaries
can be found on the repository: https://github.com/vmatos/rosserial_tivac
Make sure you have package installed, either from binaries or source.
Installing rosserial binaries
Example of how to install rosserial packages in binary form for Jade.
sudo apt-get install ros-jade-rosserial ros-jade-rosserial-msgs ros-jade-rosserial-client ros-jade-rosserial-pythonDownload and build rosserial_tivac
Navigate to your ROS workspace. Clone the git repository. Then build and install the package.
cd <workspace_dir>/src git clone https://github.com/vmatos/rosserial_tivac.git cd <workspace_dir> catkin_make catkin_make installNext tutorials
If you've reach this point without encountering any error, you can now proceed to get hold of the package.
Install from source rosserial_tivac_tutorials
Build the package.
cd <workspace_dir>/src git clone https://github.com/vmatos/rosserial_tivac_tutorials.git cd <workspace_dir> catkin_make rosserial_tivac_tutorials_generate_messages source devel/setup.bash catkin_makeCarry on with the remaining tutorials: Hello world publisher.
Addendum: Tivaware USB library bug
At time of writing, Tivaware contains a known bug on its USB libraries. The author of this guide is not aware to what extent the bug affects the communication abilities with ROS.
On the file which implements the USB ring buffer: , one reads:
USBBufferInfoGet(const tUSBBuffer *psBuffer, tUSBRingBufObject *psRingBuf) (...) psRingBuf->ui32Size = psBufVars->sRingBuf.ui32ReadIndex;And should be:
psRingBuf->ui32Size = psBufVars->sRingBuf.ui32Size;
0 thoughts to “How to download previous versions of tiva c series”