summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba3992e)
raw | patch | inline | side by side (parent: ba3992e)
author | Nick Saulnier <nsaulnier@ti.com> | |
Wed, 25 Sep 2019 21:00:13 +0000 (16:00 -0500) | ||
committer | Nick Saulnier <nsaulnier@ti.com> | |
Tue, 10 Dec 2019 04:48:46 +0000 (22:48 -0600) |
The labs directory is now divided into two sets of labs:
* The PRU Hands-on Labs are currently unchanged. The Hands-on Labs
guide customers through using the PRU with GPI/GPO signals, and using
the RPMsg driver to communicate between a Linux ARM core and the PRU
The Hands-on Labs apply specifically to the AM335x Beaglebone Black
with a PRU cape.
* The PRU Getting Started Labs are a new set of labs described below.
The PRU Getting Started Labs apply to the PRU on AM335x, AM437x, AM57xx, and
AM65xx.
The Getting Started Labs demonstrate how to compile PRU firmware that is written
in C, assembly, or mixed C and assembly. Steps are provided for compiling the
firmware from Linux, or from Code Composer Studio (CCS).
The Getting Started Labs also demonstrate how to initialize the PRU from CCS,
another processor core running Linux, or another processor core running RTOS.
The PRU Getting Started Lab instructions will be located in the Processor SDK
Linux documentation, section "PRU-ICSS / PRU_ICSSG":
http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_PRU-ICSS_PRU_ICSSG.html
Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
* The PRU Hands-on Labs are currently unchanged. The Hands-on Labs
guide customers through using the PRU with GPI/GPO signals, and using
the RPMsg driver to communicate between a Linux ARM core and the PRU
The Hands-on Labs apply specifically to the AM335x Beaglebone Black
with a PRU cape.
* The PRU Getting Started Labs are a new set of labs described below.
The PRU Getting Started Labs apply to the PRU on AM335x, AM437x, AM57xx, and
AM65xx.
The Getting Started Labs demonstrate how to compile PRU firmware that is written
in C, assembly, or mixed C and assembly. Steps are provided for compiling the
firmware from Linux, or from Code Composer Studio (CCS).
The Getting Started Labs also demonstrate how to initialize the PRU from CCS,
another processor core running Linux, or another processor core running RTOS.
The PRU Getting Started Lab instructions will be located in the Processor SDK
Linux documentation, section "PRU-ICSS / PRU_ICSSG":
http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_PRU-ICSS_PRU_ICSSG.html
Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
238 files changed:
diff --git a/labs/Getting_Started_Labs/PRU_FROM_RTOS/ASM1.h b/labs/Getting_Started_Labs/PRU_FROM_RTOS/ASM1.h
--- /dev/null
@@ -0,0 +1,11 @@
+const uint32_t ASM1_image_0[] = {
+0x240000fe,
+0x240000e1,
+0x150ffefe,
+0x2405ffe0,
+0x0910e0e0,
+0x2405ffc1,
+0x0501e0e0,
+0x6f00e0ff,
+0x21000200};
+
diff --git a/labs/Getting_Started_Labs/PRU_FROM_RTOS/app335.cfg b/labs/Getting_Started_Labs/PRU_FROM_RTOS/app335.cfg
--- /dev/null
@@ -0,0 +1,135 @@
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Error = xdc.useModule('xdc.runtime.Error');
+var Log = xdc.useModule('xdc.runtime.Log');
+var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
+var Main = xdc.useModule('xdc.runtime.Main');
+var Memory = xdc.useModule('xdc.runtime.Memory')
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
+var System = xdc.useModule('xdc.runtime.System');
+var Text = xdc.useModule('xdc.runtime.Text');
+
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+var Swi = xdc.useModule('ti.sysbios.knl.Swi');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
+var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
+
+/*
+ * Uncomment this line to globally disable Asserts.
+ * All modules inherit the default from the 'Defaults' module. You
+ * can override these defaults on a per-module basis using Module.common$.
+ * Disabling Asserts will save code space and improve runtime performance.
+Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
+ */
+
+/*
+ * Uncomment this line to keep module names from being loaded on the target.
+ * The module name strings are placed in the .const section. Setting this
+ * parameter to false will save space in the .const section. Error and
+ * Assert messages will contain an "unknown module" prefix instead
+ * of the actual module name.
+Defaults.common$.namedModule = false;
+ */
+
+/*
+ * Minimize exit handler array in System. The System module includes
+ * an array of functions that are registered with System_atexit() to be
+ * called by System_exit().
+ */
+System.maxAtexitHandlers = 4;
+
+/*
+ * Uncomment this line to disable the Error print function.
+ * We lose error information when this is disabled since the errors are
+ * not printed. Disabling the raiseHook will save some code space if
+ * your app is not using System_printf() since the Error_print() function
+ * calls System_printf().
+Error.raiseHook = null;
+ */
+
+/*
+ * Uncomment this line to keep Error, Assert, and Log strings from being
+ * loaded on the target. These strings are placed in the .const section.
+ * Setting this parameter to false will save space in the .const section.
+ * Error, Assert and Log message will print raw ids and args instead of
+ * a formatted message.
+Text.isLoaded = false;
+ */
+
+/*
+ * Uncomment this line to disable the output of characters by SysMin
+ * when the program exits. SysMin writes characters to a circular buffer.
+ * This buffer can be viewed using the SysMin Output view in ROV.
+SysMin.flushAtExit = false;
+ */
+
+/*
+ * The BIOS module will create the default heap for the system.
+ * Specify the size of this default heap.
+ */
+BIOS.heapSize = 0x1000;
+
+/*
+ * Build a custom SYS/BIOS library from sources.
+ */
+BIOS.libType = BIOS.LibType_Custom;
+
+/* System stack size (used by ISRs and Swis) */
+Program.stack = 0x2000;
+
+/* Circular buffer size for System_printf() */
+SysMin.bufSize = 0x200;
+
+/*
+ * Create and install logger for the whole system
+ */
+var loggerBufParams = new LoggerBuf.Params();
+loggerBufParams.numEntries = 16;
+var logger0 = LoggerBuf.create(loggerBufParams);
+Defaults.common$.logger = logger0;
+Main.common$.diags_INFO = Diags.ALWAYS_ON;
+
+var socType = "am335x";
+
+/* Load the PRUSS package */
+var Pruss = xdc.loadPackage('ti.drv.pruss');
+Pruss.Settings.socType = socType;
+
+/* Load the uart package */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
+
+/*use CSL package*/
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
+
+/* Load the board package */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "bbbAM335x";
+
+var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
+Mmu.enableMMU = true;
+
+/* Force peripheral section to be NON cacheable strongly-ordered memory */
+var peripheralAttrs = {
+ type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
+ tex: 1,
+ bufferable : false, // bufferable
+ cacheable : false, // cacheable
+ shareable : false, // shareable
+ noexecute : true, // not executable
+};
+
+
+/* Define the base address of the 1 Meg page the peripheral resides in. */
+var peripheralBaseAddr = 0x4A300000;
+
+/* Configure the corresponding MMU page descriptor accordingly */
+Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
+ peripheralBaseAddr,
+ peripheralAttrs);
+
+System.SupportProxy = SysMin;
+
diff --git a/labs/Getting_Started_Labs/PRU_FROM_RTOS/app437.cfg b/labs/Getting_Started_Labs/PRU_FROM_RTOS/app437.cfg
--- /dev/null
@@ -0,0 +1,132 @@
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Error = xdc.useModule('xdc.runtime.Error');
+var Log = xdc.useModule('xdc.runtime.Log');
+var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
+var Main = xdc.useModule('xdc.runtime.Main');
+var Memory = xdc.useModule('xdc.runtime.Memory')
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
+var System = xdc.useModule('xdc.runtime.System');
+var Text = xdc.useModule('xdc.runtime.Text');
+
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+var Swi = xdc.useModule('ti.sysbios.knl.Swi');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
+var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
+
+var socType = "am437x";
+
+/*
+ * Uncomment this line to globally disable Asserts.
+ * All modules inherit the default from the 'Defaults' module. You
+ * can override these defaults on a per-module basis using Module.common$.
+ * Disabling Asserts will save code space and improve runtime performance.
+Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
+ */
+
+/*
+ * Uncomment this line to keep module names from being loaded on the target.
+ * The module name strings are placed in the .const section. Setting this
+ * parameter to false will save space in the .const section. Error and
+ * Assert messages will contain an "unknown module" prefix instead
+ * of the actual module name.
+Defaults.common$.namedModule = false;
+ */
+
+/*
+ * Minimize exit handler array in System. The System module includes
+ * an array of functions that are registered with System_atexit() to be
+ * called by System_exit().
+ */
+System.maxAtexitHandlers = 4;
+
+/*
+ * Uncomment this line to disable the Error print function.
+ * We lose error information when this is disabled since the errors are
+ * not printed. Disabling the raiseHook will save some code space if
+ * your app is not using System_printf() since the Error_print() function
+ * calls System_printf().
+Error.raiseHook = null;
+ */
+
+/*
+ * Uncomment this line to keep Error, Assert, and Log strings from being
+ * loaded on the target. These strings are placed in the .const section.
+ * Setting this parameter to false will save space in the .const section.
+ * Error, Assert and Log message will print raw ids and args instead of
+ * a formatted message.
+Text.isLoaded = false;
+ */
+
+/*
+ * Uncomment this line to disable the output of characters by SysMin
+ * when the program exits. SysMin writes characters to a circular buffer.
+ * This buffer can be viewed using the SysMin Output view in ROV.
+SysMin.flushAtExit = false;
+ */
+
+/*
+ * The BIOS module will create the default heap for the system.
+ * Specify the size of this default heap.
+ */
+BIOS.heapSize = 0x1000;
+
+/*
+ * Build a custom SYS/BIOS library from sources.
+ */
+BIOS.libType = BIOS.LibType_Custom;
+
+/* System stack size (used by ISRs and Swis) */
+Program.stack = 0x2000;
+
+/* Circular buffer size for System_printf() */
+SysMin.bufSize = 0x200;
+
+/*
+ * Create and install logger for the whole system
+ */
+var loggerBufParams = new LoggerBuf.Params();
+loggerBufParams.numEntries = 16;
+var logger0 = LoggerBuf.create(loggerBufParams);
+Defaults.common$.logger = logger0;
+Main.common$.diags_INFO = Diags.ALWAYS_ON;
+
+/* Load the PRUSS package */
+var Pruss = xdc.loadPackage('ti.drv.pruss');
+Pruss.Settings.socType = socType;
+
+/* Load the uart package */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
+
+/* Load the board package */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "idkAM437x";
+
+var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
+Mmu.enableMMU = true;
+
+var peripheralAttrs = {
+ type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
+ tex: 0,
+ bufferable : false, // bufferable
+ cacheable : false, // cacheable
+ shareable : false, // shareable
+ noexecute : true, // not executable
+};
+
+
+
+
+/* Define the base address of the 1 Meg page the peripheral resides in. */
+var peripheralBaseAddr = 0x54400000;
+
+/* Configure the corresponding MMU page descriptor accordingly */
+Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
+ peripheralBaseAddr,
+ peripheralAttrs);
+
+System.SupportProxy = SysMin;
+
diff --git a/labs/Getting_Started_Labs/PRU_FROM_RTOS/app572.cfg b/labs/Getting_Started_Labs/PRU_FROM_RTOS/app572.cfg
--- /dev/null
@@ -0,0 +1,221 @@
+/**
+ * \file pruss_arm_wSoCLib.cfg
+ *
+ * \brief Sysbios config file for pruss example project on AM572X IDK EVM.
+ *
+ */
+
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+/* ================ General configuration ================ */
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Error = xdc.useModule('xdc.runtime.Error');
+var Log = xdc.useModule('xdc.runtime.Log');
+var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
+var Main = xdc.useModule('xdc.runtime.Main');
+var Memory = xdc.useModule('xdc.runtime.Memory')
+var System = xdc.useModule('xdc.runtime.System');
+var Text = xdc.useModule('xdc.runtime.Text');
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+var Swi = xdc.useModule('ti.sysbios.knl.Swi');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
+var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
+var InitXbar = xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
+SysStd = xdc.useModule('xdc.runtime.SysStd');
+var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
+var ti_sysbios_family_arm_gic_Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
+var Program = xdc.useModule("xdc.cfg.Program");
+
+/*
+ * Program.argSize sets the size of the .args section.
+ * The examples don't use command line args so argSize is set to 0.
+ */
+Program.argSize = 0x0;
+
+/* System stack size (used by ISRs and Swis) */
+Program.stack = 0x20000;
+
+/*
+ * Uncomment this line to globally disable Asserts.
+ * All modules inherit the default from the 'Defaults' module. You
+ * can override these defaults on a per-module basis using Module.common$.
+ * Disabling Asserts will save code space and improve runtime performance.
+Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
+ */
+
+/*
+ * Uncomment this line to keep module names from being loaded on the target.
+ * The module name strings are placed in the .const section. Setting this
+ * parameter to false will save space in the .const section. Error and
+ * Assert messages will contain an "unknown module" prefix instead
+ * of the actual module name.
+Defaults.common$.namedModule = false;
+ */
+
+/*
+ * Minimize exit handler array in System. The System module includes
+ * an array of functions that are registered with System_atexit() to be
+ * called by System_exit().
+ */
+/*System.maxAtexitHandlers = 4;*/
+
+/*
+ * Uncomment this line to disable the Error print function.
+ * We lose error information when this is disabled since the errors are
+ * not printed. Disabling the raiseHook will save some code space if
+ * your app is not using System_printf() since the Error_print() function
+ * calls System_printf().
+Error.raiseHook = null;
+ */
+
+/*
+ * Uncomment this line to keep Error, Assert, and Log strings from being
+ * loaded on the target. These strings are placed in the .const section.
+ * Setting this parameter to false will save space in the .const section.
+ * Error, Assert and Log message will print raw ids and args instead of
+ * a formatted message.
+Text.isLoaded = false;
+ */
+
+/*
+ * Create and install logger for the whole system
+ */
+var loggerBufParams = new LoggerBuf.Params();
+loggerBufParams.numEntries = 16;
+var logger0 = LoggerBuf.create(loggerBufParams);
+Defaults.common$.logger = logger0;
+Main.common$.diags_INFO = Diags.ALWAYS_ON;
+
+/* ================ BIOS configuration ================ */
+
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+/*
+ * Build a custom SYS/BIOS library from sources.
+ */
+BIOS.libType = BIOS.LibType_Custom;
+
+/*
+ * The BIOS module will create the default heap for the system.
+ * Specify the size of this default heap.
+ */
+BIOS.heapSize = 0x2000;
+
+/* ================ Task configuration ================ */
+
+var taskParams = new Task.Params();
+taskParams.instance.name = "patchTask";
+taskParams.stackSize = 1024;
+//Program.global.patchTask = Task.create("&eventwait", taskParams);
+
+var taskParams2 = new Task.Params();
+taskParams2.instance.name = "patchTask2";
+taskParams2.stackSize = 1024;
+//Program.global.patchTask2 = Task.create("&eventwait2", taskParams2);
+
+/* Define and add one Task Hook Set */
+Task.addHookSet({
+ registerFxn: '&TaskRegisterId',
+ switchFxn: '&mySwitch',
+});
+
+/* ================ Driver configuration ================ */
+var socType = "am572x";
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
+
+/* Load the OSAL package */
+var osType = "tirtos"
+var Osal = xdc.useModule('ti.osal.Settings');
+Osal.osType = osType;
+Osal.socType = socType;
+
+/* Load Profiling package */
+var Utils = xdc.loadPackage('ti.utils.profiling');
+
+/* Load the pruss package */
+var Pruss = xdc.loadPackage('ti.drv.pruss');
+Pruss.Settings.enableProfiling = true;
+Pruss.Settings.socType = socType;
+
+/* Load the UART package */
+var UART = xdc.loadPackage('ti.drv.uart');
+
+/* Load the I2C package */
+var I2C = xdc.loadPackage('ti.drv.i2c');
+I2C.Settings.socType = socType;
+
+/* Load the Board package and set the board name */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "idkAM572x";
+
+/* ================ Cache and MMU configuration ================ */
+
+var Cache1 = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
+var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
+
+/* Enable the cache */
+Cache1.enableCache = true;
+
+/* Enable the MMU (Required for L1 data caching) */
+Mmu.enableMMU = true;
+
+var attrs = new Mmu.DescriptorAttrs();
+Mmu.initDescAttrsMeta(attrs);
+attrs.type = Mmu.DescriptorType_BLOCK;
+attrs.noExecute = true;
+attrs.accPerm = 0; // R/W at PL1
+attrs.attrIndx = 4; // Use MAIR0 Byte2
+Mmu.setMAIRMeta(4, 0x04);
+Mmu.setSecondLevelDescMeta(0x43200000, 0x43200000, attrs);
+
+/* Set IO Delay configuration areas as non-cache */
+attrs.attrIndx = 1;
+Mmu.setSecondLevelDescMeta(0x4844a000, 0x4844a000, attrs);
+Mmu.setSecondLevelDescMeta(0x4ae07d00, 0x4ae07d00, attrs);
+
+var attrs1 = new Mmu.DescriptorAttrs();
+Mmu.initDescAttrsMeta(attrs1);
+attrs1.type = Mmu.DescriptorType_BLOCK;
+attrs1.noExecute = true;
+attrs1.accPerm = 0; // R/W at PL1
+attrs1.attrIndx = 4; // Use MAIR0 Byte2
+Mmu.setMAIRMeta(4, 0x04);
+Mmu.setSecondLevelDescMeta(0x4b200000, 0x4b200000, attrs1);
+
+/* ================ Memory sections configuration ================ */
+Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
+Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
+
diff --git a/labs/Getting_Started_Labs/PRU_FROM_RTOS/main.c b/labs/Getting_Started_Labs/PRU_FROM_RTOS/main.c
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * ======== main.c ========
+ */
+
+#include <xdc/std.h>
+
+#include <xdc/runtime/Error.h>
+#include <xdc/runtime/System.h>
+
+#include <ti/sysbios/BIOS.h>
+
+#include <ti/sysbios/knl/Task.h>
+
+/* UART Header files */
+#include <ti/drv/uart/UART.h>
+#include <ti/drv/uart/UART_stdio.h>
+
+#include <ti/drv/uart/test/src/UART_board.h>
+#include <ti/drv/pruss/pruicss.h>
+#include <ti/drv/pruss/soc/pruicss_v1.h>
+#include <ti/drv/pruss/test/src/test_pruss_intc_mapping.h>
+
+
+#include "ASM1.h"
+
+
+// Set parameters to change PRU-ICSS Module [1 on the AM335X, 1 or 2 on the AM437X or AM572X] and PRU core [0 or 1]
+int pruicss_num = 1, pru_core_num = 0;
+
+PRUICSS_Handle PruHandle = NULL;
+
+
+/*
+ * ======== taskFxn ========
+ */
+Void taskFxn(UArg a0, UArg a1){
+ PRUICSS_Config *cfg;
+
+ int32_t ret = PRUICSS_socGetInitCfg(&cfg);
+ if (ret != PRUICSS_RETURN_SUCCESS)
+ {
+ return;
+ }
+ PruHandle = PRUICSS_create(cfg, pruicss_num);
+
+
+ for(pru_core_num = PRUICCSS_PRU0; pru_core_num <= PRUICCSS_PRU1;pru_core_num++)
+ {
+
+ PRUICSS_setPRUBuffer(PruHandle,pru_core_num, (void*)ASM1_image_0, sizeof(ASM1_image_0));
+ PRUICSS_pruExecProgram(PruHandle,pru_core_num);
+ }
+}
+
+/* ======== main ========
+ */
+int main(void)
+{
+
+ Task_Handle task;
+ Error_Block eb;
+ Task_Params taskParams;
+
+ //Board_initCfg boardCfg = BOARD_INIT_MODULE_CLOCK;
+ //Board_init(boardCfg);
+
+
+
+ Error_init(&eb);
+ Task_Params_init(&taskParams);
+ taskParams.instance->name = (char*)"taskFxn";
+ task = Task_create(taskFxn, &taskParams, &eb);
+ if (task == NULL) {
+
+ BIOS_exit(0);
+ }
+
+ BIOS_start();
+ return 0;
+
+
+}
diff --git a/labs/Getting_Started_Labs/ReadMe.txt b/labs/Getting_Started_Labs/ReadMe.txt
--- /dev/null
@@ -0,0 +1,20 @@
+Programmable Real-time Unit (PRU) Software Support Package
+------------------------------------------------------------
+============================================================
+Getting Started Labs
+============================================================
+
+For documentation on the Getting Started Labs, please reference
+the Processor SDK Linux documentation, section "PRU-ICSS / PRU_ICSSG"
+http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_PRU-ICSS_PRU_ICSSG.html
+
+The PRU Getting Started Labs apply to the PRU on AM335x, AM437x, AM57xx, and
+AM65xx.
+
+The Getting Started Labs demonstrate how to compile PRU firmware that is written
+in C, assembly, or mixed C and assembly. Steps are provided for compiling the
+firmware from Linux, or from Code Composer Studio (CCS).
+
+The Getting Started Labs also demonstrate how to initialize the PRU from CCS,
+another processor core running Linux, another processor core running RTOS, or
+another processor core that runs bare metal code (no OS).
diff --git a/labs/Getting_Started_Labs/assembly_code/main.asm b/labs/Getting_Started_Labs/assembly_code/main.asm
--- /dev/null
@@ -0,0 +1,84 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/linker_cmd/AM335x_PRU.cmd b/labs/Getting_Started_Labs/assembly_code/solution/am335x/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_0/linker_cmd/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am335x/AM335x_PRU.cmd
rename from labs/lab_0/linker_cmd/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am335x/AM335x_PRU.cmd
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/Makefile b/labs/Getting_Started_Labs/assembly_code/solution/am335x/Makefile
similarity index 67%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am335x/Makefile
index f4dda8a8f6fdafaa4dd072dbd6d70d8249c3312a..cc4d128524acb5f0e49d2cb842421c162ec0c298 100644 (file)
rename from labs/lab_6/solution/PRU_RPMsg_LED0/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am335x/Makefile
index f4dda8a8f6fdafaa4dd072dbd6d70d8249c3312a..cc4d128524acb5f0e49d2cb842421c162ec0c298 100644 (file)
$(error $(ERROR_BODY))
endif
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../../../include --include_path=../../../../include/am335x
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am335x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
TARGET=$(GEN_DIR)/$(PROJ_NAME).out
MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
all: printStart $(TARGET) printEnd
$(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
@echo 'Finished building target: $@'
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
# Invokes the compiler on all c files in the directory to create the object files
$(GEN_DIR)/%.object: %.c
@mkdir -p $(GEN_DIR)
diff --git a/labs/Getting_Started_Labs/assembly_code/solution/am335x/main.asm b/labs/Getting_Started_Labs/assembly_code/solution/am335x/main.asm
--- /dev/null
@@ -0,0 +1,92 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+y .set 2\r
+z .set 0\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+y_register .set r21\r
+z_register .set r22\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+ zero &y_register, 32 ; Clear register 21\r
+ zero &z_register, 32 ; Clear register 22\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+ ldi y_register, y ; load y value into register r21\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+ add z_register, x_register, y_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/linker_cmd/AM437x_PRU_SS1.cmd b/labs/Getting_Started_Labs/assembly_code/solution/am437x/AM437x_PRU_SS1.cmd
similarity index 100%
rename from labs/lab_0/linker_cmd/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/AM437x_PRU_SS1.cmd
rename from labs/lab_0/linker_cmd/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/AM437x_PRU_SS1.cmd
diff --git a/labs/lab_0/solution/am437x/Makefile b/labs/Getting_Started_Labs/assembly_code/solution/am437x/Makefile
similarity index 67%
rename from labs/lab_0/solution/am437x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/Makefile
index 9e446002bf01c07855c7a772305c7328bdc0ff2e..52bd32e3b2c92543ffab1d5d87836cb23478ca02 100644 (file)
rename from labs/lab_0/solution/am437x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/Makefile
index 9e446002bf01c07855c7a772305c7328bdc0ff2e..52bd32e3b2c92543ffab1d5d87836cb23478ca02 100644 (file)
$(error $(ERROR_BODY))
endif
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
-LIBS=--library=../../../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../../../include --include_path=../../../../include/am437x
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am437x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
TARGET=$(GEN_DIR)/$(PROJ_NAME).out
MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
all: printStart $(TARGET) printEnd
$(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
@echo 'Finished building target: $@'
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
# Invokes the compiler on all c files in the directory to create the object files
$(GEN_DIR)/%.object: %.c
@mkdir -p $(GEN_DIR)
diff --git a/labs/Getting_Started_Labs/assembly_code/solution/am437x/main.asm b/labs/Getting_Started_Labs/assembly_code/solution/am437x/main.asm
--- /dev/null
@@ -0,0 +1,92 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+y .set 2\r
+z .set 0\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+y_register .set r21\r
+z_register .set r22\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+ zero &y_register, 32 ; Clear register 21\r
+ zero &z_register, 32 ; Clear register 22\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+ ldi y_register, y ; load y value into register r21\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+ add z_register, x_register, y_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/solution/am335x/resource_table_empty.h b/labs/Getting_Started_Labs/assembly_code/solution/am437x/resource_table_empty.h
similarity index 100%
rename from labs/lab_0/solution/am335x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/resource_table_empty.h
rename from labs/lab_0/solution/am335x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am437x/resource_table_empty.h
diff --git a/labs/lab_0/solution/am572x/AM57xx_PRU.cmd b/labs/Getting_Started_Labs/assembly_code/solution/am572x/AM57xx_PRU.cmd
similarity index 100%
rename from labs/lab_0/solution/am572x/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/AM57xx_PRU.cmd
rename from labs/lab_0/solution/am572x/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/AM57xx_PRU.cmd
diff --git a/labs/lab_0/solution/am572x/Makefile b/labs/Getting_Started_Labs/assembly_code/solution/am572x/Makefile
similarity index 67%
rename from labs/lab_0/solution/am572x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/Makefile
index e891dbb805ded00fe3833d74e75c17fdae9f5489..0e6fd5205a184d53f076dd4399a9af2b2249b300 100644 (file)
rename from labs/lab_0/solution/am572x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/Makefile
index e891dbb805ded00fe3833d74e75c17fdae9f5489..0e6fd5205a184d53f076dd4399a9af2b2249b300 100644 (file)
$(error $(ERROR_BODY))
endif
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM57xx_PRU.cmd
-LIBS=--library=../../../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../../../include --include_path=../../../../include/am572x_2_0
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am572x_2_0
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
TARGET=$(GEN_DIR)/$(PROJ_NAME).out
MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
all: printStart $(TARGET) printEnd
$(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
@echo 'Finished building target: $@'
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
# Invokes the compiler on all c files in the directory to create the object files
$(GEN_DIR)/%.object: %.c
@mkdir -p $(GEN_DIR)
diff --git a/labs/Getting_Started_Labs/assembly_code/solution/am572x/main.asm b/labs/Getting_Started_Labs/assembly_code/solution/am572x/main.asm
--- /dev/null
@@ -0,0 +1,92 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+y .set 2\r
+z .set 0\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+y_register .set r21\r
+z_register .set r22\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+ zero &y_register, 32 ; Clear register 21\r
+ zero &z_register, 32 ; Clear register 22\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+ ldi y_register, y ; load y value into register r21\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+ add z_register, x_register, y_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/solution/am437x/resource_table_empty.h b/labs/Getting_Started_Labs/assembly_code/solution/am572x/resource_table_empty.h
similarity index 100%
rename from labs/lab_0/solution/am437x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/resource_table_empty.h
rename from labs/lab_0/solution/am437x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am572x/resource_table_empty.h
diff --git a/labs/lab_0/linker_cmd/AM65x_PRU0.cmd b/labs/Getting_Started_Labs/assembly_code/solution/am65x/AM65x_PRU0.cmd
similarity index 100%
rename from labs/lab_0/linker_cmd/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/AM65x_PRU0.cmd
rename from labs/lab_0/linker_cmd/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/AM65x_PRU0.cmd
diff --git a/labs/lab_0/solution/am65x/Makefile b/labs/Getting_Started_Labs/assembly_code/solution/am65x/Makefile
similarity index 67%
rename from labs/lab_0/solution/am65x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/Makefile
index debee3afc5a1be9a220de214c5e1c72944d5de77..d55868511b294f591a788942059cddf24e27015e 100644 (file)
rename from labs/lab_0/solution/am65x/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/Makefile
index debee3afc5a1be9a220de214c5e1c72944d5de77..d55868511b294f591a788942059cddf24e27015e 100644 (file)
$(error $(ERROR_BODY))
endif
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM65x_PRU0.cmd
-LIBS=--library=../../../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../../../include --include_path=../../../../include/am65x
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am65x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
TARGET=$(GEN_DIR)/$(PROJ_NAME).out
MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
all: printStart $(TARGET) printEnd
$(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
@echo 'Finished building target: $@'
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
# Invokes the compiler on all c files in the directory to create the object files
$(GEN_DIR)/%.object: %.c
@mkdir -p $(GEN_DIR)
diff --git a/labs/Getting_Started_Labs/assembly_code/solution/am65x/main.asm b/labs/Getting_Started_Labs/assembly_code/solution/am65x/main.asm
--- /dev/null
@@ -0,0 +1,92 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+y .set 2\r
+z .set 0\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+y_register .set r21\r
+z_register .set r22\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+ zero &y_register, 32 ; Clear register 21\r
+ zero &z_register, 32 ; Clear register 22\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+ ldi y_register, y ; load y value into register r21\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+ add z_register, x_register, y_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/solution/am572x/resource_table_empty.h b/labs/Getting_Started_Labs/assembly_code/solution/am65x/resource_table_empty.h
similarity index 100%
rename from labs/lab_0/solution/am572x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/resource_table_empty.h
rename from labs/lab_0/solution/am572x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/am65x/resource_table_empty.h
diff --git a/labs/lab_0/linker_cmd/K2G_PRU.cmd b/labs/Getting_Started_Labs/assembly_code/solution/k2g/K2G_PRU.cmd
similarity index 100%
rename from labs/lab_0/linker_cmd/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/K2G_PRU.cmd
rename from labs/lab_0/linker_cmd/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/K2G_PRU.cmd
diff --git a/labs/lab_0/solution/k2g/Makefile b/labs/Getting_Started_Labs/assembly_code/solution/k2g/Makefile
similarity index 67%
rename from labs/lab_0/solution/k2g/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/Makefile
index c8de0cc5bafc92d12fb12c911755e09c966ede39..9dec764375163138f025701f173ee5d6f88e0a27 100644 (file)
rename from labs/lab_0/solution/k2g/Makefile
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/Makefile
index c8de0cc5bafc92d12fb12c911755e09c966ede39..9dec764375163138f025701f173ee5d6f88e0a27 100644 (file)
$(error $(ERROR_BODY))
endif
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./K2G_PRU.cmd
-LIBS=--library=../../../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../../../include --include_path=../../../../include/k2g
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/k2g
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
TARGET=$(GEN_DIR)/$(PROJ_NAME).out
MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
all: printStart $(TARGET) printEnd
$(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
@echo 'Finished building target: $@'
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
# Invokes the compiler on all c files in the directory to create the object files
$(GEN_DIR)/%.object: %.c
@mkdir -p $(GEN_DIR)
diff --git a/labs/Getting_Started_Labs/assembly_code/solution/k2g/main.asm b/labs/Getting_Started_Labs/assembly_code/solution/k2g/main.asm
--- /dev/null
@@ -0,0 +1,92 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/\r
+;\r
+; Redistribution and use in source and binary forms, with or without\r
+; modification, are permitted provided that the following conditions\r
+; are met:\r
+;\r
+; * Redistributions of source code must retain the above copyright\r
+; notice, this list of conditions and the following disclaimer.\r
+;\r
+; * Redistributions in binary form must reproduce the above copyright\r
+; notice, this list of conditions and the following disclaimer in the\r
+; documentation and/or other materials provided with the\r
+; distribution.\r
+;\r
+; * Neither the name of Texas Instruments Incorporated nor the names of\r
+; its contributors may be used to endorse or promote products derived\r
+; from this software without specific prior written permission.\r
+;\r
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+; Resource table needed for remoteproc Linux driver\r
+ .global ||pru_remoteproc_ResourceTable||\r
+ .sect ".resource_table:retain", RW\r
+ .retain\r
+ .align 1\r
+ .elfsym ||pru_remoteproc_ResourceTable||,SYM_SIZE(20)\r
+||pru_remoteproc_ResourceTable||:\r
+ .bits 1,32 ; pru_remoteproc_ResourceTable.base.ver @ 0\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.num @ 32\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[0] @ 64\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.base.reserved[1] @ 96\r
+ .bits 0,32 ; pru_remoteproc_ResourceTable.offset[0] @ 128\r
+\r
+\r
+;*****************************************************************************\r
+; Define x, y, z values. Define storage registers\r
+;*****************************************************************************\r
+\r
+; TODO: define y and z\r
+x .set 1\r
+y .set 2\r
+z .set 0\r
+\r
+; TODO: define y_register and z_register\r
+x_register .set r20\r
+y_register .set r21\r
+z_register .set r22\r
+\r
+;*****************************************************************************\r
+; Main Loop\r
+;*****************************************************************************\r
+ .sect ".text:main"\r
+ .clink\r
+ .global ||main||\r
+\r
+||main||:\r
+\r
+ ; TODO: clear y_register and z_register\r
+ zero &x_register, 32 ; Clear register 20\r
+ zero &y_register, 32 ; Clear register 21\r
+ zero &z_register, 32 ; Clear register 22\r
+\r
+while_true:\r
+\r
+ ; TODO: load y value into y_register\r
+ ldi x_register, x ; load x value into register r20\r
+ ldi y_register, y ; load y value into register r21\r
+\r
+ ; TODO: add x_register and y_register. Store the result in z_register\r
+ add z_register, x_register, y_register\r
+\r
+\r
+ ; jump to continue refreshing z_register value\r
+ jmp while_true\r
+\r
+ ; the jump prevents us from getting to halt\r
+ halt ; Halt PRU execution\r
+\r
+;*****************************************************************************\r
+; END\r
+;*****************************************************************************\r
diff --git a/labs/lab_0/solution/am65x/resource_table_empty.h b/labs/Getting_Started_Labs/assembly_code/solution/k2g/resource_table_empty.h
similarity index 100%
rename from labs/lab_0/solution/am65x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/resource_table_empty.h
rename from labs/lab_0/solution/am65x/resource_table_empty.h
rename to labs/Getting_Started_Labs/assembly_code/solution/k2g/resource_table_empty.h
diff --git a/labs/Getting_Started_Labs/c_and_assembly/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/assm_add.asm
--- /dev/null
@@ -0,0 +1,53 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/main.c b/labs/Getting_Started_Labs/c_and_assembly/main.c
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_0/solution/k2g/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/resource_table_empty.h
similarity index 100%
rename from labs/lab_0/solution/k2g/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/resource_table_empty.h
rename from labs/lab_0/solution/k2g/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/resource_table_empty.h
diff --git a/labs/lab_0/solution/am335x/AM335x_PRU.cmd b/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_0/solution/am335x/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am335x/AM335x_PRU.cmd
rename from labs/lab_0/solution/am335x/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am335x/AM335x_PRU.cmd
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/Makefile b/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/assm_add.asm
--- /dev/null
@@ -0,0 +1,54 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+ ADD R14, R14, R15
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/main.c b/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/main.c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = assm_add(x, y);
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/solution/am335x/resource_table_empty.h
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am335x/resource_table_empty.h
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am335x/resource_table_empty.h
diff --git a/labs/lab_0/solution/am437x/AM437x_PRU_SS1.cmd b/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/AM437x_PRU_SS1.cmd
similarity index 100%
rename from labs/lab_0/solution/am437x/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am437x/AM437x_PRU_SS1.cmd
rename from labs/lab_0/solution/am437x/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am437x/AM437x_PRU_SS1.cmd
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/Makefile b/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/assm_add.asm
--- /dev/null
@@ -0,0 +1,54 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+ ADD R14, R14, R15
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/main.c b/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/main.c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = assm_add(x, y);
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/solution/am437x/resource_table_empty.h
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am437x/resource_table_empty.h
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am437x/resource_table_empty.h
diff --git a/labs/lab_5/solution/am572x/PRU_Halt/AM57xx_PRU.cmd b/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/AM57xx_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_Halt/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am572x/AM57xx_PRU.cmd
rename from labs/lab_5/solution/am572x/PRU_Halt/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am572x/AM57xx_PRU.cmd
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/Makefile b/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM57xx_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am572x_2_0
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/assm_add.asm
--- /dev/null
@@ -0,0 +1,54 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+ ADD R14, R14, R15
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/main.c b/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/main.c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = assm_add(x, y);
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_5/solution/am335x/PRU_Halt/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/solution/am572x/resource_table_empty.h
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am572x/resource_table_empty.h
rename from labs/lab_5/solution/am335x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am572x/resource_table_empty.h
diff --git a/labs/lab_0/solution/am65x/AM65x_PRU0.cmd b/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/AM65x_PRU0.cmd
similarity index 100%
rename from labs/lab_0/solution/am65x/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am65x/AM65x_PRU0.cmd
rename from labs/lab_0/solution/am65x/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am65x/AM65x_PRU0.cmd
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/Makefile b/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM65x_PRU0.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am65x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/assm_add.asm
--- /dev/null
@@ -0,0 +1,54 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+ ADD R14, R14, R15
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/main.c b/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/main.c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = assm_add(x, y);
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_5/solution/am437x/PRU_Halt/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/solution/am65x/resource_table_empty.h
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am65x/resource_table_empty.h
rename from labs/lab_5/solution/am437x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/am65x/resource_table_empty.h
diff --git a/labs/lab_0/solution/k2g/K2G_PRU.cmd b/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/K2G_PRU.cmd
similarity index 100%
rename from labs/lab_0/solution/k2g/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/k2g/K2G_PRU.cmd
rename from labs/lab_0/solution/k2g/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_assembly/solution/k2g/K2G_PRU.cmd
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/Makefile b/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./K2G_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/k2g
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/assm_add.asm b/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/assm_add.asm
--- /dev/null
@@ -0,0 +1,54 @@
+; Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+;
+; Redistribution and use in source and binary forms, with or without
+; modification, are permitted provided that the following conditions
+; are met:
+;
+; * Redistributions of source code must retain the above copyright
+; notice, this list of conditions and the following disclaimer.
+;
+; * Redistributions in binary form must reproduce the above copyright
+; notice, this list of conditions and the following disclaimer in the
+; documentation and/or other materials provided with the
+; distribution.
+;
+; * Neither the name of Texas Instruments Incorporated nor the names of
+; its contributors may be used to endorse or promote products derived
+; from this software without specific prior written permission.
+;
+; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+;*****************************************************************************
+; uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+;*****************************************************************************
+ .sect ".text:assm_add"
+ .clink
+ .global ||assm_add||
+
+||assm_add||:
+
+ ; arg1 is in R14, arg2 is in R15
+ ; the return value is stored in R14
+
+ ; TODO: add arg1 and arg2. Store the sum in the return register
+ ADD R14, R14, R15
+
+ ; return from function assm_add
+ JMP r3.w2
+
+;*****************************************************************************
+; END
+;*****************************************************************************
diff --git a/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/main.c b/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/main.c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the external assembly function */
+uint32_t assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = assm_add(x, y);
+
+ /*
+ * TODO: use the assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
diff --git a/labs/lab_5/solution/am572x/PRU_Halt/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_assembly/solution/k2g/resource_table_empty.h
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/k2g/resource_table_empty.h
rename from labs/lab_5/solution/am572x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_assembly/solution/k2g/resource_table_empty.h
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/main.c
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+}
diff --git a/labs/lab_5/solution/am65x/PRU_Halt/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/resource_table_empty.h
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_inline_assembly/resource_table_empty.h
rename from labs/lab_5/solution/am65x/PRU_Halt/resource_table_empty.h
rename to labs/Getting_Started_Labs/c_and_inline_assembly/resource_table_empty.h
diff --git a/labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/AM335x_PRU.cmd
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/AM335x_PRU.cmd
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/Makefile b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/main.c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = inline_assm_add(x, y);
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = inline_assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+ __asm(" ADD r14, r14, r15");
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+ return arg1;
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am335x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/AM437x_PRU_SS1.cmd b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/AM437x_PRU_SS1.cmd
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/AM437x_PRU_SS1.cmd
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/AM437x_PRU_SS1.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/AM437x_PRU_SS1.cmd
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/Makefile b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/main.c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = inline_assm_add(x, y);
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = inline_assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+ __asm(" ADD r14, r14, r15");
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+ return arg1;
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am437x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/AM57xx_PRU.cmd b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/AM57xx_PRU.cmd
--- /dev/null
@@ -0,0 +1,85 @@
+/****************************************************************************/
+/* AM57xx_PRU.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM57xx device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ MCASP3_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ I2C3 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+
+ RSVD1 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ RSVD2 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ RSVD6 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ RSVD9 : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD11 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ RSVD12 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD14 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ RSVD15 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ RSVD16 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ RSVD17 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ RSVD18 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ RSVD19 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ RSVD20 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD22 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ RSVD23 : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+ RSVD29 : org = 0x49000000 len = 0x00001098 CREGISTER=29
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/Makefile b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM57xx_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am572x_2_0
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/main.c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = inline_assm_add(x, y);
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = inline_assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+ __asm(" ADD r14, r14, r15");
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+ return arg1;
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am572x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/AM65x_PRU0.cmd b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/AM65x_PRU0.cmd
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * AM65x_PRU0.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x PRU0 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 16kB PRU Instruction RAM */
+ PRU_IMEM : org = 0x00000000 len = 0x00004000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to reserve the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding RTU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_EXT : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_EXT : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_EXT : org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_EXT : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_PRU0 : org = 0x0002A000 len = 0x0000004C CREGISTER=10
+ PRU0_CTRL : org = 0x00022000 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT0 : org = 0x00008000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_RT_CFG : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* FIXME: Random length of 0x1000 assigned to the below regions */
+ TIMER_MANAGER : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RING_ACCELERATOR: org = 0x70000000 len = 0x00001000 CREGISTER=16
+ INTERRUPT_AGGREGATOR: org = 0x80000000 len = 0x00001000 CREGISTER=17
+ GPMC : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ PCIE : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ UDMA_P : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ ADC : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+
+ /* External Memory */
+ /* Random length of 0x10000 (max len value) assigned to all regions */
+ DDR : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ MSMC : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ R5_RAM : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/Makefile b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM65x_PRU0.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am65x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/main.c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = inline_assm_add(x, y);
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = inline_assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+ __asm(" ADD r14, r14, r15");
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+ return arg1;
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/am65x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/K2G_PRU.cmd b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/K2G_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/K2G_PRU.cmd
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/K2G_PRU.cmd
rename to labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/K2G_PRU.cmd
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/Makefile b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./K2G_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/k2g
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/main.c b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/main.c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/* Declaration of the inline assembly function */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2);
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: use the inline assembly function to add x and y, then
+ * store the sum in z
+ */
+ z = inline_assm_add(x, y);
+
+ /*
+ * TODO: use the inline assembly function to add a and b, then
+ * store the sum in memory location c
+ */
+ c = inline_assm_add(a, b);
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
+/*
+ * inline_assm_add
+ */
+uint32_t inline_assm_add(uint32_t arg1, uint32_t arg2)
+{
+ /*
+ * Function input arguments are stored in R14-R29.
+ * So the 32 bit value in arg1 is stored in R14, and the 32 bit value in
+ * arg2 is stored in R15.
+ *
+ * For more details about how function arguments
+ * are stored in registers, reference the document "PRU Optimizing C/C+
+ * Compiler User's Guide", section "Function Structure and Calling
+ * Conventions"
+ */
+
+ /*
+ * For information about using __asm() to add inline assembly code,
+ * reference the document "PRU Optimizing C/C+ Compiler User's Guide",
+ * section "The __asm Statement".
+ *
+ * Note: You can use the newline and tab characters to place multiple
+ * assembly instructions in a single __asm() call. For example:
+ *
+ * __asm(" assem_instr_1 \n\t assem_instr_2 \n\t assem_instr_3");
+ */
+
+ /*
+ * TODO: add arg1 and arg2
+ */
+ __asm(" ADD r14, r14, r15");
+
+ /*
+ * TODO: return the sum.
+ * Remember that arg1 points to R14 and arg2 points to R15
+ */
+ return arg1;
+}
diff --git a/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/resource_table_empty.h b/labs/Getting_Started_Labs/c_and_inline_assembly/solution/k2g/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
similarity index 72%
rename from labs/lab_0/main.c
rename to labs/Getting_Started_Labs/c_code/main.c
index f122dc93501acfb48a91faa2f166701ca7513c05..dc9be3c7032e60cc1563bab99a0a6fadd9f33f3a 100644 (file)
rename from labs/lab_0/main.c
rename to labs/Getting_Started_Labs/c_code/main.c
index f122dc93501acfb48a91faa2f166701ca7513c05..dc9be3c7032e60cc1563bab99a0a6fadd9f33f3a 100644 (file)
--- a/labs/lab_0/main.c
/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
#include <stdint.h>
#include "resource_table_empty.h"
-/* TODO: define A and B */
-#define C (*((volatile unsigned int *)0x108))
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
/*
* main.c
*/
void main(void)
{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ }
+
+ /* This program will not reach __halt because of the while loop */
__halt();
}
+
diff --git a/labs/Getting_Started_Labs/c_code/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am335x/AM335x_PRU.cmd b/labs/Getting_Started_Labs/c_code/solution/am335x/AM335x_PRU.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM335x_PRU.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM335x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00002000 /* 8kB PRU0 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00003000 CREGISTER=28 /* 12kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCHS0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_code/solution/am335x/Makefile b/labs/Getting_Started_Labs/c_code/solution/am335x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/lab_0/solution/am437x/main.c b/labs/Getting_Started_Labs/c_code/solution/am335x/main.c
similarity index 68%
rename from labs/lab_0/solution/am437x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am335x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
rename from labs/lab_0/solution/am437x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am335x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include <stdint.h>
#include "resource_table_empty.h"
-/* TODO: define A and B */
-#define A (*((volatile unsigned int *)0x100))
-#define B (*((volatile unsigned int *)0x104))
-#define C (*((volatile unsigned int *)0x108))
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
/*
* main.c
*/
void main(void)
{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
- C = A + B;
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+ z = x + y;
- __halt();
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ c = a + b;
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
}
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am335x/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/solution/am335x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am437x/AM437x_PRU_SS1.cmd b/labs/Getting_Started_Labs/c_code/solution/am437x/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_code/solution/am437x/Makefile b/labs/Getting_Started_Labs/c_code/solution/am437x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/lab_0/solution/am572x/main.c b/labs/Getting_Started_Labs/c_code/solution/am437x/main.c
similarity index 68%
rename from labs/lab_0/solution/am572x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am437x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
rename from labs/lab_0/solution/am572x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am437x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include <stdint.h>
#include "resource_table_empty.h"
-/* TODO: define A and B */
-#define A (*((volatile unsigned int *)0x100))
-#define B (*((volatile unsigned int *)0x104))
-#define C (*((volatile unsigned int *)0x108))
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
/*
* main.c
*/
void main(void)
{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
- C = A + B;
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+ z = x + y;
- __halt();
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ c = a + b;
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
}
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am437x/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/solution/am437x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am572x/AM57xx_PRU.cmd b/labs/Getting_Started_Labs/c_code/solution/am572x/AM57xx_PRU.cmd
--- /dev/null
@@ -0,0 +1,85 @@
+/****************************************************************************/
+/* AM57xx_PRU.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM57xx device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ MCASP3_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ I2C3 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+
+ RSVD1 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ RSVD2 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ RSVD6 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ RSVD9 : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD11 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ RSVD12 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD14 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ RSVD15 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ RSVD16 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ RSVD17 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ RSVD18 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ RSVD19 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ RSVD20 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD22 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ RSVD23 : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+ RSVD29 : org = 0x49000000 len = 0x00001098 CREGISTER=29
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_code/solution/am572x/Makefile b/labs/Getting_Started_Labs/c_code/solution/am572x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM57xx_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am572x_2_0
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/lab_0/solution/am335x/main.c b/labs/Getting_Started_Labs/c_code/solution/am572x/main.c
similarity index 68%
rename from labs/lab_0/solution/am335x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am572x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
rename from labs/lab_0/solution/am335x/main.c
rename to labs/Getting_Started_Labs/c_code/solution/am572x/main.c
index e2997cddf2b0d16a3d62cd4ccaed67dd38d16755..6a003e3b1836560edd23c05f3418dd53304cb82c 100644 (file)
/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include <stdint.h>
#include "resource_table_empty.h"
-/* TODO: define A and B */
-#define A (*((volatile unsigned int *)0x100))
-#define B (*((volatile unsigned int *)0x104))
-#define C (*((volatile unsigned int *)0x108))
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
/*
* main.c
*/
void main(void)
{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
- C = A + B;
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+ z = x + y;
- __halt();
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ c = a + b;
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
}
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am572x/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/solution/am572x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am65x/AM65x_PRU0.cmd b/labs/Getting_Started_Labs/c_code/solution/am65x/AM65x_PRU0.cmd
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * AM65x_PRU0.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x PRU0 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 16kB PRU Instruction RAM */
+ PRU_IMEM : org = 0x00000000 len = 0x00004000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to reserve the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding RTU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_EXT : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_EXT : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_EXT : org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_EXT : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_PRU0 : org = 0x0002A000 len = 0x0000004C CREGISTER=10
+ PRU0_CTRL : org = 0x00022000 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT0 : org = 0x00008000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_RT_CFG : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* FIXME: Random length of 0x1000 assigned to the below regions */
+ TIMER_MANAGER : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RING_ACCELERATOR: org = 0x70000000 len = 0x00001000 CREGISTER=16
+ INTERRUPT_AGGREGATOR: org = 0x80000000 len = 0x00001000 CREGISTER=17
+ GPMC : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ PCIE : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ UDMA_P : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ ADC : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+
+ /* External Memory */
+ /* Random length of 0x10000 (max len value) assigned to all regions */
+ DDR : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ MSMC : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ R5_RAM : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_code/solution/am65x/Makefile b/labs/Getting_Started_Labs/c_code/solution/am65x/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM65x_PRU0.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/am65x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am65x/main.c b/labs/Getting_Started_Labs/c_code/solution/am65x/main.c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+ z = x + y;
+
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ c = a + b;
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/am65x/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/solution/am65x/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/k2g/K2G_PRU.cmd b/labs/Getting_Started_Labs/c_code/solution/k2g/K2G_PRU.cmd
--- /dev/null
@@ -0,0 +1,81 @@
+/****************************************************************************/
+/* K2G_PRU.cmd */
+/* Copyright (c) 2016-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on a k2g device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00004000 /* 16kB PRU-ICSS Instruction RAM */
+
+ PAGE 1:
+ /* RAM */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28 /* 64kB Shared RAM */
+
+ MSMC : org = 0x0C000000 len = 0x00100000 CREGISTER=30
+ DDR3A : org = 0x80000000 len = 0x00010000 CREGISTER=31
+
+ /* Peripherals */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_MII_RT : org = 0x00032000 len = 0x00000070 CREGISTER=27
+
+ TIMER_1 : org = 0x02210000 len = 0x00000048 CREGISTER=1
+ I2C0 : org = 0x02530000 len = 0x0000003C CREGISTER=2
+ MMC0 : org = 0x23000000 len = 0x00000300 CREGISTER=5
+ SPI0 : org = 0x21805400 len = 0x00000200 CREGISTER=6
+ MCASP0_DMA : org = 0x21804000 len = 0x00000400 CREGISTER=8
+ NSSUL : org = 0x04000000 len = 0x00040060 CREGISTER=9
+ SEC_MGR : org = 0x02500000 len = 0x00008000 CREGISTER=10
+ UART_1 : org = 0x02531000 len = 0x00000038 CREGISTER=11
+ UART_2 : org = 0x02531400 len = 0x00000038 CREGISTER=12
+ CIC : org = 0x02600000 len = 0x00001510 CREGISTER=13
+ DCAN0_CFG : org = 0x0260B200 len = 0x00000170 CREGISTER=14
+ DCAN1_CFG : org = 0x0260B400 len = 0x00000170 CREGISTER=15
+ SPI1 : org = 0x21805800 len = 0x00000200 CREGISTER=16
+ I2C_1 : org = 0x02530400 len = 0x0000003C CREGISTER=17
+ EPWM_0 : org = 0x021D0000 len = 0x00000044 CREGISTER=18
+ ECAP_0 : org = 0x021D1800 len = 0x00000060 CREGISTER=19
+ SEMAPHORE : org = 0x02640000 len = 0x0000050C CREGISTER=22
+ MMQP_REG5 : org = 0x02A50000 len = 0x00002000 CREGISTER=23
+ EDMA0_CC_CFG : org = 0x02000000 len = 0x00002E98 CREGISTER=29
+
+ RSVD20 : org = 0x000AE000 len = 0x00000001 CREGISTER=20
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/c_code/solution/k2g/Makefile b/labs/Getting_Started_Labs/c_code/solution/k2g/Makefile
--- /dev/null
@@ -0,0 +1,124 @@
+# PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.:
+#(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+#(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+#
+# *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+# order to use the same Makefile
+#(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+
+ifndef PRU_CGT
+define ERROR_BODY
+
+*******************************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2
+(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru
+
+*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
+order to use the same Makefile
+(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+# PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+#(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+#(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+#(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+
+ifndef PRU_SSP
+define ERROR_BODY
+
+*******************************************************************************
+PRU_SSP environment variable must point to the PRU Software Support Package. E.g.:
+(Desktop Linux) export PRU_SSP=/path/to/pru_software_support_package
+(Windows) set PRU_SSP=C:/path/to/pru_software_support_package
+(ARM Linux*) export PRU_SSP=/path/to/pru_software_support_package
+PRU_CGT environment variable is not set. Examples given:
+*******************************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./K2G_PRU.cmd
+LIBS=--library=$(PRU_SSP)/lib/rpmsg_lib.lib
+INCLUDE=--include_path=$(PRU_SSP)/include --include_path=$(PRU_SSP)/include/k2g
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -o2 --display_error_number --endian=little --hardware_mac=on --asm_directory=$(GEN_DIR) --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+OBJECTS=$(patsubst %.asm,$(GEN_DIR)/%.object,$(wildcard *.asm))
+OBJECTS+=$(patsubst %.c,$(GEN_DIR)/%.object,$(wildcard *.c))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS)
+ @echo 'Finished building target: $@'
+
+# Invokes the compiler on all assembly files in the directory to create the object files
+$(GEN_DIR)/%.object: %.asm
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/k2g/main.c b/labs/Getting_Started_Labs/c_code/solution/k2g/main.c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+/* TODO: define c */
+/* a, b, and c are stored in a defined location in PRU memory */
+#define a (*((volatile unsigned int *)0x100))
+#define b (*((volatile unsigned int *)0x104))
+#define c (*((volatile unsigned int *)0x108))
+
+/*
+ * main.c
+ */
+void main(void)
+{
+ /* TODO: define y & z */
+ /* The compiler decides where to store x, y, and z */
+ uint32_t x = 1;
+ uint32_t y = 2;
+ uint32_t z = 0;
+
+ a = 1;
+ b = 2;
+
+ while(1) {
+ /*
+ * TODO: store the sum of x and y in z
+ */
+ z = x + y;
+
+ /*
+ * TODO: store the sum of the numbers at memory locations a and
+ * b in memory location c
+ */
+ c = a + b;
+ }
+
+ /* This program will not reach __halt because of the while loop */
+ __halt();
+}
+
diff --git a/labs/Getting_Started_Labs/c_code/solution/k2g/resource_table_empty.h b/labs/Getting_Started_Labs/c_code/solution/k2g/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Getting_Started_Labs/linker_cmd/AM335x_PRU.cmd b/labs/Getting_Started_Labs/linker_cmd/AM335x_PRU.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM335x_PRU.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM335x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00002000 /* 8kB PRU0 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00003000 CREGISTER=28 /* 12kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCHS0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/linker_cmd/AM437x_PRU_SS0.cmd b/labs/Getting_Started_Labs/linker_cmd/AM437x_PRU_SS0.cmd
--- /dev/null
@@ -0,0 +1,83 @@
+/****************************************************************************/
+/* AM437x_PRU_SS0.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00001000 /* 4kB PRU-ICSS0 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24 /* 4kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25 /* 4kB PRU Data RAM 1_0 */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/linker_cmd/AM437x_PRU_SS1.cmd b/labs/Getting_Started_Labs/linker_cmd/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_0/linker_cmd/AM57xx_PRU.cmd b/labs/Getting_Started_Labs/linker_cmd/AM57xx_PRU.cmd
similarity index 100%
rename from labs/lab_0/linker_cmd/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM57xx_PRU.cmd
rename from labs/lab_0/linker_cmd/AM57xx_PRU.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM57xx_PRU.cmd
diff --git a/labs/lab_5/solution/am65x/PRU_Halt/AM65x_PRU0.cmd b/labs/Getting_Started_Labs/linker_cmd/AM65x_PRU0.cmd
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_Halt/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM65x_PRU0.cmd
rename from labs/lab_5/solution/am65x/PRU_Halt/AM65x_PRU0.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM65x_PRU0.cmd
diff --git a/labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/AM65x_PRU1.cmd b/labs/Getting_Started_Labs/linker_cmd/AM65x_PRU1.cmd
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/AM65x_PRU1.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM65x_PRU1.cmd
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/AM65x_PRU1.cmd
rename to labs/Getting_Started_Labs/linker_cmd/AM65x_PRU1.cmd
diff --git a/labs/Getting_Started_Labs/linker_cmd/AM65x_RTU0.cmd b/labs/Getting_Started_Labs/linker_cmd/AM65x_RTU0.cmd
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * AM65x_RTU0.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x RTU0 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 8kB RTU Instruction RAM */
+ RTU_IMEM : org = 0x00000000 len = 0x00002000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to use the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding PRU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_0x100 : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_0x100 : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_0x200: org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_0x100 : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_RTU0 : org = 0x0002A100 len = 0x0000004C CREGISTER=10
+ RTU0_CTRL : org = 0x00023000 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT0 : org = 0x00008000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_RT : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* Random length 0x1000 assigned to the below regions */
+ RSVD15 : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RSVD16 : org = 0x70000000 len = 0x00001000 CREGISTER=16
+ RSVD17 : org = 0x80000000 len = 0x00001000 CREGISTER=17
+ RSVD18 : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ RSVD19 : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ RSVD20 : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ RSVD23 : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+ /* Random length 0x10000 (max len value) assigned to programmable C29-31*/
+ RSVD29 : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ RSVD30 : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ RSVD31 : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of RTU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > RTU_IMEM, PAGE 0
+ .stack > RTU_DMEM_0_1, PAGE 1
+ .bss > RTU_DMEM_0_1, PAGE 1
+ .cio > RTU_DMEM_0_1, PAGE 1
+ .data > RTU_DMEM_0_1, PAGE 1
+ .switch > RTU_DMEM_0_1, PAGE 1
+ .sysmem > RTU_DMEM_0_1, PAGE 1
+ .cinit > RTU_DMEM_0_1, PAGE 1
+ .rodata > RTU_DMEM_0_1, PAGE 1
+ .rofardata > RTU_DMEM_0_1, PAGE 1
+ .farbss > RTU_DMEM_0_1, PAGE 1
+ .fardata > RTU_DMEM_0_1, PAGE 1
+
+ .resource_table > RTU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/linker_cmd/AM65x_RTU1.cmd b/labs/Getting_Started_Labs/linker_cmd/AM65x_RTU1.cmd
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * AM65x_RTU1.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x RTU1 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 8kB RTU Instruction RAM */
+ RTU_IMEM : org = 0x00000000 len = 0x00002000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to use the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding PRU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_0x100 : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_0x100 : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_0x200: org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_0x100 : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_RTU1 : org = 0x0002A300 len = 0x0000004C CREGISTER=10
+ RTU1_CTRL : org = 0x00023800 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT1 : org = 0x00009000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_RT : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* Random length 0x1000 assigned to the below regions */
+ RSVD15 : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RSVD16 : org = 0x70000000 len = 0x00001000 CREGISTER=16
+ RSVD17 : org = 0x80000000 len = 0x00001000 CREGISTER=17
+ RSVD18 : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ RSVD19 : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ RSVD20 : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ RSVD23 : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+ /* Random length 0x10000 (max len value) assigned to programmable C29-31*/
+ RSVD29 : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ RSVD30 : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ RSVD31 : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of RTU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > RTU_IMEM, PAGE 0
+ .stack > RTU_DMEM_0_1, PAGE 1
+ .bss > RTU_DMEM_0_1, PAGE 1
+ .cio > RTU_DMEM_0_1, PAGE 1
+ .data > RTU_DMEM_0_1, PAGE 1
+ .switch > RTU_DMEM_0_1, PAGE 1
+ .sysmem > RTU_DMEM_0_1, PAGE 1
+ .cinit > RTU_DMEM_0_1, PAGE 1
+ .rodata > RTU_DMEM_0_1, PAGE 1
+ .rofardata > RTU_DMEM_0_1, PAGE 1
+ .farbss > RTU_DMEM_0_1, PAGE 1
+ .fardata > RTU_DMEM_0_1, PAGE 1
+
+ .resource_table > RTU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Getting_Started_Labs/linker_cmd/K2G_PRU.cmd b/labs/Getting_Started_Labs/linker_cmd/K2G_PRU.cmd
--- /dev/null
@@ -0,0 +1,81 @@
+/****************************************************************************/
+/* K2G_PRU.cmd */
+/* Copyright (c) 2016-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on a k2g device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00004000 /* 16kB PRU-ICSS Instruction RAM */
+
+ PAGE 1:
+ /* RAM */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28 /* 64kB Shared RAM */
+
+ MSMC : org = 0x0C000000 len = 0x00100000 CREGISTER=30
+ DDR3A : org = 0x80000000 len = 0x00010000 CREGISTER=31
+
+ /* Peripherals */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_MII_RT : org = 0x00032000 len = 0x00000070 CREGISTER=27
+
+ TIMER_1 : org = 0x02210000 len = 0x00000048 CREGISTER=1
+ I2C0 : org = 0x02530000 len = 0x0000003C CREGISTER=2
+ MMC0 : org = 0x23000000 len = 0x00000300 CREGISTER=5
+ SPI0 : org = 0x21805400 len = 0x00000200 CREGISTER=6
+ MCASP0_DMA : org = 0x21804000 len = 0x00000400 CREGISTER=8
+ NSSUL : org = 0x04000000 len = 0x00040060 CREGISTER=9
+ SEC_MGR : org = 0x02500000 len = 0x00008000 CREGISTER=10
+ UART_1 : org = 0x02531000 len = 0x00000038 CREGISTER=11
+ UART_2 : org = 0x02531400 len = 0x00000038 CREGISTER=12
+ CIC : org = 0x02600000 len = 0x00001510 CREGISTER=13
+ DCAN0_CFG : org = 0x0260B200 len = 0x00000170 CREGISTER=14
+ DCAN1_CFG : org = 0x0260B400 len = 0x00000170 CREGISTER=15
+ SPI1 : org = 0x21805800 len = 0x00000200 CREGISTER=16
+ I2C_1 : org = 0x02530400 len = 0x0000003C CREGISTER=17
+ EPWM_0 : org = 0x021D0000 len = 0x00000044 CREGISTER=18
+ ECAP_0 : org = 0x021D1800 len = 0x00000060 CREGISTER=19
+ SEMAPHORE : org = 0x02640000 len = 0x0000050C CREGISTER=22
+ MMQP_REG5 : org = 0x02A50000 len = 0x00002000 CREGISTER=23
+ EDMA0_CC_CFG : org = 0x02000000 len = 0x00002E98 CREGISTER=29
+
+ RSVD20 : org = 0x000AE000 len = 0x00000001 CREGISTER=20
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/Makefile b/labs/Hands_on_Labs/Makefile
similarity index 87%
rename from labs/Makefile
rename to labs/Hands_on_Labs/Makefile
index 1ab1f35530a47cee40ff145becc3a2a9211fed91..a0f7e971676c743902c6e5539ebe170c786b790e 100644 (file)
rename from labs/Makefile
rename to labs/Hands_on_Labs/Makefile
index 1ab1f35530a47cee40ff145becc3a2a9211fed91..a0f7e971676c743902c6e5539ebe170c786b790e 100644 (file)
--- a/labs/Makefile
SUBDIRS=\
-lab_0/solution/am335x \
-lab_0/solution/am437x \
-lab_0/solution/am572x \
-lab_0/solution/am65x \
-lab_0/solution/k2g \
lab_1/solution/toggle_led \
lab_2/solution/button_led_0 \
lab_2/solution/button_led_1 \
diff --git a/labs/ReadMe.txt b/labs/Hands_on_Labs/ReadMe.txt
similarity index 98%
rename from labs/ReadMe.txt
rename to labs/Hands_on_Labs/ReadMe.txt
index 5ee6801fb7481685bb1e0bdd3785d019849762d2..b746757c06da5d7946fe0b4127086db515b42af5 100644 (file)
rename from labs/ReadMe.txt
rename to labs/Hands_on_Labs/ReadMe.txt
index 5ee6801fb7481685bb1e0bdd3785d019849762d2..b746757c06da5d7946fe0b4127086db515b42af5 100644 (file)
--- a/labs/ReadMe.txt
Programmable Real-time Unit (PRU) Software Support Package
------------------------------------------------------------
============================================================
- LABS
+Hands on Labs
============================================================
DESCRIPTION
PRU Training Slides - http://www.ti.com/sitarabootcamp
PRU Evaluation Hardware - http://www.ti.com/tool/PRUCAPE
Support - http://e2e.ti.com
-
similarity index 100%
rename from labs/lab_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_1/AM335x_PRU.cmd
rename from labs/lab_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_1/AM335x_PRU.cmd
diff --git a/labs/lab_1/solution/toggle_led/.ccsproject b/labs/Hands_on_Labs/lab_1/solution/toggle_led/.ccsproject
similarity index 100%
rename from labs/lab_1/solution/toggle_led/.ccsproject
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.ccsproject
rename from labs/lab_1/solution/toggle_led/.ccsproject
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.ccsproject
diff --git a/labs/lab_1/solution/toggle_led/.cproject b/labs/Hands_on_Labs/lab_1/solution/toggle_led/.cproject
similarity index 100%
rename from labs/lab_1/solution/toggle_led/.cproject
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.cproject
rename from labs/lab_1/solution/toggle_led/.cproject
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.cproject
diff --git a/labs/lab_1/solution/toggle_led/.project b/labs/Hands_on_Labs/lab_1/solution/toggle_led/.project
similarity index 100%
rename from labs/lab_1/solution/toggle_led/.project
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.project
rename from labs/lab_1/solution/toggle_led/.project
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.project
diff --git a/labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_1/solution/toggle_led/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_1/solution/toggle_led/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_1/solution/toggle_led/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/AM335x_PRU.cmd
rename from labs/lab_1/solution/toggle_led/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/AM335x_PRU.cmd
diff --git a/labs/lab_0/solution/am335x/Makefile b/labs/Hands_on_Labs/lab_1/solution/toggle_led/Makefile
similarity index 100%
rename from labs/lab_0/solution/am335x/Makefile
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/Makefile
rename from labs/lab_0/solution/am335x/Makefile
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/Makefile
diff --git a/labs/lab_1/solution/toggle_led/main.c b/labs/Hands_on_Labs/lab_1/solution/toggle_led/main.c
similarity index 100%
rename from labs/lab_1/solution/toggle_led/main.c
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/main.c
rename from labs/lab_1/solution/toggle_led/main.c
rename to labs/Hands_on_Labs/lab_1/solution/toggle_led/main.c
similarity index 100%
rename from labs/lab_2/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/AM335x_PRU.cmd
rename from labs/lab_2/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_2/button_led_0.c
rename to labs/Hands_on_Labs/lab_2/button_led_0.c
rename from labs/lab_2/button_led_0.c
rename to labs/Hands_on_Labs/lab_2/button_led_0.c
similarity index 100%
rename from labs/lab_2/button_led_1.c
rename to labs/Hands_on_Labs/lab_2/button_led_1.c
rename from labs/lab_2/button_led_1.c
rename to labs/Hands_on_Labs/lab_2/button_led_1.c
diff --git a/labs/lab_2/solution/button_led_0/.ccsproject b/labs/Hands_on_Labs/lab_2/solution/button_led_0/.ccsproject
similarity index 100%
rename from labs/lab_2/solution/button_led_0/.ccsproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.ccsproject
rename from labs/lab_2/solution/button_led_0/.ccsproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.ccsproject
diff --git a/labs/lab_2/solution/button_led_0/.cproject b/labs/Hands_on_Labs/lab_2/solution/button_led_0/.cproject
similarity index 100%
rename from labs/lab_2/solution/button_led_0/.cproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.cproject
rename from labs/lab_2/solution/button_led_0/.cproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.cproject
diff --git a/labs/lab_2/solution/button_led_0/.project b/labs/Hands_on_Labs/lab_2/solution/button_led_0/.project
similarity index 100%
rename from labs/lab_2/solution/button_led_0/.project
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.project
rename from labs/lab_2/solution/button_led_0/.project
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.project
diff --git a/labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_2/solution/button_led_0/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_2/solution/button_led_0/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_2/solution/button_led_0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/AM335x_PRU.cmd
rename from labs/lab_2/solution/button_led_0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/AM335x_PRU.cmd
diff --git a/labs/lab_1/solution/toggle_led/Makefile b/labs/Hands_on_Labs/lab_2/solution/button_led_0/Makefile
similarity index 100%
rename from labs/lab_1/solution/toggle_led/Makefile
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/Makefile
rename from labs/lab_1/solution/toggle_led/Makefile
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/Makefile
diff --git a/labs/lab_2/solution/button_led_0/button_led_0.c b/labs/Hands_on_Labs/lab_2/solution/button_led_0/button_led_0.c
similarity index 100%
rename from labs/lab_2/solution/button_led_0/button_led_0.c
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/button_led_0.c
rename from labs/lab_2/solution/button_led_0/button_led_0.c
rename to labs/Hands_on_Labs/lab_2/solution/button_led_0/button_led_0.c
diff --git a/labs/lab_2/solution/button_led_1/.ccsproject b/labs/Hands_on_Labs/lab_2/solution/button_led_1/.ccsproject
similarity index 100%
rename from labs/lab_2/solution/button_led_1/.ccsproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.ccsproject
rename from labs/lab_2/solution/button_led_1/.ccsproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.ccsproject
diff --git a/labs/lab_2/solution/button_led_1/.cproject b/labs/Hands_on_Labs/lab_2/solution/button_led_1/.cproject
similarity index 100%
rename from labs/lab_2/solution/button_led_1/.cproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.cproject
rename from labs/lab_2/solution/button_led_1/.cproject
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.cproject
diff --git a/labs/lab_2/solution/button_led_1/.project b/labs/Hands_on_Labs/lab_2/solution/button_led_1/.project
similarity index 100%
rename from labs/lab_2/solution/button_led_1/.project
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.project
rename from labs/lab_2/solution/button_led_1/.project
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.project
diff --git a/labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_2/solution/button_led_1/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_2/solution/button_led_1/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_2/solution/button_led_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/AM335x_PRU.cmd
rename from labs/lab_2/solution/button_led_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/AM335x_PRU.cmd
diff --git a/labs/lab_2/solution/button_led_0/Makefile b/labs/Hands_on_Labs/lab_2/solution/button_led_1/Makefile
similarity index 100%
rename from labs/lab_2/solution/button_led_0/Makefile
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/Makefile
rename from labs/lab_2/solution/button_led_0/Makefile
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/Makefile
diff --git a/labs/lab_2/solution/button_led_1/button_led_1.c b/labs/Hands_on_Labs/lab_2/solution/button_led_1/button_led_1.c
similarity index 100%
rename from labs/lab_2/solution/button_led_1/button_led_1.c
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/button_led_1.c
rename from labs/lab_2/solution/button_led_1/button_led_1.c
rename to labs/Hands_on_Labs/lab_2/solution/button_led_1/button_led_1.c
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.ccsproject
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.cproject
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.project b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.project
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.project
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.project
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.project
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.project
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/AM335x_PRU.cmd
diff --git a/labs/lab_2/solution/button_led_1/Makefile b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile
similarity index 100%
rename from labs/lab_2/solution/button_led_1/Makefile
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile
rename from labs/lab_2/solution/button_led_1/Makefile
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/PRU_1wire.h
diff --git a/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/resource_table_empty.h b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor0/temp_monitor_slave_0.c
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.ccsproject
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.cproject
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.project b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.project
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.project
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.project
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.project
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.project
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/AM335x_PRU.cmd
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile
rename from labs/lab_3/solution/PRU_HDQ_TempSensor0/Makefile
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/PRU_1wire.h
diff --git a/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/resource_table_empty.h b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c b/labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c
rename to labs/Hands_on_Labs/lab_3/solution/PRU_HDQ_TempSensor1/temp_monitor_master_1.c
similarity index 100%
rename from labs/lab_4/resource_table_0.h
rename to labs/Hands_on_Labs/lab_4/resource_table_0.h
rename from labs/lab_4/resource_table_0.h
rename to labs/Hands_on_Labs/lab_4/resource_table_0.h
similarity index 100%
rename from labs/lab_4/resource_table_1.h
rename to labs/Hands_on_Labs/lab_4/resource_table_1.h
rename from labs/lab_4/resource_table_1.h
rename to labs/Hands_on_Labs/lab_4/resource_table_1.h
diff --git a/labs/lab_4/solution/button_led_0/.ccsproject b/labs/Hands_on_Labs/lab_4/solution/button_led_0/.ccsproject
similarity index 100%
rename from labs/lab_4/solution/button_led_0/.ccsproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.ccsproject
rename from labs/lab_4/solution/button_led_0/.ccsproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.ccsproject
diff --git a/labs/lab_4/solution/button_led_0/.cproject b/labs/Hands_on_Labs/lab_4/solution/button_led_0/.cproject
similarity index 100%
rename from labs/lab_4/solution/button_led_0/.cproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.cproject
rename from labs/lab_4/solution/button_led_0/.cproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.cproject
diff --git a/labs/lab_4/solution/button_led_0/.project b/labs/Hands_on_Labs/lab_4/solution/button_led_0/.project
similarity index 100%
rename from labs/lab_4/solution/button_led_0/.project
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.project
rename from labs/lab_4/solution/button_led_0/.project
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.project
diff --git a/labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_4/solution/button_led_0/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_4/solution/button_led_0/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_4/solution/button_led_0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/AM335x_PRU.cmd
rename from labs/lab_4/solution/button_led_0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/AM335x_PRU.cmd
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile b/labs/Hands_on_Labs/lab_4/solution/button_led_0/Makefile
similarity index 100%
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/Makefile
rename from labs/lab_3/solution/PRU_HDQ_TempSensor1/Makefile
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/Makefile
diff --git a/labs/lab_4/solution/button_led_0/button_led_0.c b/labs/Hands_on_Labs/lab_4/solution/button_led_0/button_led_0.c
similarity index 100%
rename from labs/lab_4/solution/button_led_0/button_led_0.c
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/button_led_0.c
rename from labs/lab_4/solution/button_led_0/button_led_0.c
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/button_led_0.c
diff --git a/labs/lab_4/solution/button_led_0/resource_table_0.h b/labs/Hands_on_Labs/lab_4/solution/button_led_0/resource_table_0.h
similarity index 100%
rename from labs/lab_4/solution/button_led_0/resource_table_0.h
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/resource_table_0.h
rename from labs/lab_4/solution/button_led_0/resource_table_0.h
rename to labs/Hands_on_Labs/lab_4/solution/button_led_0/resource_table_0.h
diff --git a/labs/lab_4/solution/button_led_1/.ccsproject b/labs/Hands_on_Labs/lab_4/solution/button_led_1/.ccsproject
similarity index 100%
rename from labs/lab_4/solution/button_led_1/.ccsproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.ccsproject
rename from labs/lab_4/solution/button_led_1/.ccsproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.ccsproject
diff --git a/labs/lab_4/solution/button_led_1/.cproject b/labs/Hands_on_Labs/lab_4/solution/button_led_1/.cproject
similarity index 100%
rename from labs/lab_4/solution/button_led_1/.cproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.cproject
rename from labs/lab_4/solution/button_led_1/.cproject
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.cproject
diff --git a/labs/lab_4/solution/button_led_1/.project b/labs/Hands_on_Labs/lab_4/solution/button_led_1/.project
similarity index 100%
rename from labs/lab_4/solution/button_led_1/.project
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.project
rename from labs/lab_4/solution/button_led_1/.project
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.project
diff --git a/labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_4/solution/button_led_1/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_4/solution/button_led_1/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_4/solution/button_led_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/AM335x_PRU.cmd
rename from labs/lab_4/solution/button_led_1/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/AM335x_PRU.cmd
diff --git a/labs/lab_4/solution/button_led_0/Makefile b/labs/Hands_on_Labs/lab_4/solution/button_led_1/Makefile
similarity index 100%
rename from labs/lab_4/solution/button_led_0/Makefile
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/Makefile
rename from labs/lab_4/solution/button_led_0/Makefile
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/Makefile
diff --git a/labs/lab_4/solution/button_led_1/button_led_1.c b/labs/Hands_on_Labs/lab_4/solution/button_led_1/button_led_1.c
similarity index 100%
rename from labs/lab_4/solution/button_led_1/button_led_1.c
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/button_led_1.c
rename from labs/lab_4/solution/button_led_1/button_led_1.c
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/button_led_1.c
diff --git a/labs/lab_4/solution/button_led_1/resource_table_1.h b/labs/Hands_on_Labs/lab_4/solution/button_led_1/resource_table_1.h
similarity index 100%
rename from labs/lab_4/solution/button_led_1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/resource_table_1.h
rename from labs/lab_4/solution/button_led_1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_4/solution/button_led_1/resource_table_1.h
diff --git a/labs/lab_5/rpmsg_pru_user_space_echo.c b/labs/Hands_on_Labs/lab_5/rpmsg_pru_user_space_echo.c
similarity index 100%
rename from labs/lab_5/rpmsg_pru_user_space_echo.c
rename to labs/Hands_on_Labs/lab_5/rpmsg_pru_user_space_echo.c
rename from labs/lab_5/rpmsg_pru_user_space_echo.c
rename to labs/Hands_on_Labs/lab_5/rpmsg_pru_user_space_echo.c
diff --git a/labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd
rename from labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/AM335x_PRU.cmd
diff --git a/labs/lab_5/solution/am335x/PRU_Halt/Makefile b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/Makefile
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/Makefile
rename from labs/lab_5/solution/am335x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/Makefile
diff --git a/labs/lab_5/solution/am335x/PRU_Halt/main.c b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/main.c
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/main.c
rename from labs/lab_5/solution/am335x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/main.c
diff --git a/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/resource_table_empty.h b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_Halt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM335x_PRU.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM335x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00002000 /* 8kB PRU0 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00003000 CREGISTER=28 /* 12kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCHS0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
diff --git a/labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
diff --git a/labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename from labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
diff --git a/labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd
rename from labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/AM437x_PRU_SS1.cmd
diff --git a/labs/lab_5/solution/am437x/PRU_Halt/Makefile b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/Makefile
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/Makefile
rename from labs/lab_5/solution/am437x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/Makefile
diff --git a/labs/lab_5/solution/am437x/PRU_Halt/main.c b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/main.c
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/main.c
rename from labs/lab_5/solution/am437x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/main.c
diff --git a/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/resource_table_empty.h b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_Halt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/AM437x_PRU_SS1.cmd b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/Makefile
diff --git a/labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/main.c
diff --git a/labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h b/labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h
similarity index 100%
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h
rename from labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am437x/PRU_RPMsg_Echo_Interrupt1_1/resource_table_1.h
diff --git a/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/AM57xx_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/AM57xx_PRU.cmd
--- /dev/null
@@ -0,0 +1,85 @@
+/****************************************************************************/
+/* AM57xx_PRU.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM57xx device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00010000 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ MCASP3_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ I2C3 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+
+ RSVD1 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ RSVD2 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ RSVD6 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ RSVD9 : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD11 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ RSVD12 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD14 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ RSVD15 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ RSVD16 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ RSVD17 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ RSVD18 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ RSVD19 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ RSVD20 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD22 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ RSVD23 : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+ RSVD29 : org = 0x49000000 len = 0x00001098 CREGISTER=29
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/am572x/PRU_Halt/Makefile b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/Makefile
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/Makefile
rename from labs/lab_5/solution/am572x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/Makefile
diff --git a/labs/lab_5/solution/am572x/PRU_Halt/main.c b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/main.c
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/main.c
rename from labs/lab_5/solution/am572x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/main.c
diff --git a/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/resource_table_empty.h b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_Halt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/AM57xx_PRU.cmd
diff --git a/labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/Makefile
diff --git a/labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/main.c
diff --git a/labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename from labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am572x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
diff --git a/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/AM65x_PRU0.cmd b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/AM65x_PRU0.cmd
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * AM65x_PRU0.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x PRU0 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 16kB PRU Instruction RAM */
+ PRU_IMEM : org = 0x00000000 len = 0x00004000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to reserve the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding RTU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_0x100 : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_0x100 : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_0x200: org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_0x100 : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_PRU0 : org = 0x0002A000 len = 0x0000004C CREGISTER=10
+ PRU0_CTRL : org = 0x00022000 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT0 : org = 0x00008000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_RT : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* Random length 0x1000 assigned to the below regions */
+ RSVD15 : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RSVD16 : org = 0x70000000 len = 0x00001000 CREGISTER=16
+ RSVD17 : org = 0x80000000 len = 0x00001000 CREGISTER=17
+ RSVD18 : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ RSVD19 : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ RSVD20 : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ RSVD23 : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+ /* Random length 0x10000 (max len value) assigned to programmable C29-31*/
+ RSVD29 : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ RSVD30 : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ RSVD31 : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/am65x/PRU_Halt/Makefile b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/Makefile
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/Makefile
rename from labs/lab_5/solution/am65x/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/Makefile
diff --git a/labs/lab_5/solution/am65x/PRU_Halt/main.c b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/main.c
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/main.c
rename from labs/lab_5/solution/am65x/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/main.c
diff --git a/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/resource_table_empty.h b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_Halt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * ======== resource_table_empty.h ========
+ *
+ * Define the resource table entries for all PRU cores. This will be
+ * incorporated into corresponding base images, and used by the remoteproc
+ * on the host-side to allocated/reserve resources. Note the remoteproc
+ * driver requires that all PRU firmware be built with a resource table.
+ *
+ * This file contains an empty resource table. It can be used either as:
+ *
+ * 1) A template, or
+ * 2) As-is if a PRU application does not need to configure PRU_INTC
+ * or interact with the rpmsg driver
+ *
+ */
+
+#ifndef _RSC_TABLE_PRU_H_
+#define _RSC_TABLE_PRU_H_
+
+#include <stddef.h>
+#include <rsc_types.h>
+
+struct my_resource_table {
+ struct resource_table base;
+
+ uint32_t offset[1]; /* Should match 'num' in actual definition */
+};
+
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
+#pragma RETAIN(pru_remoteproc_ResourceTable)
+struct my_resource_table pru_remoteproc_ResourceTable = {
+ 1, /* we're the first version that implements this */
+ 0, /* number of entries in the table */
+ 0, 0, /* reserved, must be zero */
+ 0, /* offset[0] */
+};
+
+#endif /* _RSC_TABLE_PRU_H_ */
+
diff --git a/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/AM65x_PRU1.cmd b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/AM65x_PRU1.cmd
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * AM65x_PRU1.cmd
+ *
+ * Example Linker command file for linking programs built with the C compiler
+ * on AM65x PRU1 cores
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ /* 16kB PRU Instruction RAM */
+ PRU_IMEM : org = 0x00000000 len = 0x00004000
+
+ PAGE 1:
+ /* Data RAMs */
+ /* 8kB PRU Data RAM 0_1; use only the first page for PRU1 and reserve
+ * the second page for RTU1 */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00001000 CREGISTER=24
+ /* 8kB PRU Data RAM 1_0; use only the first page for PRU0 and reserve
+ * the second page for RTU0 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00001000 CREGISTER=25
+ /* NOTE: Customized to reserve the second 4K of ICSS Data RAMs 0 and 1 so
+ as not to conflict with corresponding RTU core usage */
+ RTU_DMEM_0_1 : org = 0x00001000 len = 0x00001000
+ RTU_DMEM_1_0 : org = 0x00003000 len = 0x00001000
+
+ PAGE 2:
+ /* C28 needs to be programmed to point to SHAREDMEM, default is 0 */
+ /* 64kB PRU Shared RAM */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28
+
+ /* Internal Peripherals */
+ /* NOTE: Use full INTC length instead of 0x200 to match the pruIntc
+ * structure definition in pru_intc.h, ignoring the second Constant
+ * Register #6 that starts at 0x200 offset within INTC */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_IEP1 : org = 0x0002F000 len = 0x00000100 CREGISTER=1
+ PRU_IEP1_0x100 : org = 0x0002F100 len = 0x0000021C CREGISTER=2
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000100 CREGISTER=4
+ PRU_CFG_0x100 : org = 0x00026100 len = 0x00000098 CREGISTER=5
+ /* XXX: This value is part of INTC space, and is therefore commented
+ * out as it conflicts with PRU_INTC size above. Using this requires
+ * splitting up the pruIntc structure and CT_INTC variable from
+ * pru_intc.h */
+ /*PRU_INTC_0x200: org = 0x00040200 len = 0x00001304 CREGISTER=6*/
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_IEP0_0x100 : org = 0x0002E100 len = 0x0000021C CREGISTER=8
+ MII_G_RT : org = 0x00033000 len = 0x00000C18 CREGISTER=9
+ TM_CFG_PRU1 : org = 0x0002A200 len = 0x0000004C CREGISTER=10
+ PRU1_CTRL : org = 0x00024000 len = 0x00000088 CREGISTER=11
+ /* FIXME: PA_STATS_QRAM and CRAM assigned random sizes of 0x100 */
+ PA_STATS_QRAM : org = 0x00027000 len = 0x00000100 CREGISTER=12
+ PA_STATS_CRAM : org = 0x0002C000 len = 0x00000100 CREGISTER=13
+ ICSSG_PROTECT : org = 0x00024800 len = 0x000001E8 CREGISTER=14
+ MII_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_RTU_RAT1 : org = 0x00009000 len = 0x00000854 CREGISTER=22
+ PRU_IEP0 : org = 0x0002E000 len = 0x00000100 CREGISTER=26
+ MII_R : org = 0x00032000 len = 0x0000024C CREGISTER=27
+
+ /* External Regions */
+ /* Random length 0x1000 assigned to the below regions */
+ RSVD15 : org = 0x60000000 len = 0x00001000 CREGISTER=15
+ RSVD16 : org = 0x70000000 len = 0x00001000 CREGISTER=16
+ RSVD17 : org = 0x80000000 len = 0x00001000 CREGISTER=17
+ RSVD18 : org = 0x90000000 len = 0x00001000 CREGISTER=18
+ RSVD19 : org = 0xA0000000 len = 0x00001000 CREGISTER=19
+ RSVD20 : org = 0xB0000000 len = 0x00001000 CREGISTER=20
+ RSVD23 : org = 0xC0000000 len = 0x00001000 CREGISTER=23
+ /* Random length 0x10000 (max len value) assigned to programmable C29-31*/
+ RSVD29 : org = 0xD0000000 len = 0x00010000 CREGISTER=29
+ RSVD30 : org = 0xE0000000 len = 0x00010000 CREGISTER=30
+ RSVD31 : org = 0xF0000000 len = 0x00010000 CREGISTER=31
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/Makefile
diff --git a/labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/main.c
diff --git a/labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename from labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/am65x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
diff --git a/labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd
rename from labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/K2G_PRU.cmd
diff --git a/labs/lab_5/solution/k2g/PRU_Halt/Makefile b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/Makefile
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/Makefile
rename from labs/lab_5/solution/k2g/PRU_Halt/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/Makefile
diff --git a/labs/lab_5/solution/k2g/PRU_Halt/main.c b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/main.c
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/main.c
rename from labs/lab_5/solution/k2g/PRU_Halt/main.c
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/main.c
diff --git a/labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h
rename from labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_Halt/resource_table_empty.h
diff --git a/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/K2G_PRU.cmd b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/K2G_PRU.cmd
--- /dev/null
@@ -0,0 +1,81 @@
+/****************************************************************************/
+/* K2G_PRU.cmd */
+/* Copyright (c) 2016-2018 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on a k2g device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00004000 /* 16kB PRU-ICSS Instruction RAM */
+
+ PAGE 1:
+ /* RAM */
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+
+ PAGE 2:
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00010000 CREGISTER=28 /* 64kB Shared RAM */
+
+ MSMC : org = 0x0C000000 len = 0x00100000 CREGISTER=30
+ DDR3A : org = 0x80000000 len = 0x00010000 CREGISTER=31
+
+ /* Peripherals */
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+ PRU_MDIO : org = 0x00032400 len = 0x00000090 CREGISTER=21
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_MII_RT : org = 0x00032000 len = 0x00000070 CREGISTER=27
+
+ TIMER_1 : org = 0x02210000 len = 0x00000048 CREGISTER=1
+ I2C0 : org = 0x02530000 len = 0x0000003C CREGISTER=2
+ MMC0 : org = 0x23000000 len = 0x00000300 CREGISTER=5
+ SPI0 : org = 0x21805400 len = 0x00000200 CREGISTER=6
+ MCASP0_DMA : org = 0x21804000 len = 0x00000400 CREGISTER=8
+ NSSUL : org = 0x04000000 len = 0x00040060 CREGISTER=9
+ SEC_MGR : org = 0x02500000 len = 0x00008000 CREGISTER=10
+ UART_1 : org = 0x02531000 len = 0x00000038 CREGISTER=11
+ UART_2 : org = 0x02531400 len = 0x00000038 CREGISTER=12
+ CIC : org = 0x02600000 len = 0x00001510 CREGISTER=13
+ DCAN0_CFG : org = 0x0260B200 len = 0x00000170 CREGISTER=14
+ DCAN1_CFG : org = 0x0260B400 len = 0x00000170 CREGISTER=15
+ SPI1 : org = 0x21805800 len = 0x00000200 CREGISTER=16
+ I2C_1 : org = 0x02530400 len = 0x0000003C CREGISTER=17
+ EPWM_0 : org = 0x021D0000 len = 0x00000044 CREGISTER=18
+ ECAP_0 : org = 0x021D1800 len = 0x00000060 CREGISTER=19
+ SEMAPHORE : org = 0x02640000 len = 0x0000050C CREGISTER=22
+ MMQP_REG5 : org = 0x02A50000 len = 0x00002000 CREGISTER=23
+ EDMA0_CC_CFG : org = 0x02000000 len = 0x00002E98 CREGISTER=29
+
+ RSVD20 : org = 0x000AE000 len = 0x00000001 CREGISTER=20
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/Makefile
diff --git a/labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/main.c
diff --git a/labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename from labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to labs/Hands_on_Labs/lab_5/solution/k2g/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from labs/lab_6/pru0_led.sh
rename to labs/Hands_on_Labs/lab_6/pru0_led.sh
rename from labs/lab_6/pru0_led.sh
rename to labs/Hands_on_Labs/lab_6/pru0_led.sh
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.ccsproject
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/.cproject b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.cproject
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.cproject
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.cproject
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.cproject
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.cproject
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/.project b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.project
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.project
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.project
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.project
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.project
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs
rename from labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd
rename from labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/AM335x_PRU.cmd
diff --git a/labs/lab_4/solution/button_led_1/Makefile b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/Makefile
similarity index 100%
rename from labs/lab_4/solution/button_led_1/Makefile
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/Makefile
rename from labs/lab_4/solution/button_led_1/Makefile
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/Makefile
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/main.c b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/main.c
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/main.c
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/main.c
rename from labs/lab_6/solution/PRU_RPMsg_LED0/main.c
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/main.c
diff --git a/labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h b/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h
similarity index 100%
rename from labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h
rename from labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h
rename to labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0/resource_table_0.h
diff --git a/labs/lab_0/solution/am65x/main.c b/labs/lab_0/solution/am65x/main.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the
- * distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include <stdint.h>
-#include "resource_table_empty.h"
-
-/* TODO: define A and B */
-#define A (*((volatile unsigned int *)0x100))
-#define B (*((volatile unsigned int *)0x104))
-#define C (*((volatile unsigned int *)0x108))
-
-/*
- * main.c
- */
-void main(void)
-{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
- C = A + B;
-
- __halt();
-}
diff --git a/labs/lab_0/solution/k2g/main.c b/labs/lab_0/solution/k2g/main.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the
- * distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include <stdint.h>
-#include "resource_table_empty.h"
-
-/* TODO: define A and B */
-#define A (*((volatile unsigned int *)0x100))
-#define B (*((volatile unsigned int *)0x104))
-#define C (*((volatile unsigned int *)0x108))
-
-/*
- * main.c
- */
-void main(void)
-{
- /*
- * TODO: store the sum of the numbers at memory locations A and B in
- * memory location C
- */
- C = A + B;
-
- __halt();
-}
diff --git a/labs/lab_1/solution/toggle_led/.settings/org.eclipse.core.resources.prefs b/labs/lab_1/solution/toggle_led/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/labs/lab_2/solution/button_led_0/.settings/org.eclipse.core.resources.prefs b/labs/lab_2/solution/button_led_0/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/labs/lab_2/solution/button_led_1/.settings/org.eclipse.core.resources.prefs b/labs/lab_2/solution/button_led_1/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.core.resources.prefs b/labs/lab_3/solution/PRU_HDQ_TempSensor0/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1\r
-encoding//Debug/gen/subdir_rules.mk=UTF-8\r
-encoding//Debug/gen/subdir_vars.mk=UTF-8\r
-encoding//Debug/makefile=UTF-8\r
-encoding//Debug/objects.mk=UTF-8\r
-encoding//Debug/sources.mk=UTF-8\r
-encoding//Debug/subdir_rules.mk=UTF-8\r
-encoding//Debug/subdir_vars.mk=UTF-8\r
-encoding//Release/gen/subdir_rules.mk=UTF-8\r
-encoding//Release/gen/subdir_vars.mk=UTF-8\r
-encoding//Release/makefile=UTF-8\r
-encoding//Release/objects.mk=UTF-8\r
-encoding//Release/sources.mk=UTF-8\r
-encoding//Release/subdir_rules.mk=UTF-8\r
-encoding//Release/subdir_vars.mk=UTF-8\r
diff --git a/labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.core.resources.prefs b/labs/lab_3/solution/PRU_HDQ_TempSensor1/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1\r
-encoding//Debug/gen/subdir_rules.mk=UTF-8\r
-encoding//Debug/gen/subdir_vars.mk=UTF-8\r
-encoding//Debug/makefile=UTF-8\r
-encoding//Debug/objects.mk=UTF-8\r
-encoding//Debug/sources.mk=UTF-8\r
-encoding//Debug/subdir_rules.mk=UTF-8\r
-encoding//Debug/subdir_vars.mk=UTF-8\r
-encoding//Release/gen/subdir_rules.mk=UTF-8\r
-encoding//Release/gen/subdir_vars.mk=UTF-8\r
-encoding//Release/makefile=UTF-8\r
-encoding//Release/objects.mk=UTF-8\r
-encoding//Release/sources.mk=UTF-8\r
-encoding//Release/subdir_rules.mk=UTF-8\r
-encoding//Release/subdir_vars.mk=UTF-8\r
diff --git a/labs/lab_4/solution/button_led_0/.settings/org.eclipse.core.resources.prefs b/labs/lab_4/solution/button_led_0/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/labs/lab_4/solution/button_led_1/.settings/org.eclipse.core.resources.prefs b/labs/lab_4/solution/button_led_1/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8