boards: arm: sam4: Enable bossac bootloader runner
The SAM4E/S SoC have a ROM bootloader named SAM-BA. Add bossac to the board west runner list. This requires Zephyr SDK 0.12.0. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
2ef06a5280
commit
c1a547fd46
4 changed files with 90 additions and 23 deletions
|
@ -2,3 +2,5 @@
|
||||||
|
|
||||||
board_runner_args(openocd --cmd-post-verify "at91sam4 gpnvm set 1")
|
board_runner_args(openocd --cmd-post-verify "at91sam4 gpnvm set 1")
|
||||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||||
|
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
|
||||||
|
|
|
@ -106,6 +106,43 @@ contents of the SAM4E flash memory:
|
||||||
Flashing
|
Flashing
|
||||||
========
|
========
|
||||||
|
|
||||||
|
For flash the board Zephyr provides two paths. One uses the default OpenOCD
|
||||||
|
tool and the second one uses :ref:`atmel_sam_ba_bootloader`.
|
||||||
|
|
||||||
|
Using OpenOCD
|
||||||
|
-------------
|
||||||
|
|
||||||
|
#. Connect the SAM4E Xplained Pro board to your host computer using the USB
|
||||||
|
debug port. Then build and flash the :ref:`hello_world` application.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/hello_world
|
||||||
|
:board: sam4e_xpro
|
||||||
|
:goals: build flash
|
||||||
|
|
||||||
|
Using SAM-BA bootloader
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
#. Close the ``ERASE`` jumper on the SAM4E Xplained Pro board. Power on the
|
||||||
|
board for 10s.
|
||||||
|
|
||||||
|
#. Open the ``ERASE`` jumper.
|
||||||
|
|
||||||
|
#. Connect the SAM4E Xplained Pro board to your host computer using the SoC
|
||||||
|
USB port. Then build and flash the :ref:`hello_world` application.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/hello_world
|
||||||
|
:board: sam4e_xpro
|
||||||
|
:goals: build
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ west flash -r bossac
|
||||||
|
|
||||||
|
Visualizing the message
|
||||||
|
-----------------------
|
||||||
|
|
||||||
#. Run your favorite terminal program to listen for output. Under Linux the
|
#. Run your favorite terminal program to listen for output. Under Linux the
|
||||||
terminal should be :code:`/dev/ttyACM0`. For example:
|
terminal should be :code:`/dev/ttyACM0`. For example:
|
||||||
|
|
||||||
|
@ -113,22 +150,15 @@ Flashing
|
||||||
|
|
||||||
$ minicom -D /dev/ttyACM0 -o
|
$ minicom -D /dev/ttyACM0 -o
|
||||||
|
|
||||||
The -o option tells minicom not to send the modem initialization
|
The -o option tells minicom not to send the modem initialization string.
|
||||||
string. Connection should be configured as follows:
|
Connection should be configured as follows:
|
||||||
|
|
||||||
- Speed: 115200
|
- Speed: 115200
|
||||||
- Data: 8 bits
|
- Data: 8 bits
|
||||||
- Parity: None
|
- Parity: None
|
||||||
- Stop bits: 1
|
- Stop bits: 1
|
||||||
|
|
||||||
#. Connect the SAM4E Xplained Pro board to your host computer using the
|
#. Press reset button
|
||||||
USB debug port. Then build and flash the :ref:`hello_world`
|
|
||||||
application.
|
|
||||||
|
|
||||||
.. zephyr-app-commands::
|
|
||||||
:zephyr-app: samples/hello_world
|
|
||||||
:board: sam4e_xpro
|
|
||||||
:goals: build flash
|
|
||||||
|
|
||||||
You should see "Hello World! arm" in your terminal.
|
You should see "Hello World! arm" in your terminal.
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,5 @@
|
||||||
|
|
||||||
board_runner_args(jlink "--device=atsam4s16c" "--speed=4000")
|
board_runner_args(jlink "--device=atsam4s16c" "--speed=4000")
|
||||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||||
|
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)
|
||||||
|
|
|
@ -89,10 +89,49 @@ the SAM4S16C.
|
||||||
Flashing
|
Flashing
|
||||||
========
|
========
|
||||||
|
|
||||||
|
For flash the board Zephyr provides two paths. One uses the default JLink
|
||||||
|
tool and the second one uses :ref:`atmel_sam_ba_bootloader`.
|
||||||
|
|
||||||
|
Using JLink
|
||||||
|
-------------
|
||||||
|
|
||||||
#. Download JLink from the Segger `JLink Downloads Page`_. Go to the section
|
#. Download JLink from the Segger `JLink Downloads Page`_. Go to the section
|
||||||
"J-Link Software and Documentation Pack" and install the "J-Link Software and
|
"J-Link Software and Documentation Pack" and install the "J-Link Software
|
||||||
Documentation pack for Linux". The application JLinkExe needs to be accessible
|
and Documentation pack for Linux". The application JLinkExe needs to be
|
||||||
from your path.
|
accessible from your path.
|
||||||
|
|
||||||
|
#. Connect the SAM4S Xplained board to your host computer using the USB debug
|
||||||
|
port. Then build and flash the :ref:`hello_world` application.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/hello_world
|
||||||
|
:board: sam4s_xplained
|
||||||
|
:goals: build flash
|
||||||
|
|
||||||
|
|
||||||
|
Using SAM-BA bootloader
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
#. Close the ``J25`` jumper on the SAM4S Xplained board. Power on the board
|
||||||
|
for 10s.
|
||||||
|
|
||||||
|
#. Open the ``J25`` jumper.
|
||||||
|
|
||||||
|
#. Connect the SAM4S Xplained board to your host computer using the SoC USB
|
||||||
|
port. Then build and flash the :ref:`hello_world` application.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/hello_world
|
||||||
|
:board: sam4s_xplained
|
||||||
|
:goals: build
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ west flash -r bossac
|
||||||
|
|
||||||
|
|
||||||
|
Visualizing the message
|
||||||
|
-----------------------
|
||||||
|
|
||||||
#. Run your favorite terminal program to listen for output. Under Linux the
|
#. Run your favorite terminal program to listen for output. Under Linux the
|
||||||
terminal should be :code:`/dev/ttyACM0`. For example:
|
terminal should be :code:`/dev/ttyACM0`. For example:
|
||||||
|
@ -101,25 +140,19 @@ Flashing
|
||||||
|
|
||||||
$ minicom -D /dev/ttyACM0 -o
|
$ minicom -D /dev/ttyACM0 -o
|
||||||
|
|
||||||
The -o option tells minicom not to send the modem initialization
|
The -o option tells minicom not to send the modem initialization string.
|
||||||
string. Connection should be configured as follows:
|
Connection should be configured as follows:
|
||||||
|
|
||||||
- Speed: 115200
|
- Speed: 115200
|
||||||
- Data: 8 bits
|
- Data: 8 bits
|
||||||
- Parity: None
|
- Parity: None
|
||||||
- Stop bits: 1
|
- Stop bits: 1
|
||||||
|
|
||||||
#. Connect the SAM4S Xplained board to your host computer using the
|
#. Press reset button
|
||||||
USB debug port. Then build and flash the :ref:`hello_world`
|
|
||||||
application.
|
|
||||||
|
|
||||||
.. zephyr-app-commands::
|
|
||||||
:zephyr-app: samples/hello_world
|
|
||||||
:board: sam4s_xplained
|
|
||||||
:goals: build flash
|
|
||||||
|
|
||||||
You should see "Hello World! arm" in your terminal.
|
You should see "Hello World! arm" in your terminal.
|
||||||
|
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue