Skip to content

Commit

Permalink
allsoc: enet: move syncfg template to lld
Browse files Browse the repository at this point in the history
-move am62xx templates to enet lld from mcu repo

Fixes: MCUSDK-13757
Signed-off-by: Pradeep HN <[email protected]>
  • Loading branch information
pradeep-hn committed Nov 6, 2024
1 parent 02aa9bc commit 3dd88c8
Show file tree
Hide file tree
Showing 5,818 changed files with 151,762 additions and 776 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_dma_modified.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"
#include "ti_enet_config.h"
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_dma_original.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"

Expand Down
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_initseq_modified.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"
/* ti_enet_config should be included by application */
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_initseq_original.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"

Expand Down
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_ioctl_modified.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"
#include "ti_enet_config.h"
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/images/txsg_test_ioctl_original.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "FreeRTOS.h"


#include <networking/enet/utils/include/enet_ethpatterns.h>
#include <enet_ethpatterns.h>
#include <networking/enet/core/include/core/enet_utils.h>
#include "enet_appprofile.h"
#include "ti_enet_config.h"
Expand Down
6 changes: 3 additions & 3 deletions examples/enet_cli_app/.project/project_am243x.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am243x/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/V3",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/V3",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
4 changes: 2 additions & 2 deletions examples/enet_cpsw_est/.project/project_am243x.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am243x/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
4 changes: 2 additions & 2 deletions examples/enet_cpsw_est/.project/project_am261x.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am261x/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
4 changes: 2 additions & 2 deletions examples/enet_cpsw_est/.project/project_am263px.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am263px/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
4 changes: 2 additions & 2 deletions examples/enet_cpsw_est/.project/project_am263x.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am263x/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
4 changes: 2 additions & 2 deletions examples/enet_cpsw_est/.project/project_am273x.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const includes_freertos_r5f = {
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am273x/r5f",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
Expand Down
188 changes: 188 additions & 0 deletions examples/enet_cpsw_est/.project/project_am62ax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
let path = require('path');

let device = "am62ax";

const files = {
common: [
"enet_cpsw_est_main.c",
"main.c",
"enet_cpsw_est_cfg.c",
"enet_cpsw_est_ts.c",
"enet_cpsw_est_dataflow.c",
],
};

/* Relative to where the makefile will be generated
* Typically at <example_folder>/<BOARD>/<core_os_combo>/<compiler>
*/
const filedirs = {
common: [
"..", /* core_os_combo base */
"../../../V0", /* Example base */
],
};

const libdirs_freertos = {
common: [
"generated",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/lib",
"${MCU_PLUS_SDK_PATH}/source/drivers/lib",
"${MCU_PLUS_SDK_PATH}/source/board/lib",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/lib",

],
};

const includes_freertos_a53 = {
common: [
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/GCC/ARM_CA53",
"${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am62ax/a53",
"${MCU_PLUS_SDK_PATH}/source/networking/enet",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/utils",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/utils/V3",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/phy",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/core/include/core",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/soc/k3/am62ax",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/hw_include",
"${MCU_PLUS_SDK_PATH}/source/networking/enet/hw_include/mdio/V4",
],
};

const libs_freertos_a53 = {
common: [
"freertos.am62ax.a53.gcc-aarch64.${ConfigName}.lib",
"drivers.am62ax.a53.gcc-aarch64.${ConfigName}.lib",
"board.am62ax.a53.gcc-aarch64.${ConfigName}.lib",
"enet-cpsw.am62ax.a53.gcc-aarch64.${ConfigName}.lib",
],
};

const linker_includePath_freertos = {
common: [
"${PROJECT_BUILD_DIR}/syscfg",

],
};

const defines_a53 = {
common: [
"ENET_ENABLE_PER_CPSW=1",
],
};

const cflags_a53 = {
common: [
"-Wno-unused-function",
"-Wno-unused-variable",
],
release: [
"-flto",
],
};

const lflags_a53 = {
common: [
"-Wno-unused-function",
"-Wno-unused-",
],
};

const loptflags_a53 = {
release: [
"-flto",
],
};

const lnkfiles = {
common: [
"linker.cmd",
]
};

const syscfgfile = "../example.syscfg";

const readmeDoxygenPageTag = "EXAMPLES_ENET_CPSW_EST";

const templates_freertos_a53 =
[
{
input: ".project/templates/am62ax/common/linker_a53.cmd.xdt",
output: "linker.cmd",
options: {
enableDMARegion: false,
dmaHeapSize: 0x20000,
}
},
{
input: ".project/templates/am62ax/freertos/main_freertos.c.xdt",
output: "../main.c",
options: {
entryFunction: "EnetApp_mainTask",
taskPri : "2",
stackSize : "8192",
},
}
];

const buildOptionCombos = [
{ device: device, cpu: "a53ss0-0", cgt: "gcc-aarch64", board: "am62ax-sk", os: "freertos"},
];

function getComponentProperty() {
let property = {};

property.dirPath = path.resolve(__dirname, "..");
property.type = "executable";
property.name = "enet_cpsw_est";
property.isInternal = true;
property.buildOptionCombos = buildOptionCombos;

return property;
}

function getComponentBuildProperty(buildOption) {
let build_property = {};

build_property.files = files;
build_property.filedirs = filedirs;
build_property.lnkfiles = lnkfiles;
build_property.syscfgfile = syscfgfile;
build_property.projecspecFileAction = "link";
build_property.readmeDoxygenPageTag = readmeDoxygenPageTag;

if(buildOption.cpu.match(/a53*/)) {
if(buildOption.os.match(/freertos*/) )
{
const _ = require('lodash');
let libdirs_freertos_cpy = _.cloneDeep(libdirs_freertos);
/* Logic to remove generated/ from libdirs_freertos, it generates warning for ccs build */
if (buildOption.isProjectSpecBuild === true)
{
var delIndex = libdirs_freertos_cpy.common.indexOf('generated');
if (delIndex !== -1) {
libdirs_freertos_cpy.common.splice(delIndex, 1);
}
}
build_property.includes = includes_freertos_a53;
build_property.libdirs = libdirs_freertos_cpy;
build_property.libs = libs_freertos_a53;
build_property.templates = templates_freertos_a53;
build_property.defines = defines_a53;
build_property.cflags = cflags_a53;
build_property.lflags = lflags_a53;
build_property.projectspecLnkPath = linker_includePath_freertos;
build_property.loptflags = loptflags_a53;
}
}

return build_property;
}

module.exports = {
getComponentProperty,
getComponentBuildProperty,
};
Loading

0 comments on commit 3dd88c8

Please sign in to comment.