Update repo

This commit is contained in:
2026-08-30 23:04:35 -07:00
parent 749dab5721
commit ce65a0f59a
14950 changed files with 4408250 additions and 1 deletions
@@ -0,0 +1,45 @@
let Common = system.getScript("/driverlib/Common.js");
let Pinmux = system.getScript("/driverlib/pinmux.js");
let BUSCOMPS_USED = [
{name: "BUSCOMP1"},
{name: "BUSCOMP2"},
{name: "BUSCOMP3"},
{name: "BUSCOMP4"},
{name: "BUSCOMP5"},
{name: "BUSCOMP6"},
{name: "BUSCOMP7"},
{name: "BUSCOMP8"}
]
var config = [
{
name : "busComptoAND",
displayName : "Bus Comparators used:",
description : "Choose which bus comparators to AND",
hidden : false,
default : [],
minSelections: 0,
options : BUSCOMPS_USED
},
{
name : "rtosInterrupt",
displayName : "Generate RTOS Interrupt on Count Match",
description : "Wether or not to generate RTOS interrupt when the COUNT matches the REF value",
default : false
}
]
var eradANDSubmodule = {
displayName: "ERAD AND MASK",
maxInstances: 4,
defaultInstanceName: "ERAD_AND_MASK",
description: "ERAD And Mask",
config: config,
templates: {
boardc : "", //"/gpio/gpio.board.c.xdt",
boardh : ""//"/gpio/gpio.board.h.xdt"
},
};
exports = eradANDSubmodule;
@@ -0,0 +1,225 @@
let Common = system.getScript("/driverlib/Common.js");
let Pinmux = system.getScript("/driverlib/pinmux.js");
let device_driverlib_peripheral =
system.getScript("/driverlib/device_driverlib_peripherals/" +
Common.getDeviceName().toLowerCase() + "_erad.js");
let CTM_MODES = [
{name: "0", displayName: "Counter Mode"},
{name: "1", displayName: "Stopwatch Mode"}
];
if(["F2838x", "F28002x", "F28003x", "F28P65x", "F28P55x"].includes(system.deviceData.deviceId))
{
CTM_MODES.push({name: "3", displayName: "Cumulative Mode"})
}
let CLOCK_SOURCE = [
{name: "0", displayName: "CPU Cycles as source"},
{name: "1", displayName: "External events as source"}
];
let COUNT_MODE= [
{name: "ERAD_COUNTER_MODE_RISING_EDGE", displayName: "Count Rising Edges"},
{name: "ERAD_COUNTER_MODE_ACTIVE", displayName: "Count CPU cycles"}
];
let COUNTER_MODES = [
{name: "true", displayName: "Reset on match"},
{name: "false", displayName: "Continuous Mode"}
];
let COMMON_SIGNAL_SOURCES = [
{ name: "ERAD_EVENT_HWBP1", displayName: "BUSCOMP1"},
{ name: "ERAD_EVENT_HWBP2", displayName: "BUSCOMP2"},
{ name: "ERAD_EVENT_HWBP3", displayName: "BUSCOMP3"},
{ name: "ERAD_EVENT_HWBP4", displayName: "BUSCOMP4"},
{ name: "ERAD_EVENT_HWBP5", displayName: "BUSCOMP5"},
{ name: "ERAD_EVENT_HWBP6", displayName: "BUSCOMP6"},
{ name: "ERAD_EVENT_HWBP7", displayName: "BUSCOMP7"},
{ name: "ERAD_EVENT_HWBP8", displayName: "BUSCOMP8"},
{ name: "ERAD_EVENT_COUNTER1", displayName: "COUNTER1 EVENT"},
{ name: "ERAD_EVENT_COUNTER2", displayName: "COUNTER2 EVENT"},
{ name: "ERAD_EVENT_COUNTER3", displayName: "COUNTER3 EVENT"},
{ name: "ERAD_EVENT_COUNTER4", displayName: "COUNTER4 EVENT"},
{ name: "ERAD_EVENT_PIE_INT1", displayName: "PIE INT1"},
{ name: "ERAD_EVENT_PIE_INT2", displayName: "PIE INT2"},
{ name: "ERAD_EVENT_PIE_INT3", displayName: "PIE INT3"},
{ name: "ERAD_EVENT_PIE_INT4", displayName: "PIE INT4"},
{ name: "ERAD_EVENT_PIE_INT5", displayName: "PIE INT5"},
{ name: "ERAD_EVENT_PIE_INT6", displayName: "PIE INT6"},
{ name: "ERAD_EVENT_PIE_INT7", displayName: "PIE INT7"},
{ name: "ERAD_EVENT_PIE_INT8", displayName: "PIE INT8"},
{ name: "ERAD_EVENT_PIE_INT9", displayName: "PIE INT9"},
{ name: "ERAD_EVENT_PIE_INT10", displayName: "PIE INT10"},
{ name: "ERAD_EVENT_PIE_INT11", displayName: "PIE INT11"},
{ name: "ERAD_EVENT_PIE_INT12", displayName: "PIE INT12"},
{ name: "ERAD_EVENT_TIMER1_TINT1", displayName: "TIMER1 TINT1"},
{ name: "ERAD_EVENT_TIMER2_TINT2", displayName: "TIMER2 TINT2"},
{ name: "ERAD_EVENT_CLA_INTERRUPT1", displayName: "CLA INTERRUPT1"},
{ name: "ERAD_EVENT_CLA_INTERRUPT2", displayName: "CLA INTERRUPT2"},
{ name: "ERAD_EVENT_CLA_INTERRUPT3", displayName: "CLA INTERRUPT3"},
{ name: "ERAD_EVENT_CLA_INTERRUPT4", displayName: "CLA INTERRUPT4"},
{ name: "ERAD_EVENT_CLA_INTERRUPT5", displayName: "CLA INTERRUPT5"},
{ name: "ERAD_EVENT_CLA_INTERRUPT8", displayName: "CLA INTERRUPT8"}
]
function onChangeCTMMode(inst, ui)
{
for (var config_i in stopwatchModeConfig)
{
ui[stopwatchModeConfig[config_i].name].hidden = (inst.ctmMode == CTM_MODES[0].name);
}
for (var config_i in counterModeConfig)
{
ui[counterModeConfig[config_i].name].hidden = !(inst.ctmMode == CTM_MODES[0].name);
}
}
function onChangeClockSource(inst, ui)
{
ui.externalClockSource.hidden = (inst.clockSource == CLOCK_SOURCE[0].name);
ui.countMode.hidden = (inst.clockSource == CLOCK_SOURCE[0].name);
}
function onChangeUseExternalResetSource(inst, ui)
{
ui.externalResetSource.hidden = !inst.useExternalResetSource;
}
var config = [
{
name: "ctmMode",
displayName : "ERAD CTM Mode",
description : 'Mode of the CTM Module',
hidden : false,
default : CTM_MODES[0].name,
options : CTM_MODES,
onChange : onChangeCTMMode
}
];
var counterModeConfig = [
{
name : "counterPeriod",
displayName : "Counter Period",
description : "The reference value for the counter to count up to!",
default : 0
},
{
name : "counterMode",
displayName : "Reset Counter on Match",
description : "Wether or not to reset the Counter when the COUNT matches the REF value",
default : false,
hidden : false
}
]
var stopwatchModeConfig = [
{
name : "swStart",
displayName : "Start Event Signal",
description : "The source to start the counter in order to increment on the clock source!",
default : device_driverlib_peripheral.ERAD_Counter_Input_Event[0].name,
options : device_driverlib_peripheral.ERAD_Counter_Input_Event,
hidden : true
},
{
name : "swStop",
displayName : "Stop Event Signal",
description : "The source to stop the counter.",
default : device_driverlib_peripheral.ERAD_Counter_Input_Event[0].name,
options : device_driverlib_peripheral.ERAD_Counter_Input_Event,
hidden : true
},
{
name : "swReferenceCount",
displayName : "Reference Counter Value",
description : "The reference value for the counter to generate a HALT or Interrupt!",
default : 0,
hidden : true
},
]
var commonConfig = [
{
name : "clockSource",
displayName : "Clock Source",
description : "The clock source used for incrementing the counter",
default : CLOCK_SOURCE[0].name,
options : CLOCK_SOURCE,
onChange : onChangeClockSource
},
{
name : "externalClockSource",
displayName : "External Clock Source",
description : "The clock source used for incrementing the counter from external signals rising edge",
default : device_driverlib_peripheral.ERAD_Counter_Input_Event[0].name,
options : device_driverlib_peripheral.ERAD_Counter_Input_Event,
hidden : true
},
{
name : "countMode",
displayName : "Count Mode",
description : "Choose to count Rising edges or Active duration",
default : COUNT_MODE[0].name,
options : COUNT_MODE,
hidden : true
},
{
name : "useExternalResetSource",
displayName : "Use an External Reset Source",
description : "Whether or not to use an external reset source for the counter",
default : false,
onChange : onChangeUseExternalResetSource,
hidden : false
},
{
name : "externalResetSource",
displayName : "External Reset Source",
description : "The reset source used to set the counter to 0, coming from external signals rising edge",
default : device_driverlib_peripheral.ERAD_Counter_Input_Event[0].name,
options : device_driverlib_peripheral.ERAD_Counter_Input_Event,
hidden : true
},
{
name : "haltCPU",
displayName : "Halt CPU on Count Match",
description : "Wether or not to halt the CPU when the COUNT matches the REF value",
default : false
},
{
name : "rtosInterrupt",
displayName : "Generate RTOS Interrupt on Count Match",
description : "Wether or not to generate RTOS interrupt when the COUNT matches the REF value",
default : false
}
]
if(["F2838x", "F28002x", "F28003x", "F28P65x", "F28P55x"].includes(system.deviceData.deviceId))
{
commonConfig.push({
name : "NMIInterrupt",
displayName : "Generate NMI Interrupt on Match",
description : "Wether or not to generate NMI interrupt when the HWBP matches the REF value",
default : false})
}
config = config.concat(counterModeConfig);
config = config.concat(stopwatchModeConfig);
config = config.concat(commonConfig);
var eradCTMSubmodule = {
displayName: "ERAD CTM",
maxInstances: 4,
defaultInstanceName: "ERAD_CTM",
description: "ERAD Counter",
config: config,
templates: {
boardc : "", //"/gpio/gpio.board.c.xdt",
boardh : ""//"/gpio/gpio.board.h.xdt"
},
};
exports = eradCTMSubmodule;
@@ -0,0 +1,120 @@
let Common = system.getScript("/driverlib/Common.js");
let Pinmux = system.getScript("/driverlib/pinmux.js");
let ADDRESS_INPUT_MODE = [
{name: "MANUAL", displayName: "Manual"},
{name: "CODE", displayName: "Variable/Function Name"}
]
let BUS_SEL_MODE = [
{name: "ERAD_BUSCOMP_BUS_PAB", displayName: "Program Address Bus (PAB) for instruction fetches"},
{name: "ERAD_BUSCOMP_BUS_VPC", displayName: "Program Counter (VPC) for program counter matches"},
{name: "ERAD_BUSCOMP_BUS_DWAB", displayName: "Data Write Accesses (DWAB) for writes to memory"},
{name: "ERAD_BUSCOMP_BUS_DRAB", displayName: "Data Read Accesses (DRAB) for read from memory"},
{name: "ERAD_BUSCOMP_BUS_DWDB", displayName: "Data Write Data Match (DWDB)"}
]
let COMP_MODE = [
{name: "ERAD_BUSCOMP_COMPMODE_EQ", displayName: "Use a MASK value for the address matching"},
{name: "ERAD_BUSCOMP_COMPMODE_GT", displayName: "Address is greater than reference address"},
{name: "ERAD_BUSCOMP_COMPMODE_GE", displayName: "Address is greater than or equal to reference address"},
{name: "ERAD_BUSCOMP_COMPMODE_LT", displayName: "Address is less than reference address"},
{name: "ERAD_BUSCOMP_COMPMODE_LE", displayName: "Address is less than or equal reference address"}
]
function onChangeAddressInputMode(inst, ui)
{
ui.hwbpRefCodeName.hidden = (inst.hwbpAddressInputMode == ADDRESS_INPUT_MODE[0].name)
ui.hwbpRef.hidden = !(inst.hwbpAddressInputMode == ADDRESS_INPUT_MODE[0].name)
ui.hwbpMask.hidden = !((inst.hwbpCompMode == COMP_MODE[0].name) &&
(!ui.hwbpCompMode.hidden))
}
var config = [
{
name: "hwbpBusSel",
displayName : "Address Monitoring Type",
description : 'Type of address monitoring for the HWBP.',
hidden : false,
default : BUS_SEL_MODE[1].name,
options : BUS_SEL_MODE,
onChange : onChangeAddressInputMode
},
{
name: "hwbpAddressInputMode",
displayName : "Address Input Type",
description : 'Type of address input.',
hidden : false,
default : ADDRESS_INPUT_MODE[0].name,
options : ADDRESS_INPUT_MODE,
onChange : onChangeAddressInputMode
},
{
name: "hwbpRefCodeName",
displayName : "Void pointer to Function/Variable",
description : 'Address for the HWBP to monitor.',
hidden : true,
default : "",
},
{
name: "hwbpCompMode",
displayName : "Reference Address Compare Type",
description : "Use a mask or a select a comparison type for the reference address",
hidden : false,
default : COMP_MODE[0].name,
options : COMP_MODE,
onChange : onChangeAddressInputMode
},
{
name: "hwbpMask",
displayName : "Address Mask",
description : 'Address mask applied to the HWBP_REF address.',
hidden : false,
default : 0,
},
{
name: "hwbpRef",
displayName : "Reference Address",
description : 'Address for the HWBP to monitor.',
hidden : false,
default : 0,
},
{
name : "haltCPU",
displayName : "Halt CPU on Match",
description : "Wether or not to halt the CPU when the HWBP matches the REF value",
default : false
},
{
name : "rtosInterrupt",
displayName : "Generate RTOS Interrupt on Match",
description : "Wether or not to generate RTOS interrupt when the HWBP matches the REF value",
default : false
}
];
if(["F2838x", "F28002x", "F28003x", "F28P65x", "F28P55x"].includes(system.deviceData.deviceId))
{
config.push({
name : "NMIInterrupt",
displayName : "Generate NMI Interrupt on Match",
description : "Wether or not to generate NMI interrupt when the HWBP matches the REF value",
default : false})
}
var eradHWBPSubmodule = {
displayName: "ERAD HWBP",
maxInstances: 8,
defaultInstanceName: "ERAD_HWBP",
description: "ERAD HWBP",
config: config,
templates: {
boardc : "", //"/gpio/gpio.board.c.xdt",
boardh : ""//"/gpio/gpio.board.h.xdt"
},
};
exports = eradHWBPSubmodule;
@@ -0,0 +1,45 @@
let Common = system.getScript("/driverlib/Common.js");
let Pinmux = system.getScript("/driverlib/pinmux.js");
let BUSCOMPS_USED = [
{name: "BUSCOMP1"},
{name: "BUSCOMP2"},
{name: "BUSCOMP3"},
{name: "BUSCOMP4"},
{name: "BUSCOMP5"},
{name: "BUSCOMP6"},
{name: "BUSCOMP7"},
{name: "BUSCOMP8"}
]
var config = [
{
name : "busComptoOR",
displayName : "Bus Comparators used:",
description : "Choose which bus comparators to OR",
hidden : false,
default : [],
minSelections: 0,
options : BUSCOMPS_USED
},
{
name : "rtosInterrupt",
displayName : "Generate RTOS Interrupt on Count Match",
description : "Wether or not to generate RTOS interrupt when the COUNT matches the REF value",
default : false
}
]
var eradORSubmodule = {
displayName: "ERAD OR MASK",
maxInstances: 4,
defaultInstanceName: "ERAD_OR_MASK",
description: "ERAD Or Mask",
config: config,
templates: {
boardc : "", //"/gpio/gpio.board.c.xdt",
boardh : ""//"/gpio/gpio.board.h.xdt"
},
};
exports = eradORSubmodule;