Note: This tutorial assumes that you have completed the previous tutorials: Tivaware and toolchain setup. |
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. |
Hello world publisher on TM4C1294XL.
Description: Chatter publisher for the EK-TM4C1294XL board using UART over debug USB port.Tutorial Level: INTERMEDIATE
Next Tutorial: Buttons publisher
Introduction
This tutorial is simply an extension of the previous Hello world publisher on TM4C123GXL for the EK-TM4C1294XL board.
You can repeat the process over the previously created project. Or refer to the reference project on rosserial_tivac_tutorials/chatter129.
Source code
On chatter/chatter.cpp change these lines to:
This change is required due to the different mechanisms which both MCUs use to control the system clock.
CMakeLists.txt
Now let's change the application's CMakeLists.txt file.
Due to the difference on how the clock frequency is set up for the TM4C129XL target, we need to add the frequency definition.
add_definitions(-DTM4C129FREQ=120000000)
And then change the target configuration by setting the board type.
generate_tivac_firmware( SRCS chatter.cpp BOARD tm4c1294xl )
Build, flash and test
Now we can build our application when we run catkin and then upload.
catkin_make rosserial_tivac_tutorials_chatter_chatter.axf catkin_make rosserial_tivac_tutorials_chatter_flash
Let's listen to our newly created topic from TivaC.
Run roscore.
roscore
On a new terminal, run serial_node.py from rosserial_python.
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0
And watch the messages from the topic.
rostopic echo /chatter