Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
Config/ | 18-Mar-2025 | - | 660 | 309 | ||
SEGGER/ | 18-Mar-2025 | - | 10,435 | 4,799 | ||
zephyr/ | 18-Mar-2025 | - | 5 | 4 | ||
README.md | D | 18-Mar-2025 | 3.5 KiB | 68 | 57 |
README.md
1## Segger module for Zephyr RTOS 2 3This repository is the Zephyr project module for integrating Segger [RTT][1] ([wiki][2]), 4[SystemView][3] ([wiki][4]) and [Monitor mode debugging][5] with Zephyr RTOS. 5 6The code here is predominantly untouched public Segger source code with changes to support Zephyr 7RTOS. 8 9This README identifies the origin of upstream Segger files and suggests a procedure to follow when 10updating to a new Segger release. 11 12### Upstream Segger source code 13Segger's [official GitHub repository][6] is not currently actively maintained, hence Segger code is 14obtained from publicly accessible download links posted on Segger's website. 15 16#### RTT and SystemView 17[Download][7] "SystemView, Target Sources" from the SystemView downloads [webpage][8]. This 18download contains both RTT and SystemView sources. 19 20#### Monitor mode debugging 21[Download][9] "Example project" from the Monitor mode debugging [webpage][10]. 22 23### Updating to a new Segger release 24Upgrading to a new Segger release means migrating existing Zephyr changes to the latest Segger 25code. There are many tools (`diff`, `patch`, `git diff`, etc.) and different approaches to 26accomplishing this -- use what you are familiar with. The following procedure is a guide to 27achieving the desired result. 28 291. Obtain the updated Segger code and prepare for subsequent steps 30 1. Download upstream code from the links above 31 2. Extract the SystemView update and delete the `Samples` directory 32 3. Extract the Monitor mode example and delete _non_-JLINK_MONITOR* files 33 4. Organize the files to match the directory structure of this repository 34 5. Convert line endings of all files to Unix style LF (`\n`) 35 6. Strip trailing white space of all files 362. Establish the Zephyr patches that will be applied in step 3 37 1. Download the SystemView release this repository is _currently_ based on (refer to 38 "SystemView version: x.yy" in the source files to determine the current release) 39 2. Repeat step 1 parts ii-vi for these downloaded files 40 3. Compare the files of this repository to those of step 2 part ii to identify the existing 41 Zephyr changes (the "diff", or "patch") needed for step 3 423. Apply the Zephyr changes to the new Segger release 43 1. Apply the patches from step 2 part iii to the files of step 1 44 2. Sanity check the result and revise as needed 454. Review/update the list of patched files below 465. Commit the updated + modified Segger files and push the change 476. Open a pull-request to merge the change into this repository 48 49### Patched files 50Segger source files with Zephyr specific changes: 511. `Config/SEGGER_RTT_Conf.h` 52 * Defines related to RTT buffers, memory region, locking mechanism 532. `Config/SEGGER_SYSVIEW_Conf.h` 54 * Defines related to SystemView buffers, memory region, locking mechanism 553. `SEGGER/SEGGER_RTT.c` 56 * RTT initialization options 57 58[1]: https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer 59[2]: https://wiki.segger.com/RTT 60[3]: https://www.segger.com/products/development-tools/systemview 61[4]: https://wiki.segger.com/SystemView 62[5]: https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging 63[6]: https://github.com/SEGGERMicro 64[7]: https://www.segger.com/downloads/jlink/systemview_target_src 65[8]: https://www.segger.com/downloads/systemview 66[9]: https://www.segger.com/downloads/pub/Generic_Cortex-M_MonitorModeSystickExample_SES.zip 67[10]: https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging 68