11.. zephyr :board :: am243x_launchpad
22
3+ .. TODO: Improve formatting and descriptions!
4+ .. This documentation isn't ready for upstream yet!
5+
36 Overview
47********
58
@@ -93,10 +96,11 @@ MCU+ SDK to set up some peripherals like UART clocks. Only in this bootmode the
9396TCM memory can be used.
9497
9598Depending on the boot mode selection you require different parts of the MCU+
96- SDK. If you want to start an application only via UART you need the Python tools
97- of the MCU+ SDK and binary files of the repo.
98- If you want to boot from flash via MCUboot or chain-load after a SBL bootloader
99- from the TI MCU+ SDK you need to fully set up the SDK and build some of the examples.
99+ SDK.
100+ If you want to load a Zephyr application via UART or load an Zephyr application
101+ after MCUboot from flash you only need binary files from the MCU+ SDK.
102+ If you want to chain-load a Zephyr application after a SBL bootloader from the
103+ TI MCU+ SDK you need to fully set up the SDK and build some of the examples.
100104
101105
102106Setting up the MCU+ SDK
@@ -236,60 +240,19 @@ the ``mcu_plus_sdk``.
236240Loading an application via UART
237241-------------------------------
238242To run an application via UART you need to change the boot DIP switches on the
239- board into ``11100000 `` position. After that you need to connect the board and
240- run the ``uart_bootloader.py `` script with the venv active, if you created one
241- during setup. The script is under ``tools/boot `` inside the ``mcu_plus_sdk ``
242- directory. You additionally need to provide the UART interface (e.g.
243- ``/dev/ttyACM0 `` under Linux) and the file you want to run.
244-
245- .. code-block :: console
246-
247- python3 uart_bootloader.py -p /dev/ttyACM0 --bootloader=<file-to-run>
248-
249-
250- Flashing data onto the flash
251- ----------------------------
252-
253- To flash data onto the flash you need to create a config file first. It should
254- have the following contents:
255-
256- .. code-block ::
257-
258- --flash-writer=<sbl_uart_uniflash-tiimage-output>
259- --file=<file-to-flash> --operation=flash --flash-offset=<flash-offset>
260-
261- The ``<sbl_uart_uniflash-tiimage-output> `` needs to be replaced with the path to
262- the output file you got when building the ``sbl_uart_uniflash `` example.
263-
264- The ``<file-to-flash> `` needs to replaced with the file you want to flash,
265- usually a Zephyr application, MCUboot or the ``sbl_ospi `` bootloader.
266-
267- The ``<flash-offset> `` is the place where the file should be flashed in
268- hexadecimal. For bootloaders or when starting Zephyr directly it's ``0x0 `` and
269- for Zephyr applications after the bootloader it's usually ``0x80000 ``.
270-
271- Then you need switch the boot DIP switches into ``11100000 `` position and run
272- the ``uart_uniflash.py `` script that can be found under ``tools/boot `` with the
273- MCU+ SDK venv activated, if you created one.
243+ board into ``11100000 `` position, build an application for the ``boot `` variant
244+ with the Kconfig options set correctly in `Required binary files `_. After that
245+ you can just run
274246
275247.. code-block :: console
276- python3 uart_uniflash.py -p /dev/ttyACM0 --cfg <path-to-config>
277-
278-
279- Booting Zephyr via UART
280- -----------------------
281-
282- To boot via UART you need to build your application for the ``boot `` target,
283- including setting the Kconfig options as described in `Required binary files `_.
284-
285- After that you can run it as described in `Loading an application via UART `_.
286- The file you need to run is
287- ``<your-build-directory>/zephyr/zephyr.k3_rom_loadable.bin ``.
248+ west flash --no-header
288249
289250
290251 Booting Zephyr from Flash via MCUboot
291252-------------------------------------
292253
254+ The following sections will describe how to configure MCUboot and the Zephyr
255+ application and booting it from flash.
293256
294257Building and flashing MCUboot
295258^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -298,7 +261,8 @@ First you need to build MCUboot for the ``boot`` target. Please make sure your
298261version is new enough for Cortex-R support. You need to set the Kconfig options
299262described in `Loading an application via UART `_.
300263
301- Additionally you need to set the following Kconfig options manually:
264+ Additionally you need to set the following Kconfig options additionally to the
265+ ones described in `Required binary files `_ manually:
302266
303267+----------------------------------------+------------+
304268| Symbol | Value |
@@ -308,16 +272,22 @@ Additionally you need to set the following Kconfig options manually:
308272| CONFIG_BOOT_IMAGE_EXECUTABLE_RAM_START | 0x70080000 |
309273+----------------------------------------+------------+
310274
311- After building you need to flash the file
312- ``<your-build-directory>/zephyr/zephyr.k3_rom_loadable.bin `` to ``0x0 `` as
313- described in `Flashing data onto the flash `_.
275+ Additionally you also need to to build the sample called ``xmodem1k_flasher ``
276+ that can be found under ``samples/drivers/uart/xmodem1k_flasher `` for the
277+ ``boot `` board variant with the Kconfig options set that are described in
278+ `Loading an application via UART `_.
279+
280+ Then you need to temporarly execute the ``xmodem1k_flasher `` by running ``west
281+ flash `` inside the directory of the sample. After that you can simply flash
282+ MCUboot to external flash by running ``west flash ``, while the
283+ ``xmodem1k_flasher `` sample is running on the board.
314284
315285
316286Building and flashing a Zephyr application
317287^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
318288
319289Next you can build your Zephyr application (for the non-boot variant!). Here you
320- also need to manually change some Kconfig options.
290+ also need to manually change some Kconfig options:
321291
322292+-----------------------------------------+------------+
323293| Symbol | Value |
@@ -331,12 +301,12 @@ also need to manually change some Kconfig options.
331301
332302The ``CONFIG_MCUBOOT_SIGNATURE_KEY_FILE `` leads to your private key with which
333303you signed the application. The default private key is inside the mcuboot
334- project with the name ``root-rsa-2048.pem ``.
335-
336- You then need to flash the file
337- ``<your-build-directory>/zephyr/zephyr.signed.bin `` at the offset ``0x80000 `` as
338- described in `Flashing data onto the flash `_.
304+ project with the name ``root-rsa-2048.pem ``. You shouldn't set the
305+ ``CONFIG_TI_K3_* `` options since they are not required.
339306
307+ Then you should reset the board, run the ``xmodem1k_flasher `` sample again and
308+ run ``west flash `` from inside your application directory while the
309+ ``xmodem1k_flasher `` is running on the board.
340310
341311Running
342312^^^^^^^
0 commit comments