Skip to content

Documentation: add rst file for the TM4C123G#18804

Draft
TheFakeMontyOnTheRun wants to merge 1 commit intoapache:masterfrom
TheFakeMontyOnTheRun:tiva-c-doc-patch
Draft

Documentation: add rst file for the TM4C123G#18804
TheFakeMontyOnTheRun wants to merge 1 commit intoapache:masterfrom
TheFakeMontyOnTheRun:tiva-c-doc-patch

Conversation

@TheFakeMontyOnTheRun
Copy link
Copy Markdown
Contributor

@TheFakeMontyOnTheRun TheFakeMontyOnTheRun commented Apr 25, 2026

Summary

As discussed in #18690, I'm adding the Tiva C Launchpad documentation
using the existing info, but adapting as much as I can to the template.

Impact

The information will be more easily available to developers.

Testing

I replicated some of the commands, to ensure that the commands would
produce the messages described in the docs, to make sure the formatting was
consistent.

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: L The size of the change in this PR is large labels Apr 25, 2026
@TheFakeMontyOnTheRun TheFakeMontyOnTheRun marked this pull request as draft April 25, 2026 16:18
@TheFakeMontyOnTheRun TheFakeMontyOnTheRun force-pushed the tiva-c-doc-patch branch 2 times, most recently from ab8fc40 to 7402ab2 Compare April 25, 2026 16:27
Signed-off-by: Daniel Monteiro <monteiroquiet@gmail.com>
@TheFakeMontyOnTheRun TheFakeMontyOnTheRun marked this pull request as ready for review April 25, 2026 16:49
Copy link
Copy Markdown
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the suggestions, this looks good to me. Thanks for improving the docs!

Comment on lines +215 to +266
The I2C tool has extensive help that can be accessed as follows:

.. code-block:: console

nsh> i2c help
Usage: i2c <cmd> [arguments]
Where <cmd> is one of:

Show help : ?
List buses : bus
List devices : dev [OPTIONS] <first> <last>
Read register : get [OPTIONS] [<repetitions>]
Show help : help
Write register: set [OPTIONS] <value> [<repetitions>]
Verify access : verf [OPTIONS] [<value>] [<repetitions>]

Where common "sticky" OPTIONS include:
[-a addr] is the I2C device address (hex). Default: 03 Current: 03
[-b bus] is the I2C bus number (decimal). Default: 0 Current: 0
[-r regaddr] is the I2C device register address (hex). Default: 00 Current: 00
[-w width] is the data width (8 or 16 decimal). Default: 8 Current: 8
[-s|n], send/don't send start between command and data. Default: -n Current: -n
[-i|j], Auto increment|don't increment regaddr on repetitions. Default: NO Current: NO
[-f freq] I2C frequency. Default: 100000 Current: 100000

.. note::

Arguments are "sticky". For example, once the I2C address is
specified, that address will be reused until it is changed.

.. note::

The I2C dev command may have bad side effects on your I2C devices.
Use only at your own risk.

As an example, the I2C dev command can be used to list all devices
responding on I2C0 (the default) like this:

.. code-block:: console

nsh> i2c dev 0x03 0x77
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- 3d -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
nsh>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good info, but is available here already: https://nuttx.apache.org/docs/latest/applications/system/i2c/index.html

You can instead just link to the docs about the I2C tool.

Comment on lines +548 to +648
CONFIG_ARCH - Identifies the arch/ subdirectory. This should
be set to:

.. code-block:: console

CONFIG_ARCH=arm

CONFIG_ARCH_family - For use in C code:

.. code-block:: console

CONFIG_ARCH_ARM=y

CONFIG_ARCH_architecture - For use in C code:

.. code-block:: console

CONFIG_ARCH_CORTEXM4=y

CONFIG_ARCH_CHIP - Identifies the arch/\*/chip subdirectory

.. code-block:: console

CONFIG_ARCH_CHIP="tiva"

CONFIG_ARCH_CHIP_name - For use in C code to identify the exact
chip:

.. code-block:: console

CONFIG_ARCH_CHIP_TM4C123GH6PM

CONFIG_ARCH_BOARD - Identifies the boards/ subdirectory and
hence, the board that supports the particular chip or SoC.

.. code-block:: console

CONFIG_ARCH_BOARD=tm4c123g-launchpad (for the TM4C123G LaunchPad)

CONFIG_ARCH_BOARD_name - For use in C code

.. code-block:: console

CONFIG_ARCH_BOARD_TM4C123G_LAUNCHPAD

CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
of delay loops

CONFIG_ENDIAN_BIG - define if big endian (default is little
endian)

CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case):

.. code-block:: console

CONFIG_RAM_SIZE=0x00008000 (32Kb)

CONFIG_RAM_START - The start address of installed DRAM

.. code-block:: console

CONFIG_RAM_START=0x20000000

CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
have LEDs

CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
stack. If defined, this symbol is the size of the interrupt
stack in bytes. If not defined, the user task stacks will be
used during interrupt handling.

CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions

CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.

There are configurations for disabling support for interrupts GPIO ports.
Only GPIOP and GPIOQ pins can be used as interrupting sources on the
TM4C129x. Additional interrupt support can be disabled if desired to
reduce memory footprint.

.. code-block:: console

CONFIG_TIVA_GPIOP_IRQS=y
CONFIG_TIVA_GPIOQ_IRQS=y

TM4C123G specific device driver settings

CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
console and ttys0 (default is the UART0).

CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer

CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer

CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be

CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.

CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we don't repeat most of these anymore. If you were following one of the old README.txt files, these config options are all listed in each one. Now that we have a searchable RST website, it's best to just document the options specific to the board, and let the other config options be explained elsewhere (i.e. chip specific on the chip page; things like CONFIG_ARCH="arm" don't need to be re-stated)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more-or-less a blind conversion of what was available on the README.txt, with a nice coat of paint; It doesn't help that I'm not as used to this board as I was 10 years ago (NuttX kind of saved it for me :D).

I will remove that stuff, but it will take more time for me to finish this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! I've encountered a lot of these when I was converting them to RST and they are mostly a copy-paste of one another with a ton of repeated information. The template we base off of now is an RST format template in Documentation/ called board.rst I believe.

@TheFakeMontyOnTheRun TheFakeMontyOnTheRun marked this pull request as draft April 25, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants