Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions Documentation/platforms/arm/tiva/boards/lm3s6965-ek/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
===========
lm3s6965-ek
===========

The `Stellaris LM3S6965 Evaluation Kit
<https://www.ti.com/tool/EK-LM3S6965>`_ is an ARM Cortex-M3 based
development board featuring the LM3S6965 microcontroller with an
integrated 10/100 Ethernet controller. NuttX can run on this board
both on real hardware and under QEMU emulation
(``qemu-system-arm -M lm3s6965evb``).

Features of the LM3S6965 Evaluation Kit:

* LM3S6965 microcontroller (ARM Cortex-M3, 50 MHz)
* 256 KB flash, 64 KB SRAM
* Integrated 10/100 Ethernet MAC and PHY
* OLED graphics display (128 x 96 pixel)
* MicroSD card slot
* USB interface for debugging and power supply
* Standard ARM 20-pin JTAG debug connector

Configurations
==============

Each configuration is maintained in a sub-directory and can be selected
as follows::

$ ./tools/configure.sh lm3s6965-ek:<subdir>

Where ``<subdir>`` is one of the following:

discover
--------

A network discovery configuration::

$ ./tools/configure.sh -l lm3s6965-ek:discover
$ make

nsh
---

Configures the NuttShell (NSH) with serial and telnet interfaces::

$ ./tools/configure.sh -l lm3s6965-ek:nsh
$ make

nx
--

An NX graphics configuration::

$ ./tools/configure.sh -l lm3s6965-ek:nx
$ make

qemu-flat
---------

A FLAT memory model configuration for running under QEMU::

$ ./tools/configure.sh -l lm3s6965-ek:qemu-flat
$ make

qemu-protected
--------------

A PROTECTED memory model configuration for running under QEMU::

$ ./tools/configure.sh -l lm3s6965-ek:qemu-protected
$ make

qemu-kostest
-------------

A PROTECTED memory model configuration with kernel ostest for running
under QEMU::

$ ./tools/configure.sh -l lm3s6965-ek:qemu-kostest
$ make

qemu-nxflat
------------

A FLAT memory model configuration with NXFLAT binary support for running
under QEMU::

$ ./tools/configure.sh -l lm3s6965-ek:qemu-nxflat
$ make

tcpecho
-------

A TCP echo server configuration::

$ ./tools/configure.sh -l lm3s6965-ek:tcpecho
$ make

Running with QEMU
=================

FLAT build (qemu-flat)
----------------------

::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin

PROTECTED build (qemu-protected, qemu-kostest)
-----------------------------------------------

The PROTECTED build produces separate kernel and user binaries.
Use ``-device loader`` to load the user binary at its link address::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin \
-device loader,file=nuttx_user.bin,addr=0x20000

With networking (qemu-flat)
---------------------------

The ``lm3s6965evb`` machine includes a built-in Stellaris Ethernet NIC
(``stellaris_enet``). To enable user-mode networking with the host,
add the ``-nic user`` option::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin -nic user

With networking (qemu-protected)
---------------------------------

For the PROTECTED build, also load the user binary::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin \
-device loader,file=nuttx_user.bin,addr=0x20000 \
-nic user

To exit QEMU, press ``Ctrl-A`` then ``X``.

Debugging with QEMU
====================

1. To debug the NuttX ELF with symbols, ensure that the following
configuration option is enabled in your defconfig (it is already
set in the ``lm3s6965-ek:qemu-protected`` defconfig)::

CONFIG_DEBUG_SYMBOLS=y

2. Run QEMU at shell terminal 1 with GDB server enabled::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin -S -s

For a PROTECTED build, also load the userspace binary::

$ qemu-system-arm -M lm3s6965evb -nographic \
-kernel nuttx.bin \
-device loader,file=nuttx_user.bin,addr=0x20000 -S -s

3. Run GDB with TUI, connect to QEMU, load NuttX and continue
(at shell terminal 2)::

$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
(gdb)
9 changes: 9 additions & 0 deletions Documentation/platforms/arm/tiva/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,12 @@ Jose Pablo Carballo and I are doing this port.
- TI/Tiva TM4C129E
- TI/Tiva TM4C129X
- TI/SimpleLink CC13x2

Supported Boards
================

.. toctree::
:glob:
:maxdepth: 1

boards/*/*
1 change: 1 addition & 0 deletions arch/arm/src/armv6-m/arm_dispatch_syscall.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ arm_dispatch_syscall:
lsl r0, r0, #2 /* R0=Offset of the stub for this syscall */
ldr r4, [r4, r0] /* R4=Address of the stub for this syscall */
blx r4 /* Call the stub (modifies lr) */
ldr r4, [sp, #0] /* Restore r4 */
add sp, sp, #32 /* Destroy the stack frame */
mov r2, r0 /* R2=Save return value in R2 */
mov r0, SYS_syscall_return /* R0=SYS_syscall_return */
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/src/armv7-m/arm_dispatch_syscall.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@
arm_dispatch_syscall:
.cfi_sections .debug_frame
.cfi_startproc
mov r11, sp
.cfi_register sp, r11
sub sp, sp, #32
.cfi_def_cfa_offset 32
str r4, [sp, #0]
.cfi_offset r4, 0
str r5, [sp, #4]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ CONFIG_EXAMPLES_WGET=y
CONFIG_FS_BINFS=y
CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_TMPFS=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_LIBC_DLFCN=y
CONFIG_LIBC_ELF_RELOCATION_BUFFERCOUNT=64
Expand Down Expand Up @@ -103,4 +102,5 @@ CONFIG_TIVA_GPIOG_IRQS=y
CONFIG_TIVA_SSI0=y
CONFIG_TIVA_UART0=y
CONFIG_TIVA_WITH_QEMU=y
CONFIG_TLS_LOG2_MAXSTACK=11
CONFIG_UART0_SERIAL_CONSOLE=y
6 changes: 3 additions & 3 deletions boards/arm/tiva/lm3s6965-ek/scripts/memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MEMORY

/* 64Kb of contiguous SRAM */

ksram (rwx) : ORIGIN = 0x20000000, LENGTH = 16K
usram (rwx) : ORIGIN = 0x20004000, LENGTH = 16K
xsram (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
ksram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
usram (rwx) : ORIGIN = 0x20005000, LENGTH = 20K
xsram (rwx) : ORIGIN = 0x2000a000, LENGTH = 24K
}
Loading