vmatos / rosserial_tivac

rosserial package for the TivaC Launchpad boards
3 stars 1 forks source link

Not all silicon revisions of TM4C chips supported #1

Closed sdahdah closed 7 years ago

sdahdah commented 7 years ago

i need to use some features on the TM4C123G that are specific to silicon revision RB2, but all of rosserial_tivac seems to be hard-coded to work only with revision RA0. All the device defines need to be changed to support all the silicon revisions in the long-term.

I looked at the CMake files though, and it seems the only flag the user needs to specify which launchpad they're using. Then another CMakeList infers whether it's a TM4C123_RA0, etc... Would this way of specifying devices need to be changed to allow for finer grained control? Or should the most recent silicon revisions be set as the defaults?

For reference, the TM4C123 revision history and errata: http://www.ti.com/lit/er/spmz849f/spmz849f.pdf

vmatos commented 7 years ago

I never thought of this issue. I'll look into it and discuss this with you.

vmatos commented 7 years ago

My TODO list, so I don't forget:

  1. Don't use silicon revision defines to choose between TM4C123GXL and TM129XL boards. Instead of TARGETIS* use PART_TM4C12. Files to change:
    • src/ros_lib/tivac_hardware.h
    • src/ros_lib/tivac_hardware_usb.h
    • src/ros_lib/startup_gcc
  2. Add DEVICE_REVISION optional keyword for project CMakeLists.txt. If argument doesn't exist, uses default (tracking TivaWare example makefiles). Otherwise uses user specified silicon revision.
vmatos commented 7 years ago

@sdahdah just commited this change. https://github.com/vmatos/rosserial_tivac/commit/97b52c496aa7ae620bbd0da1e231d71a4d265fbd

Use the argument DEVICE_SILICON to specify the silicon revision you desire. (http://wiki.ros.org/rosserial_tivac)

Let me know if it works for you.

sdahdah commented 7 years ago

Yes, it worked! Thanks for fixing this so quickly!

Two notes, however:

1) I think RB2 should be the default, since it's the most recent revision. Not RB1. 2) It would be good to document what the argument that follows DEVICE_SILICON should be. I had to look at the source code to figure out it was TARGET_IS_TM4C123_RB2, and not RB2 or B2. Though maybe I missed something in the documentation.

vmatos commented 7 years ago
  1. I used the same ones used in TivaWare's examples. I'll keep tracking the most recent revision in TivaWare's examples.
  2. Good point. I'll make the changes in the documentation.
sdahdah commented 7 years ago

That makes sense. Thanks for your help!