{"id":326,"date":"2019-03-19T18:38:41","date_gmt":"2019-03-20T01:38:41","guid":{"rendered":"https:\/\/sysprogs.com\/tutorials\/?p=326"},"modified":"2019-03-19T20:35:48","modified_gmt":"2019-03-20T03:35:48","slug":"developing-kernel-modules-for-xilinx-zynq-devices","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/zynq\/module\/","title":{"rendered":"Developing Kernel Modules for Xilinx Zynq Devices"},"content":{"rendered":"<p>This tutorial shows how to create, edit and debug a basic kernel module for a Linux kernel built with <a href=\"https:\/\/www.xilinx.com\/products\/design-tools\/embedded-software\/petalinux-sdk.html\">Petalinux<\/a>\u00a0that is running on a Xilinx Zynq FPGA. Before you begin, install VisualKernel 3.1 or later and prepare your Petalinux project for debugging as described in <a href=\"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/petalinux\/\">this tutorial<\/a>. Also ensure your target image includes an SSH server so that VisualKernel can automatically deploy the kernel modules on it.<\/p>\n<ol>\n<li>We will begin with adding a new kernel module to the Petalinux project using the Petalinux tools. If you have already created the module, you can skip this step. If not, connect to your build machine via SSH and run the following commands:\n<pre class=\"\">cd &lt;Petalinux tools directory&gt;\r\n. settings.sh\r\ncd &lt;Petalinux project directory&gt;\r\npetalinux-create -t modules -n &lt;module name&gt;<\/pre>\n<p><a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-328 size-full\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod.png\" alt=\"\" width=\"1210\" height=\"616\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod.png 1210w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod-300x153.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod-768x391.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/01-newmod-1024x521.png 1024w\" sizes=\"(max-width: 1210px) 100vw, 1210px\" \/><\/a><\/li>\n<li>Start Visual Studio and open the VisualKernel module wizard:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-329\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj.png\" alt=\"\" width=\"941\" height=\"653\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj.png 941w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj-300x208.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj-768x533.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj-392x272.png 392w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/02-newprj-130x90.png 130w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/li>\n<li>On the first page select &#8220;Import an existing kernel module&#8221; and ensure you have the Advanced Kernel Project Subsystem enabled:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-330\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/03-import.png\" alt=\"\" width=\"886\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/03-import.png 886w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/03-import-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/03-import-768x601.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/li>\n<li>On the target selection page set the following settings:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Setting<\/th>\n<th>Value<\/th>\n<\/tr>\n<tr>\n<td>Targeted Linux Computer<\/td>\n<td>Your Zynq-based board running the Petalinux kernel with debugging support<\/td>\n<\/tr>\n<tr>\n<td>Build the module on<\/td>\n<td>The Linux machine that has the Petalinux tools<\/td>\n<\/tr>\n<tr>\n<td>Compatible GDB binary<\/td>\n<td>Full path to arm-linux-gnueabihf-gdb per\u00a0<a href=\"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/petalinux\/\">this tutorial<\/a><\/td>\n<\/tr>\n<tr>\n<td>Kernel build environment<\/td>\n<td>Configure manually<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-331\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/04-targets.png\" alt=\"\" width=\"886\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/04-targets.png 886w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/04-targets-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/04-targets-768x601.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/li>\n<li>On the next page configure the settings as shown below:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Setting<\/th>\n<th>Value<\/th>\n<\/tr>\n<tr>\n<td>Kernel type<\/td>\n<td>Shipped with Linux distro or built manually<\/td>\n<\/tr>\n<tr>\n<td>Kernel header directory<\/td>\n<td>The directory containing the <strong>vmlinux<\/strong> file with symbols\u00a0per\u00a0<a href=\"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/petalinux\/\">this tutorial<\/a><\/td>\n<\/tr>\n<tr>\n<td>Kernel symbols<\/td>\n<td>Skip it for now. We will configure them later.<\/td>\n<\/tr>\n<tr>\n<td>Build the project using<\/td>\n<td>Custom cross-compiler<\/td>\n<\/tr>\n<tr>\n<td>Target architecture<\/td>\n<td>arm<\/td>\n<\/tr>\n<tr>\n<td>Cross-compiler prefix<\/td>\n<td>arm-xilinx-linux-gnueabi-<\/td>\n<\/tr>\n<tr>\n<td>Environment setup file<\/td>\n<td>The kernel environment setup file per\u00a0<a href=\"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/petalinux\/\">this tutorial<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-332\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/05-paths.png\" alt=\"\" width=\"886\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/05-paths.png 886w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/05-paths-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/05-paths-768x601.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/li>\n<li>Now we need to point VisualKernel to the source code of the module created by Petalinux. It will be typically located under <strong>&lt;Petalinux Project&gt;\/project-spec\/meta-user\/recipes-modules\/&lt;Module name&gt;\/files<\/strong>:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-333\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/06-importpath.png\" alt=\"\" width=\"886\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/06-importpath.png 886w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/06-importpath-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/06-importpath-768x601.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/li>\n<li>On the next page proceed with accessing the source code directly via SSH:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-334\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/07-directssh.png\" alt=\"\" width=\"886\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/07-directssh.png 886w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/07-directssh-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/07-directssh-768x601.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/li>\n<li>Connect your JTAG programmer to the Windows computer via USB and ensure it is connected to the target board. Then pick it in the &#8220;Debug using&#8221; field, select your debugged device (depending on the Zynq revision, you may need to modify the scripts shipped with OpenOCD) and click &#8220;Test&#8221; to verify your settings:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-352\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr.png\" alt=\"\" width=\"1043\" height=\"817\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr.png 1043w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr-300x235.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr-768x602.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/maskisr-1024x802.png 1024w\" sizes=\"(max-width: 1043px) 100vw, 1043px\" \/><\/a><br \/>\nIf you are using OpenOCD, ensure the Startup GDB Commands field includes the &#8220;<strong>mon cortex_a maskisr on<\/strong>&#8221; command as otherwise interrupts will interfere with stepping into\/over functions and also continuing after a breakpoint.<\/li>\n<li>Press &#8220;Finish&#8221; to create a project. Once it is created, build it by pressing Ctrl-Shift-B. Initially, VisualKernel will warn that it cannot detect the kernel module name:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-336\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/09-build.png\" alt=\"\" width=\"1339\" height=\"869\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/09-build.png 1339w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/09-build-300x195.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/09-build-768x498.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/09-build-1024x665.png 1024w\" sizes=\"(max-width: 1339px) 100vw, 1339px\" \/><\/li>\n<li>Add the KERNEL_MODULE_NAME variable to Makefile so that VisualKernel can configure IntelliSense. Then right-click on the project and select &#8220;Reload Kernel Project&#8221;:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-337\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/10-module.png\" alt=\"\" width=\"1339\" height=\"869\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/10-module.png 1339w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/10-module-300x195.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/10-module-768x498.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/10-module-1024x665.png 1024w\" sizes=\"(max-width: 1339px) 100vw, 1339px\" \/><\/li>\n<li>Now the IntelliSense in the main source file should be very precise. You can double-check that it is loaded correctly by checking the Advanced VisualKernel Project Output in the Output window:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-338\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/11-loaded.png\" alt=\"\" width=\"1339\" height=\"869\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/11-loaded.png 1339w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/11-loaded-300x195.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/11-loaded-768x498.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/11-loaded-1024x665.png 1024w\" sizes=\"(max-width: 1339px) 100vw, 1339px\" \/><\/li>\n<li>Now we will configure the debugging settings. Open VisualKernel Project Properties and go to the Debug Settings page. Clear the following settings:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Setting<\/th>\n<th>Reason<\/th>\n<\/tr>\n<tr>\n<td>Display kernel output by hooking printk()<\/td>\n<td>This slows down debugging due to JTAG latency<\/td>\n<\/tr>\n<tr>\n<td>Build\/install a custom kernel module for collecting module information faster<\/td>\n<td>The Xilinx kernel does not support tracepoints required by the helper module<\/td>\n<\/tr>\n<tr>\n<td>Automatically detect kernels with address space randomization<\/td>\n<td>The Xilinx kernel does not use the address space randomization<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-349\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/12-settings-1.png\" alt=\"\" width=\"1163\" height=\"891\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/12-settings-1.png 1163w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/12-settings-1-300x230.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/12-settings-1-768x588.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/12-settings-1-1024x785.png 1024w\" sizes=\"(max-width: 1163px) 100vw, 1163px\" \/><\/li>\n<li>Go to the Module Build Settings page, open the <strong>Kernel Symbols for Debugging<\/strong> selector and click &#8220;Manage cached Linux symbols&#8221;:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-340\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/13-symbols.png\" alt=\"\" width=\"1163\" height=\"891\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/13-symbols.png 1163w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/13-symbols-300x230.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/13-symbols-768x588.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/13-symbols-1024x785.png 1024w\" sizes=\"(max-width: 1163px) 100vw, 1163px\" \/><\/li>\n<li>Select the machine where you have Petalinux tools installed and click &#8220;Import symbols\/sources&#8221;:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-341\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/14-import.png\" alt=\"\" width=\"727\" height=\"429\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/14-import.png 727w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/14-import-300x177.png 300w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/li>\n<li>In the import wizard select &#8220;Specify kernel symbols and sources manually&#8221;:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-342\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/15-manual.png\" alt=\"\" width=\"822\" height=\"642\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/15-manual.png 822w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/15-manual-300x234.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/15-manual-768x600.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/li>\n<li>On the second page enter the following settings per <a href=\"https:\/\/sysprogs.com\/VisualKernel\/tutorials\/xilinx\/petalinux\/\">this tutorial<\/a>:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Setting<\/th>\n<th>Reason<\/th>\n<\/tr>\n<tr>\n<td>Kernel file with symbols<\/td>\n<td>Full path to the <strong>vmlinux<\/strong> file built by Petalinux<\/td>\n<\/tr>\n<tr>\n<td>Source directory<\/td>\n<td>Kernel source directory used by Petalinux (typically &lt;build directory&gt;\/source)<\/td>\n<\/tr>\n<tr>\n<td>Compatible GDB binary<\/td>\n<td>Full path to the GDB binary used by Petalinux<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-343\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/16-dirs.png\" alt=\"\" width=\"822\" height=\"642\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/16-dirs.png 822w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/16-dirs-300x234.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/16-dirs-768x600.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/li>\n<li>Once the symbols have been imported, ensure they are selected in the VisualKernel Project Properties:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-344\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/17-syms.png\" alt=\"\" width=\"1163\" height=\"891\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/17-syms.png 1163w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/17-syms-300x230.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/17-syms-768x588.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/17-syms-1024x785.png 1024w\" sizes=\"(max-width: 1163px) 100vw, 1163px\" \/><\/li>\n<li>Now you can try debugging the project, however VisualKernel will normally fail to load the module because the insmod tool is located in <strong>\/sbin<\/strong> that is not listed in the regular PATH variable:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-345\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/18-noinsmod.png\" alt=\"\" width=\"1083\" height=\"824\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/18-noinsmod.png 1083w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/18-noinsmod-300x228.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/18-noinsmod-768x584.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/18-noinsmod-1024x779.png 1024w\" sizes=\"(max-width: 1083px) 100vw, 1083px\" \/><\/li>\n<li>You can work around it by running &#8220;echo $PATH&#8221; from an interactive SSH or serial port session on the target and setting it via Tools-&gt;VisualKernel-&gt;SSH Host Manager-&gt;Host-wide settings:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-346\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/19-path.png\" alt=\"\" width=\"720\" height=\"548\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/19-path.png 720w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/19-path-300x228.png 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/li>\n<li>Now you can start debugging and VisualKernel will be able to load your kernel module and handle breakpoints inside it:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-347\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/20-bkpt.png\" alt=\"\" width=\"1083\" height=\"824\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/20-bkpt.png 1083w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/20-bkpt-300x228.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/20-bkpt-768x584.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/20-bkpt-1024x779.png 1024w\" sizes=\"(max-width: 1083px) 100vw, 1083px\" \/><\/li>\n<li>Use the GDB Session window to load\/unload the module as you go:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-348\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/21-unload.png\" alt=\"\" width=\"1083\" height=\"824\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/21-unload.png 1083w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/21-unload-300x228.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/21-unload-768x584.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2019\/03\/21-unload-1024x779.png 1024w\" sizes=\"(max-width: 1083px) 100vw, 1083px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to create, edit and debug a basic kernel module for a Linux kernel built with Petalinux\u00a0that<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[50,20,48],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/326"}],"collection":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":4,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/326\/revisions\/372"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/media?parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/categories?post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/tags?post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}