Compare commits

..

No commits in common. "5d672d48d47de75013dd8619a8b8cc2c0c8e02ba" and "99a2ca4f0d147c0cb9aa566850c9a9c35df1922c" have entirely different histories.

53 changed files with 142 additions and 1458 deletions

View File

@ -2,3 +2,25 @@
SUBSYSTEM=="usb", ATTRS{idVendor}=="093c", GROUP="users", MODE="0666"
KERNEL=="ttyUSB?", ATTRS{idVendor}=="093c", GROUP="users", MODE="0666"
KERNEL=="ttyACM?", ATTRS{idVendor}=="093c", GROUP="users", MODE="0666"
# neoVI ION/PLASMA PIDs are not in the latest ftdi_sio driver so lets make a
# rule to add it when we see a new unclaimed device.
# PLASMA = 0x0801, ION = 0x0901
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
ATTRS{idVendor}=="093c", ATTRS{idProduct}=="0801", \
DRIVER=="", \
RUN+="/sbin/modprobe -b ftdi_sio"
ACTION=="add", SUBSYSTEM=="drivers", \
ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \
ATTR{new_id}="093c 0801"
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
ATTRS{idVendor}=="093c", ATTRS{idProduct}=="0901", \
DRIVER=="", \
RUN+="/sbin/modprobe -b ftdi_sio"
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
ATTRS{idVendor}=="093c", ATTRS{idProduct}=="1000", \
DRIVER=="", \
RUN+="/sbin/modprobe -b ftdi_sio"
ACTION=="add", SUBSYSTEM=="drivers", \
ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \
ATTR{new_id}="093c 0901"

View File

@ -39,8 +39,6 @@ pybind11_add_module(icsneopy
icsneopy/communication/message/filter/messagefilter.cpp
icsneopy/flexray/flexray.cpp
icsneopy/disk/diskdriver.cpp
icsneopy/device/chipid.cpp
icsneopy/device/versionreport.cpp
icsneopy/device/device.cpp
icsneopy/device/extensions/deviceextension.cpp
icsneopy/device/idevicesettings.cpp

View File

@ -1,135 +0,0 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h>
#include "icsneo/device/chipid.h"
namespace icsneo {
void init_chipid(pybind11::module_& m) {
pybind11::enum_<ChipID>(m, "ChipID")
.value("neoVIFIRE_MCHIP", ChipID::neoVIFIRE_MCHIP)
.value("neoVIFIRE_LCHIP", ChipID::neoVIFIRE_LCHIP)
.value("neoVIFIRE_UCHIP", ChipID::neoVIFIRE_UCHIP)
.value("neoVIFIRE_JCHIP", ChipID::neoVIFIRE_JCHIP)
.value("ValueCAN3_MCHIP", ChipID::ValueCAN3_MCHIP)
.value("neoVIECU_MPIC", ChipID::neoVIECU_MPIC)
.value("neoVIIEVB_MPIC", ChipID::neoVIIEVB_MPIC)
.value("neoVIPENDANT_MPIC", ChipID::neoVIPENDANT_MPIC)
.value("neoVIFIRE_VNET_MCHIP", ChipID::neoVIFIRE_VNET_MCHIP)
.value("neoVIFIRE_VNET_LCHIP", ChipID::neoVIFIRE_VNET_LCHIP)
.value("neoVIPLASMA_Core", ChipID::neoVIPLASMA_Core)
.value("neoVIPLASMA_HID", ChipID::neoVIPLASMA_HID)
.value("neoVIANALOG_MPIC", ChipID::neoVIANALOG_MPIC)
.value("neoVIPLASMA_ANALOG_Core", ChipID::neoVIPLASMA_ANALOG_Core)
.value("neoVIPLASMA_FlexRay_Core", ChipID::neoVIPLASMA_FlexRay_Core)
.value("neoVIPLASMA_Core_1_12", ChipID::neoVIPLASMA_Core_1_12)
.value("neoVIFIRE_Slave_VNET_MCHIP", ChipID::neoVIFIRE_Slave_VNET_MCHIP)
.value("neoVIFIRE_Slave_VNET_LCHIP", ChipID::neoVIFIRE_Slave_VNET_LCHIP)
.value("neoVIION_Core", ChipID::neoVIION_Core)
.value("neoVIION_HID", ChipID::neoVIION_HID)
.value("neoVIION_Core_Loader", ChipID::neoVIION_Core_Loader)
.value("neoVIION_HID_Loader", ChipID::neoVIION_HID_Loader)
.value("neoVIION_FPGA_BIT", ChipID::neoVIION_FPGA_BIT)
.value("neoVIFIRE_VNET_EP_MCHIP", ChipID::neoVIFIRE_VNET_EP_MCHIP)
.value("neoVIFIRE_VNET_EP_LCHIP", ChipID::neoVIFIRE_VNET_EP_LCHIP)
.value("neoVIAnalogOut_MCHIP", ChipID::neoVIAnalogOut_MCHIP)
.value("neoVIMOST25_MCHIP", ChipID::neoVIMOST25_MCHIP)
.value("neoVIMOST50_MCHIP", ChipID::neoVIMOST50_MCHIP)
.value("neoVIMOST150_MCHIP", ChipID::neoVIMOST150_MCHIP)
.value("ValueCAN4_4_MCHIP", ChipID::ValueCAN4_4_MCHIP)
.value("ValueCAN4_4_SCHIP", ChipID::ValueCAN4_4_SCHIP)
.value("cmProbe_ZYNQ", ChipID::cmProbe_ZYNQ)
.value("EEVB_STM32", ChipID::EEVB_STM32)
.value("neoVIFIRE_Slave_VNET_EP_MCHIP", ChipID::neoVIFIRE_Slave_VNET_EP_MCHIP)
.value("neoVIFIRE_Slave_VNET_EP_LCHIP", ChipID::neoVIFIRE_Slave_VNET_EP_LCHIP)
.value("RADStar_MCHIP", ChipID::RADStar_MCHIP)
.value("ValueCANrf_MCHIP", ChipID::ValueCANrf_MCHIP)
.value("neoVIFIRE2_MCHIP", ChipID::neoVIFIRE2_MCHIP)
.value("neoVIFIRE2_CCHIP", ChipID::neoVIFIRE2_CCHIP)
.value("neoVIFIRE2_Core", ChipID::neoVIFIRE2_Core)
.value("neoVIFIRE2_BLECHIP", ChipID::neoVIFIRE2_BLECHIP)
.value("neoVIFIRE2_ZYNQ", ChipID::neoVIFIRE2_ZYNQ)
.value("neoVIFIRE2_SECURITYCHIP", ChipID::neoVIFIRE2_SECURITYCHIP)
.value("RADGalaxy_ZYNQ", ChipID::RADGalaxy_ZYNQ)
.value("neoVIFIRE2_VNET_MCHIP", ChipID::neoVIFIRE2_VNET_MCHIP)
.value("neoVIFIRE2_Slave_VNET_A_MCHIP", ChipID::neoVIFIRE2_Slave_VNET_A_MCHIP)
.value("neoVIFIRE2_Slave_VNET_A_CCHIP", ChipID::neoVIFIRE2_Slave_VNET_A_CCHIP)
.value("neoVIFIRE2_VNET_CCHIP", ChipID::neoVIFIRE2_VNET_CCHIP)
.value("neoVIFIRE2_VNET_Core", ChipID::neoVIFIRE2_VNET_Core)
.value("RADStar2_ZYNQ", ChipID::RADStar2_ZYNQ)
.value("VividCAN_MCHIP", ChipID::VividCAN_MCHIP)
.value("neoOBD2SIM_MCHIP", ChipID::neoOBD2SIM_MCHIP)
.value("neoVIFIRE2_VNETZ_MCHIP", ChipID::neoVIFIRE2_VNETZ_MCHIP)
.value("neoVIFIRE2_VNETZ_ZYNQ", ChipID::neoVIFIRE2_VNETZ_ZYNQ)
.value("neoVIFIRE2_Slave_VNETZ_A_MCHIP", ChipID::neoVIFIRE2_Slave_VNETZ_A_MCHIP)
.value("neoVIFIRE2_Slave_VNETZ_A_ZYNQ", ChipID::neoVIFIRE2_Slave_VNETZ_A_ZYNQ)
.value("VividCAN_EXT_FLASH", ChipID::VividCAN_EXT_FLASH)
.value("VividCAN_NRF52", ChipID::VividCAN_NRF52)
.value("cmProbe_ZYNQ_Unused", ChipID::cmProbe_ZYNQ_Unused)
.value("neoOBD2PRO_MCHIP", ChipID::neoOBD2PRO_MCHIP)
.value("ValueCAN4_1_MCHIP", ChipID::ValueCAN4_1_MCHIP)
.value("ValueCAN4_2_MCHIP", ChipID::ValueCAN4_2_MCHIP)
.value("ValueCAN4_4_2EL_Core", ChipID::ValueCAN4_4_2EL_Core)
.value("neoOBD2PRO_SCHIP", ChipID::neoOBD2PRO_SCHIP)
.value("ValueCAN4_2EL_MCHIP", ChipID::ValueCAN4_2EL_MCHIP)
.value("neoECUAVBTSN_MCHIP", ChipID::neoECUAVBTSN_MCHIP)
.value("neoOBD2PRO_Core", ChipID::neoOBD2PRO_Core)
.value("RADSupermoon_ZYNQ", ChipID::RADSupermoon_ZYNQ)
.value("RADMoon2_ZYNQ", ChipID::RADMoon2_ZYNQ)
.value("VividCANPRO_MCHIP", ChipID::VividCANPRO_MCHIP)
.value("VividCANPRO_EXT_FLASH", ChipID::VividCANPRO_EXT_FLASH)
.value("RADPluto_MCHIP", ChipID::RADPluto_MCHIP)
.value("RADMars_ZYNQ", ChipID::RADMars_ZYNQ)
.value("neoECU12_MCHIP", ChipID::neoECU12_MCHIP)
.value("RADIOCANHUB_MCHIP", ChipID::RADIOCANHUB_MCHIP)
.value("FlexRay_VNETZ_ZCHIP", ChipID::FlexRay_VNETZ_ZCHIP)
.value("neoOBD2_LCBADGE_MCHIP", ChipID::neoOBD2_LCBADGE_MCHIP)
.value("neoOBD2_LCBADGE_SCHIP", ChipID::neoOBD2_LCBADGE_SCHIP)
.value("RADMoonDuo_MCHIP", ChipID::RADMoonDuo_MCHIP)
.value("neoVIFIRE3_ZCHIP", ChipID::neoVIFIRE3_ZCHIP)
.value("FlexRay_VNETZ_FCHIP", ChipID::FlexRay_VNETZ_FCHIP)
.value("RADJupiter_MCHIP", ChipID::RADJupiter_MCHIP)
.value("ValueCAN4Industrial_MCHIP", ChipID::ValueCAN4Industrial_MCHIP)
.value("EtherBADGE_MCHIP", ChipID::EtherBADGE_MCHIP)
.value("RADMars_3_ZYNQ", ChipID::RADMars_3_ZYNQ)
.value("RADGigastar_USBZ_ZYNQ", ChipID::RADGigastar_USBZ_ZYNQ)
.value("RADGigastar_ZYNQ", ChipID::RADGigastar_ZYNQ)
.value("RAD4G_MCHIP", ChipID::RAD4G_MCHIP)
.value("neoVIFIRE3_SCHIP", ChipID::neoVIFIRE3_SCHIP)
.value("RADEpsilon_MCHIP", ChipID::RADEpsilon_MCHIP)
.value("RADA2B_ZCHIP", ChipID::RADA2B_ZCHIP)
.value("neoOBD2Dev_MCHIP", ChipID::neoOBD2Dev_MCHIP)
.value("neoOBD2Dev_SCHIP", ChipID::neoOBD2Dev_SCHIP)
.value("neoOBD2SIMDoIP_MCHIP", ChipID::neoOBD2SIMDoIP_MCHIP)
.value("SFPModule_MCHIP", ChipID::SFPModule_MCHIP)
.value("RADEpsilonT_MCHIP", ChipID::RADEpsilonT_MCHIP)
.value("RADEpsilonExpress_MCHIP", ChipID::RADEpsilonExpress_MCHIP)
.value("RADProxima_MCHIP", ChipID::RADProxima_MCHIP)
.value("NewDevice57_ZCHIP", ChipID::NewDevice57_ZCHIP)
.value("RAD_GALAXY_2_ZMPCHIP_ID", ChipID::RAD_GALAXY_2_ZMPCHIP_ID)
.value("NewDevice59_MCHIP", ChipID::NewDevice59_MCHIP)
.value("RADMoon2_Z7010_ZYNQ", ChipID::RADMoon2_Z7010_ZYNQ)
.value("neoVIFIRE2_CORE_SG4", ChipID::neoVIFIRE2_CORE_SG4)
.value("RADBMS_MCHIP", ChipID::RADBMS_MCHIP)
.value("RADMoon2_ZL_MCHIP", ChipID::RADMoon2_ZL_MCHIP)
.value("RADGigastar_USBZ_Z7010_ZYNQ", ChipID::RADGigastar_USBZ_Z7010_ZYNQ)
.value("neoVIFIRE3_LINUX", ChipID::neoVIFIRE3_LINUX)
.value("RADGigastar_USBZ_Z7007S_ZYNQ", ChipID::RADGigastar_USBZ_Z7007S_ZYNQ)
.value("VEM_01_8DW_ZCHIP", ChipID::VEM_01_8DW_ZCHIP)
.value("RADGalaxy_FFG_Zynq", ChipID::RADGalaxy_FFG_Zynq)
.value("RADMoon3_MCHIP", ChipID::RADMoon3_MCHIP)
.value("RADComet_ZYNQ", ChipID::RADComet_ZYNQ)
.value("VEM_02_FR_ZCHIP", ChipID::VEM_02_FR_ZCHIP)
.value("RADA2B_REVB_ZCHIP", ChipID::RADA2B_REVB_ZCHIP)
.value("RADGigastar_FFG_ZYNQ", ChipID::RADGigastar_FFG_ZYNQ)
.value("VEM_02_FR_FCHIP", ChipID::VEM_02_FR_FCHIP)
.value("Connect_ZCHIP", ChipID::Connect_ZCHIP)
.value("RADGALAXY2_SYSMON_CHIP", ChipID::RADGALAXY2_SYSMON_CHIP)
.value("RADCOMET3_ZCHIP", ChipID::RADCOMET3_ZCHIP)
.value("Connect_LINUX", ChipID::Connect_LINUX)
.value("RADGigastar2_ZYNQ", ChipID::RADGigastar2_ZYNQ)
.value("Invalid", ChipID::Invalid);
}
} // namespace icsneo

View File

@ -56,7 +56,6 @@ void init_device(pybind11::module_& m) {
.def("upload_coremini", [](Device& device, std::string& path, Disk::MemoryType memType) { std::ifstream ifs(path, std::ios::binary); return device.uploadCoremini(ifs, memType); }, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("write_macsec_config", &Device::writeMACsecConfig, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("send_eth_phy_msg", &Device::sendEthPhyMsg, pybind11::arg("message"), pybind11::arg("timeout") = std::chrono::milliseconds(50), pybind11::call_guard<pybind11::gil_scoped_release>())
.def("get_chip_versions", &Device::getChipVersions, pybind11::arg("refreshComponents") = true, pybind11::call_guard<pybind11::gil_scoped_release>())
.def_readonly("settings", &Device::settings);
}

View File

@ -1,19 +0,0 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h>
#include "icsneo/device/versionreport.h"
namespace icsneo {
void init_versionreport(pybind11::module_& m) {
pybind11::class_<VersionReport>(m, "VersionReport")
.def_readonly("id", &VersionReport::id)
.def_readonly("name", &VersionReport::name)
.def_readonly("major", &VersionReport::major)
.def_readonly("minor", &VersionReport::minor)
.def_readonly("maintenance", &VersionReport::maintenance)
.def_readonly("build", &VersionReport::build);
}
} // namespace icsneo

View File

@ -26,8 +26,6 @@ void init_macsecmessage(pybind11::module_&);
void init_scriptstatusmessage(pybind11::module_&);
void init_diskdriver(pybind11::module_&);
void init_deviceextension(pybind11::module_&);
void init_chipid(pybind11::module_&);
void init_versionreport(pybind11::module_&);
void init_device(pybind11::module_&);
void init_messagefilter(pybind11::module_&);
void init_messagecallback(pybind11::module_&);
@ -65,8 +63,6 @@ PYBIND11_MODULE(icsneopy, m) {
init_diskdriver(m);
init_flexray(m);
init_ethphymessage(m);
init_chipid(m);
init_versionreport(m);
init_device(m);
init_deviceextension(m);
init_idevicesettings(m);

View File

@ -207,71 +207,6 @@ bool Device::refreshComponentVersions() {
return false;
}
std::vector<VersionReport> Device::getChipVersions(bool refreshComponents) {
if(refreshComponents) {
refreshComponentVersions();
}
std::vector<VersionReport> chipVersions;
if (supportsComponentVersions()) {
const auto& compVersions = getComponentVersions();
auto disectVersion = [](uint32_t dotVersion) {
std::array<uint8_t, 4> result = {0,0,0,0};
size_t i = 0;
if(dotVersion & 0xFF000000ul) {
result[i++] = (uint8_t)((dotVersion & 0xFF000000ul) >> 24);
result[i++] = (uint8_t)((dotVersion & 0x00FF0000ul) >> 16);
} else if(dotVersion & 0x00FF0000ul) {
result[i++] = (uint8_t)((dotVersion & 0x00FF0000ul) >> 16);
}
result[i++] = (uint8_t)((dotVersion & 0x0000FF00ul) >> 8);
result[i] = (uint8_t)((dotVersion & 0x000000FFul) >> 0);
return result;
};
for(const auto& chipInfo : getChipInfo()) {
for(const auto& component : compVersions) {
if(component.identifier == (uint32_t)chipInfo.id) {
chipVersions.emplace_back();
auto& version = chipVersions.back();
auto disectedVersion = disectVersion(component.dotVersion);
version.id = chipInfo.id;
version.name = chipInfo.name;
version.major = disectedVersion[0];
version.minor = disectedVersion[1];
version.maintenance = disectedVersion[2];
version.build = disectedVersion[3];
}
}
}
} else {
const auto& appVersions = getVersions();
for(const auto& chipInfo : getChipInfo()) {
if(!chipInfo.defaultEnabled) {
continue;
}
if(appVersions.size() <= chipInfo.versionIndex) {
continue;
}
const auto& appVer = appVersions[chipInfo.versionIndex];
if(!appVer) {
continue;
}
chipVersions.emplace_back();
auto& version = chipVersions.back();
version.id = chipInfo.id;
version.name = chipInfo.name;
version.major = appVer->major;
version.minor = appVer->minor;
version.maintenance = 0;
version.build = 0;
}
}
return chipVersions;
}
bool Device::open(OpenFlags flags, OpenStatusHandler handler) {
if(!com) {
report(APIEvent::Type::Unknown, APIEvent::Severity::Error);

View File

@ -66,11 +66,3 @@ Complete Ethernet Example
.. literalinclude:: ../../examples/python/ethernet/ethernet_complete_example.py
:language: python
Device Firmware/Chip Versions
=============================
:download:`Download example <../../examples/python/device/chip_versions.py>`
.. literalinclude:: ../../examples/python/device/chip_versions.py
:language: python

View File

@ -1,30 +0,0 @@
import icsneopy
def chip_versions():
devices = icsneopy.find_all_devices()
if len(devices) == 0:
print("no devices found")
return False
device = devices[0]
print(f"selected {device}")
if not device.open():
print("unable to open device")
return False
chip_versions = device.get_chip_versions()
if not chip_versions:
print("no chip versions")
return False
print("chip versions:")
for i in chip_versions:
version = f"{i.major}.{i.minor}.{i.maintenance}.{i.build}"
print(f" id: {i.id}, name: {i.name}, version: {version}")
return True
if __name__ == "__main__":
chip_versions()

View File

@ -1,117 +0,0 @@
#ifndef __BOOTLOADER_PIPELINE_H_
#define __BOOTLOADER_PIPELINE_H_
#ifdef __cplusplus
#include "icsneo/device/chipid.h"
#include <vector>
#include <memory>
#include <variant>
#include <utility>
namespace icsneo {
enum class BootloaderCommunication {
RAD,
RED,
REDCore,
RADGalaxy2Peripheral,
RADMultiChip,
Application,
Invalid
};
struct BootloaderPhase {
enum class Type {
Flash,
Finalize,
Reconnect,
EnterBootloader,
Wait
};
virtual Type getType() const = 0;
virtual ~BootloaderPhase() = default;
};
struct ReconnectPhase : public BootloaderPhase {
Type getType() const override {
return Type::Reconnect;
}
ReconnectPhase() = default;
};
struct FinalizePhase : public BootloaderPhase {
Type getType() const override {
return Type::Finalize;
}
ChipID chip;
BootloaderCommunication comm;
FinalizePhase(ChipID chip, BootloaderCommunication comm) : chip(chip), comm(comm) {}
};
struct WaitPhase : public BootloaderPhase {
Type getType() const override {
return Type::Wait;
}
std::chrono::milliseconds timeout;
WaitPhase(std::chrono::milliseconds timeout) : timeout(timeout) {}
};
struct EnterBootloaderPhase : public BootloaderPhase {
Type getType() const override {
return Type::EnterBootloader;
}
};
struct FlashPhase : public BootloaderPhase {
Type getType() const override {
return Type::Flash;
}
ChipID chip;
BootloaderCommunication comm;
bool authenticate = true;
bool encrypt = true;
bool checkOutOfDate = true;
FlashPhase(ChipID chip, BootloaderCommunication comm, bool authenticate = true, bool encrypt = true, bool checkOutOfDate = true)
: chip(chip), comm(comm), authenticate(authenticate), encrypt(encrypt), checkOutOfDate(checkOutOfDate) {}
};
enum class BootloaderSetting {
UpdateAll
};
struct BootloaderPipeline {
std::vector<std::shared_ptr<BootloaderPhase>> phases;
std::unordered_map<BootloaderSetting, std::variant<int, bool>> settings;
template<typename Phase, typename... Args>
BootloaderPipeline& add(Args... args) {
phases.emplace_back(std::make_shared<Phase>(std::forward<Args>(args)...));
return *this;
}
BootloaderPipeline& addSetting(BootloaderSetting type, const std::variant<int, bool>& setting) {
settings.insert({type, setting});
return *this;
}
operator bool() const {
return !phases.empty();
}
};
}
#endif // __cplusplus
#endif

View File

@ -1,139 +0,0 @@
#ifndef __CHIP_ID_H_
#define __CHIP_ID_H_
#ifdef __cplusplus
#include <cstdint>
namespace icsneo {
enum class ChipID : uint8_t {
neoVIFIRE_MCHIP = 0,
neoVIFIRE_LCHIP = 1,
neoVIFIRE_UCHIP = 2,
neoVIFIRE_JCHIP = 3,
ValueCAN3_MCHIP = 4,
neoVIECU_MPIC = 6,
neoVIIEVB_MPIC = 7,
neoVIPENDANT_MPIC = 8,
neoVIFIRE_VNET_MCHIP = 9,
neoVIFIRE_VNET_LCHIP = 10,
neoVIPLASMA_Core = 11,
neoVIPLASMA_HID = 12,
neoVIANALOG_MPIC = 13,
neoVIPLASMA_ANALOG_Core = 14,
neoVIPLASMA_FlexRay_Core = 15,
neoVIPLASMA_Core_1_12 = 16,
neoVIFIRE_Slave_VNET_MCHIP = 17,
neoVIFIRE_Slave_VNET_LCHIP = 18,
neoVIION_Core = 19,
neoVIION_HID = 20,
neoVIION_Core_Loader = 21,
neoVIION_HID_Loader = 22,
neoVIION_FPGA_BIT = 23,
neoVIFIRE_VNET_EP_MCHIP = 24,
neoVIFIRE_VNET_EP_LCHIP = 25,
neoVIAnalogOut_MCHIP = 26,
neoVIMOST25_MCHIP = 27,
neoVIMOST50_MCHIP = 28,
neoVIMOST150_MCHIP = 29,
ValueCAN4_4_MCHIP = 30,
ValueCAN4_4_SCHIP = 31,
cmProbe_ZYNQ = 33,
EEVB_STM32 = 34,
neoVIFIRE_Slave_VNET_EP_MCHIP = 35,
neoVIFIRE_Slave_VNET_EP_LCHIP = 36,
RADStar_MCHIP = 37,
ValueCANrf_MCHIP = 38,
neoVIFIRE2_MCHIP = 39,
neoVIFIRE2_CCHIP = 40,
neoVIFIRE2_Core = 41,
neoVIFIRE2_BLECHIP = 42,
neoVIFIRE2_ZYNQ = 43, // FIRE2 MVNET Z - Zynq
neoVIFIRE2_SECURITYCHIP = 44,
RADGalaxy_ZYNQ = 45,
neoVIFIRE2_VNET_MCHIP = 46,
neoVIFIRE2_Slave_VNET_A_MCHIP = 47,
neoVIFIRE2_Slave_VNET_A_CCHIP = 48,
neoVIFIRE2_VNET_CCHIP = 49,
neoVIFIRE2_VNET_Core = 50,
RADStar2_ZYNQ = 51,
VividCAN_MCHIP = 52,
neoOBD2SIM_MCHIP = 53,
neoVIFIRE2_VNETZ_MCHIP = 54,
neoVIFIRE2_VNETZ_ZYNQ = 55,
neoVIFIRE2_Slave_VNETZ_A_MCHIP = 56,
neoVIFIRE2_Slave_VNETZ_A_ZYNQ = 57,
VividCAN_EXT_FLASH = 58,
VividCAN_NRF52 = 59,
cmProbe_ZYNQ_Unused = 60, // Double defined
neoOBD2PRO_MCHIP = 61,
ValueCAN4_1_MCHIP = 62,
ValueCAN4_2_MCHIP = 63,
ValueCAN4_4_2EL_Core = 64,
neoOBD2PRO_SCHIP = 65,
ValueCAN4_2EL_MCHIP = 67,
neoECUAVBTSN_MCHIP = 68,
neoOBD2PRO_Core = 69,
RADSupermoon_ZYNQ = 70,
RADMoon2_ZYNQ = 71,
VividCANPRO_MCHIP = 72,
VividCANPRO_EXT_FLASH = 73,
RADPluto_MCHIP = 74,
RADMars_ZYNQ = 75,
neoECU12_MCHIP = 76,
RADIOCANHUB_MCHIP = 77,
FlexRay_VNETZ_ZCHIP = 78,
neoOBD2_LCBADGE_MCHIP = 79,
neoOBD2_LCBADGE_SCHIP = 80,
RADMoonDuo_MCHIP = 81,
neoVIFIRE3_ZCHIP = 82,
FlexRay_VNETZ_FCHIP = 83,
RADJupiter_MCHIP = 84,
ValueCAN4Industrial_MCHIP = 85,
EtherBADGE_MCHIP = 86,
RADMars_3_ZYNQ = 87,
RADGigastar_USBZ_ZYNQ = 88,
RADGigastar_ZYNQ = 89,
RAD4G_MCHIP = 90,
neoVIFIRE3_SCHIP = 91,
RADEpsilon_MCHIP = 92,
RADA2B_ZCHIP = 93,
neoOBD2Dev_MCHIP = 94,
neoOBD2Dev_SCHIP = 95,
neoOBD2SIMDoIP_MCHIP = 96,
SFPModule_MCHIP = 97,
RADEpsilonT_MCHIP = 98,
RADEpsilonExpress_MCHIP = 99,
RADProxima_MCHIP = 100,
NewDevice57_ZCHIP = 101,
RAD_GALAXY_2_ZMPCHIP_ID = 102,
NewDevice59_MCHIP = 103,
RADMoon2_Z7010_ZYNQ = 104,
neoVIFIRE2_CORE_SG4 = 105,
RADBMS_MCHIP = 106,
RADMoon2_ZL_MCHIP = 107,
RADGigastar_USBZ_Z7010_ZYNQ = 108,
neoVIFIRE3_LINUX = 109,
RADGigastar_USBZ_Z7007S_ZYNQ = 110,
VEM_01_8DW_ZCHIP = 111,
RADGalaxy_FFG_Zynq = 112,
RADMoon3_MCHIP = 113,
RADComet_ZYNQ = 114,
VEM_02_FR_ZCHIP = 115,
RADA2B_REVB_ZCHIP = 116,
RADGigastar_FFG_ZYNQ = 117,
VEM_02_FR_FCHIP = 118,
Connect_ZCHIP = 121,
RADGALAXY2_SYSMON_CHIP = 123,
RADCOMET3_ZCHIP = 125,
Connect_LINUX = 126,
RADGigastar2_ZYNQ = 131,
Invalid = 255
};
}
#endif // __cplusplus
#endif

View File

@ -1,59 +0,0 @@
#ifndef __CHIP_INFO_H_
#define __CHIP_INFO_H_
#ifdef __cplusplus
#include "icsneo/device/chipid.h"
#include <vector>
namespace icsneo {
enum class FirmwareType {
IEF,
Zip
};
struct ChipInfo {
/**
* The default enabled field is for devices which can't deduce the specific ChipID of a device
* until entering the bootloader.
*
* If defaultEnabled is set to true, the bootloader and version retrieval functions assume that
* the chip is enabled, so it will perform version deduction based on the default enabled chip. If
* defaultEnabled is set to false, then this chip info may or may not apply to this device
*
* Example: RADA2B RevA and RevB chips
*
* Sometimes we can't deduce whether we have a RevA or RevB chip before entering the bootloader if the
* device does not support component versions. These chips track the same version, so we assume that the
* chip is RevA (RevA defaultEnabled=true, RevB defaultEnabled=false) and check during the bootloader
* if this chip is RevA or RevB.
*/
ChipID id;
bool defaultEnabled = false;
const char* name = nullptr; // Chip user displayable name
const char* iefName = nullptr; // IEF name for a single segment chip (example RADA2B ZCHIP)
size_t versionIndex = 0; // Main and Secondary version index
FirmwareType fwType; // Firmwaare storagae type
std::vector<const char*> iefSegments; // IEF names for a multi segment chip (example RADGalaxy2 ZCHIP)
ChipInfo() = default;
ChipInfo(ChipID id, bool defaultEnabled, const char* name, const char* iefName, size_t versionIndex, FirmwareType fwType)
: id(id), defaultEnabled(defaultEnabled), name(name), iefName(iefName), versionIndex(versionIndex), fwType(fwType) {}
ChipInfo(ChipID id, bool defaultEnabled, const char* name, const char* iefName, const std::vector<const char*>& iefSegments, size_t versionIndex, FirmwareType fwType)
: id(id), defaultEnabled(defaultEnabled), name(name), iefName(iefName), versionIndex(versionIndex), fwType(fwType), iefSegments(iefSegments) {}
bool isMultiIEF() const {
return !iefSegments.empty();
}
};
}
#endif // __cplusplus
#endif

View File

@ -24,9 +24,6 @@
#include "icsneo/device/deviceversion.h"
#include "icsneo/device/founddevice.h"
#include "icsneo/device/coremini.h"
#include "icsneo/device/bootloaderpipeline.h"
#include "icsneo/device/chipinfo.h"
#include "icsneo/device/versionreport.h"
#include "icsneo/disk/diskreaddriver.h"
#include "icsneo/disk/diskwritedriver.h"
#include "icsneo/disk/nulldiskdriver.h"
@ -89,77 +86,6 @@ class Device {
public:
virtual ~Device();
enum class ProductID : uint8_t {
neoVIRED = 0,
neoVIFIRE = 1,
ValueCAN3 = 2,
VividCANPro = 3, // Previously neoVI Yellow
neoECU = 4,
IEVB = 5,
Pendant = 6,
neoAnalog = 7,
neoECU12 = 8,
neoVIPLASMA = 10,
neoVIION = 11,
ValueCAN4_2EL_4 = 12,
cmProbe = 14,
EEVB = 15,
RADStar = 16,
ValueCANrf = 17,
neoVIFIRE2 = 18,
RADGalaxy = 19,
RADStar2 = 20,
VividCAN = 21,
neoOBD2Sim = 22,
neoOBD2Pro = 23,
ValueCAN4_1_2 = 24,
neoECUAVBTSN = 25,
RADSupermoon = 26,
RADMoon2 = 27,
RADPluto = 28,
RADMars = 29,
RADIOCANHUB = 30,
neoOBD2LCBadge = 31,
RADMoonDuo = 32,
neoVIFIRE3 = 33,
RADJupiter = 34,
ValueCAN4Industrial = 35,
RADGigastar = 36,
VividCANProUnused = 37, // The VividCAN Pro was double allocated
EtherBADGE = 38,
RADEpsilon = 39,
RADA2B = 40,
SFPModule = 41,
RADGalaxy2 = 47,
RADMoon3 = 49,
RADComet = 50,
Connect = 51,
RADComet3 = 54,
RADMoonT1S = 56,
RADGigastar2 = 57
};
virtual ProductID getProductID() const = 0;
/**
* Returns information for all potential chips, note some chips
* might not apply to a specific device depending on different
* hardware versions
*/
virtual const std::vector<ChipInfo>& getChipInfo() const {
static std::vector<ChipInfo> placeHolder;
return placeHolder; // TODO: Make pure virtual maybe?
}
/**
* Returns bootloader instructions
*/
virtual BootloaderPipeline getBootloader() {
return {};
}
bool hasBootloader() { return !!getBootloader(); }
static std::string SerialNumToString(uint32_t serial);
static uint32_t SerialStringToNum(const std::string& serial);
static bool SerialStringIsNumeric(const std::string& serial);
@ -660,14 +586,11 @@ public:
bool refreshComponentVersions();
/**
* For use by extensions only.
* For use by extensions only. A more stable API will be provided in the future.
*/
const std::vector<std::optional<DeviceAppVersion>>& getVersions() const { return versions; }
const std::vector<ComponentVersion>& getComponentVersions() const { return componentVersions; }
virtual std::vector<VersionReport> getChipVersions(bool refreshComponents = true);
/**
* Some alternate communication protocols do not support DFU
*/

View File

@ -26,10 +26,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::EtherBADGE;
}
protected:
EtherBADGE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<EtherBADGESettings>(makeDriver);

View File

@ -22,10 +22,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::neoOBD2Pro;
}
private:
NeoOBD2PRO(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize(makeDriver);

View File

@ -22,9 +22,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::neoOBD2Sim;
}
private:
NeoOBD2SIM(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize(makeDriver);

View File

@ -34,28 +34,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::Connect;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::Connect_ZCHIP, true, "ZCHIP", "neovi_connect_zchip_ief", 0, FirmwareType::IEF},
{ChipID::Connect_LINUX, true, "Linux Flash", "neovi_connect_lnx_flash_ief", 1, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::Connect_ZCHIP, BootloaderCommunication::Application, true, false, false)
.add<FlashPhase>(ChipID::Connect_LINUX, BootloaderCommunication::Application, false, false, false)
.add<FinalizePhase>(ChipID::Connect_ZCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::Connect_LINUX, BootloaderCommunication::Application)
.add<ReconnectPhase>()
.addSetting(BootloaderSetting::UpdateAll, true);
}
protected:
NeoVIConnect(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIConnectSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -57,9 +57,6 @@ public:
return true;
}
ProductID getProductID() const override {
return ProductID::neoVIFIRE;
}
private:
NeoVIFIRE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRESettings>(makeDriver);

View File

@ -87,28 +87,6 @@ public:
};
}
ProductID getProductID() const override {
return ProductID::neoVIFIRE2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::neoVIFIRE2_MCHIP, true, "MCHIP", "fire2_mchip_ief", 0, FirmwareType::IEF},
{ChipID::neoVIFIRE2_ZYNQ, true, "ZCHIP", "fire2_zchip_ief", 1, FirmwareType::IEF},
{ChipID::neoVIFIRE2_Core, true, "Core", "fire2_core", 2, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::neoVIFIRE2_MCHIP, BootloaderCommunication::RED)
.add<FlashPhase>(ChipID::neoVIFIRE2_ZYNQ, BootloaderCommunication::RED, false, true)
.add<FlashPhase>(ChipID::neoVIFIRE2_Core, BootloaderCommunication::REDCore, false, false)
.add<ReconnectPhase>();
}
protected:
NeoVIFIRE2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE2Settings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -50,34 +50,6 @@ public:
return supportedNetworks;
}
size_t getEthernetActivationLineCount() const override { return 2; }
ProductID getProductID() const override {
return ProductID::neoVIFIRE3;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::neoVIFIRE3_ZCHIP, true, "ZCHIP", "fire3_zchip_ief", 0, FirmwareType::IEF},
{ChipID::neoVIFIRE3_SCHIP, true, "SCHIP", "fire3_schip_ief", 1, FirmwareType::IEF},
{ChipID::neoVIFIRE3_LINUX, true, "Linux Flash", "fire3_lnx_flash_ief", 2, FirmwareType::IEF},
{ChipID::VEM_01_8DW_ZCHIP, true, "VEM-01-Z", "vem_01_8dw_zchip_ief", 3, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application, true, false)
.add<FlashPhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application, false, true)
.add<FlashPhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application, false, false, false)
.add<FlashPhase>(ChipID::VEM_01_8DW_ZCHIP, BootloaderCommunication::Application, false, false)
.add<FinalizePhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::VEM_01_8DW_ZCHIP, BootloaderCommunication::Application)
.add<ReconnectPhase>()
.addSetting(BootloaderSetting::UpdateAll, true);
}
protected:
NeoVIFIRE3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -53,36 +53,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::neoVIFIRE3;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::neoVIFIRE3_ZCHIP, true, "ZCHIP", "fire3_zchip_ief", 0, FirmwareType::IEF},
{ChipID::neoVIFIRE3_SCHIP, true, "SCHIP", "fire3_schip_ief", 1, FirmwareType::IEF},
{ChipID::neoVIFIRE3_LINUX, true, "Linux Flash", "fire3_lnx_flash_ief", 2, FirmwareType::IEF},
{ChipID::VEM_02_FR_ZCHIP, true, "VEM-02-Z", "vem_02_fr_zchip_ief", 3, FirmwareType::IEF},
{ChipID::VEM_02_FR_FCHIP, true, "VEM-02-F", "vem_02_fr_fchip_ief", 4, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application, true, false)
.add<FlashPhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application, false, true)
.add<FlashPhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application, false, false, false)
.add<FlashPhase>(ChipID::VEM_02_FR_FCHIP, BootloaderCommunication::Application, false, false)
.add<FlashPhase>(ChipID::VEM_02_FR_ZCHIP, BootloaderCommunication::Application, false, false)
.add<FinalizePhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::VEM_02_FR_FCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::VEM_02_FR_ZCHIP, BootloaderCommunication::Application)
.add<ReconnectPhase>()
.addSetting(BootloaderSetting::UpdateAll, true);
}
protected:
NeoVIFIRE3FlexRay(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3FlexRaySettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -59,9 +59,6 @@ public:
bool supportsTC10() const override { return true; }
ProductID getProductID() const override {
return ProductID::neoVIFIRE3;
}
protected:
NeoVIFIRE3T1SLIN(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3T1SLINSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -37,30 +37,6 @@ public:
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::neoVIFIRE3;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::neoVIFIRE3_ZCHIP, true, "ZCHIP", "fire3_zchip_ief", 0, FirmwareType::IEF},
{ChipID::neoVIFIRE3_SCHIP, true, "SCHIP", "fire3_schip_ief", 1, FirmwareType::IEF},
{ChipID::neoVIFIRE3_LINUX, true, "Linux Flash", "fire3_lnx_flash_ief", 2, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application, true, false)
.add<FlashPhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application, false, true)
.add<FlashPhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application, false, false, false)
.add<FinalizePhase>(ChipID::neoVIFIRE3_ZCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_SCHIP, BootloaderCommunication::Application)
.add<FinalizePhase>(ChipID::neoVIFIRE3_LINUX, BootloaderCommunication::Application)
.add<ReconnectPhase>()
.addSetting(BootloaderSetting::UpdateAll, true);
}
protected:
NeoVIRED2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIRED2Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -15,9 +15,6 @@ public:
// USB PID is 0x0901, standard driver is DXX
ICSNEO_FINDABLE_DEVICE(NeoVIION, DeviceType::ION, "40");
ProductID getProductID() const override {
return ProductID::neoVIION;
}
private:
NeoVIION(neodevice_t neodevice, const driver_factory_t& makeDriver) : Plasion(neodevice) {
initialize<NullSettings, Disk::PlasionDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -13,9 +13,6 @@ public:
// USB PID is 0x0801, standard driver is DXX
ICSNEO_FINDABLE_DEVICE(NeoVIPLASMA, DeviceType::PLASMA, "30");
ProductID getProductID() const override {
return ProductID::neoVIPLASMA;
}
private:
NeoVIPLASMA(neodevice_t neodevice, const driver_factory_t& makeDriver) : Plasion(neodevice) {
initialize<NullSettings, Disk::PlasionDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -42,32 +42,11 @@ public:
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADA2B;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADA2B_ZCHIP, true, "ZCHIP", "RADA2B_SW_bin", 0, FirmwareType::Zip},
{ChipID::RADA2B_REVB_ZCHIP, false, "ZCHIP", "RADA2B_REVB_SW_bin", 0, FirmwareType::Zip}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADA2B_ZCHIP, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADA2B(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADA2BSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
void setupPacketizer(Packetizer& packetizer) override {
Device::setupPacketizer(packetizer);
packetizer.disableChecksum = true;

View File

@ -30,25 +30,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADComet;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADComet_ZYNQ, true, "ZCHIP", "RADComet_SW_bin", 0, FirmwareType::Zip},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADComet_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
using Device::Device;

View File

@ -54,25 +54,6 @@ public:
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADComet3;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADCOMET3_ZCHIP, true, "ZCHIP", "RADComet3_SW_bin", 0, FirmwareType::Zip},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADCOMET3_ZCHIP, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADComet3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADComet3Settings>(makeDriver);

View File

@ -29,24 +29,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADEpsilon;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADEpsilon_MCHIP, true, "MCHIP", "epsilon_mchip_ief", 0, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADEpsilon_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>();
}
protected:
RADEpsilon(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADEpsilonSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -28,23 +28,6 @@ public:
bool supportsComponentVersions() const override { return true; }
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADEpsilon;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADProxima_MCHIP, true, "MCHIP", "epsilon_mchip_ief", 0, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADProxima_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>();
}
protected:
RADEpsilonXL(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@ -75,10 +58,6 @@ protected:
bool supportsEraseMemory() const override {
return true;
}
size_t getDiskCount() const override {
return 1;
}
};
}; // namespace icsneo

View File

@ -63,26 +63,6 @@ public:
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADGalaxy;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADGalaxy_ZYNQ, true, "ZCHIP", "RADGalaxy_SG2_SW_bin", 0, FirmwareType::Zip},
{ChipID::RADGalaxy_FFG_Zynq, false, "ZCHIP", "RADGalaxy_SG2_FFG_SW_bin", 0, FirmwareType::Zip}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADGalaxy_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADGalaxy(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADGalaxySettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -67,28 +67,6 @@ public:
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADGalaxy2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RAD_GALAXY_2_ZMPCHIP_ID, true, "ZCHIP", "RADGalaxy2_SW_bin_p1", {"RADGalaxy2_SW_bin_p1", "RADGalaxy2_SW_bin_p2"}, 0, FirmwareType::Zip},
{ChipID::RADGALAXY2_SYSMON_CHIP, true, "MCHIP", "galaxy2_sysmon_ief", 1, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RAD_GALAXY_2_ZMPCHIP_ID, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<FlashPhase>(ChipID::RADGALAXY2_SYSMON_CHIP, BootloaderCommunication::RADGalaxy2Peripheral)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADGalaxy2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADGalaxy2Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -24,88 +24,6 @@ public:
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADGigastar;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADGigastar_ZYNQ, true, "ZCHIP", "RADGigastar2_T1S_LIN_SW_bin", 1, FirmwareType::Zip},
{ChipID::RADGigastar_FFG_ZYNQ, false, "ZCHIP", "RADGigastar_FFG_SW_bin", 1, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_ZYNQ, true, "USB ZCHIP", "RADGigastar_USBz_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7010_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7010_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7007S_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7007s_SW_bin", 2, FirmwareType::Zip},
};
return chips;
}
BootloaderPipeline getBootloader() override {
if(supportsComponentVersions()) {
auto chipVersions = getChipVersions();
auto mainVersion = std::find_if(chipVersions.begin(), chipVersions.end(), [](const auto& ver) { return ver.name == "ZCHIP"; });
if(mainVersion != chipVersions.end()) {
static constexpr uint8_t NewBootloaderMajor = 0;
static constexpr uint8_t NewBootloaderMinor = 0;
if(
mainVersion->major > NewBootloaderMajor ||
(mainVersion->major == NewBootloaderMajor && mainVersion->minor > NewBootloaderMinor)
) {
BootloaderPipeline pipeline;
for(const auto& version : chipVersions) {
pipeline.add<FlashPhase>(version.id, BootloaderCommunication::RADMultiChip);
}
pipeline.add<ReconnectPhase>();
pipeline.add<WaitPhase>(std::chrono::milliseconds(3000));
return pipeline;
}
}
}
// If we've reached this point, then we use the legacy flashing
if(com->driver->isEthernet()) {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::RADGigastar_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
return BootloaderPipeline()
.add<FlashPhase>(ChipID::RADGigastar_USBZ_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
std::vector<VersionReport> getChipVersions(bool refreshComponents = true) override {
if(refreshComponents) {
refreshComponentVersions();
}
if(supportsComponentVersions()) {
return Device::getChipVersions(false);
}
static constexpr size_t MainPeriphIndex = 1;
static constexpr size_t USBPeriphIndex = 2;
std::vector<VersionReport> chipVersions;
auto& appVersions = getVersions();
if(appVersions.size() < 3 && !appVersions.empty()) {
if(appVersions[0]) {
chipVersions.push_back({ChipID::RADGigastar_ZYNQ, "ZCHIP", appVersions[0]->major, appVersions[0]->minor, 0, 0});
}
} else {
if(MainPeriphIndex < appVersions.size()) {
if(appVersions[MainPeriphIndex]) {
chipVersions.push_back({ChipID::RADGigastar_ZYNQ, "ZCHIP", appVersions[MainPeriphIndex]->major, appVersions[MainPeriphIndex]->minor, 0, 0});
}
}
if(USBPeriphIndex < appVersions.size()) {
if(appVersions[USBPeriphIndex]) {
chipVersions.push_back({ChipID::RADGigastar_USBZ_ZYNQ, "USB ZCHIP", appVersions[USBPeriphIndex]->major, appVersions[USBPeriphIndex]->minor, 0, 0});
}
}
}
return chipVersions;
}
protected:
RADGigastar(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADGigastarSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -12,259 +12,138 @@
namespace icsneo
{
class RADGigastar2 : public Device {
public:
enum class FirmwareVariant {
T1Sx6_CANx1_LINx16,
T1Sx8_CANx4_LINx6,
Invalid
class RADGigastar2 : public Device
{
public:
// Serial numbers start with GT
// USB PID is 0x1210, standard driver is DXX
// Ethernet MAC allocation is 0x22, standard driver is Raw
ICSNEO_FINDABLE_DEVICE(RADGigastar2, DeviceType::RADGigastar2, "GT");
static const std::vector<Network> &GetSupportedNetworks()
{
static std::vector<Network> supportedNetworks = {
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::AE_01,
Network::NetID::AE_02,
Network::NetID::AE_03,
Network::NetID::AE_04,
Network::NetID::AE_05,
Network::NetID::AE_06,
Network::NetID::AE_07,
Network::NetID::AE_08,
Network::NetID::AE_09,
Network::NetID::AE_10,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::LIN_05,
Network::NetID::LIN_06,
Network::NetID::LIN_07,
Network::NetID::LIN_08,
Network::NetID::LIN_09,
Network::NetID::LIN_10,
Network::NetID::LIN_11,
Network::NetID::LIN_12,
Network::NetID::LIN_13,
Network::NetID::LIN_14,
Network::NetID::LIN_15,
Network::NetID::LIN_16,
Network::NetID::I2C_01,
Network::NetID::I2C_02,
Network::NetID::MDIO_01,
Network::NetID::MDIO_02,
Network::NetID::SPI_01,
Network::NetID::SPI_02,
Network::NetID::SPI_03,
Network::NetID::SPI_04,
Network::NetID::SPI_05,
Network::NetID::SPI_06,
Network::NetID::SPI_07,
Network::NetID::SPI_08,
};
return supportedNetworks;
}
size_t getEthernetActivationLineCount() const override { return 1; }
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
RADGigastar2(neodevice_t neodevice, const driver_factory_t &makeDriver) : Device(neodevice)
{
initialize<RADGigastar2Settings>(makeDriver);
}
void setupPacketizer(Packetizer &packetizer) override
{
Device::setupPacketizer(packetizer);
packetizer.disableChecksum = true;
packetizer.align16bit = false;
}
void setupDecoder(Decoder &decoder) override
{
Device::setupDecoder(decoder);
decoder.timestampResolution = 10; // Timestamps are in 10ns increments instead of the usual 25ns
}
void setupEncoder(Encoder &encoder) override
{
Device::setupEncoder(encoder);
encoder.supportCANFD = true;
encoder.supportEthPhy = true;
}
void setupSupportedRXNetworks(std::vector<Network> &rxNetworks) override
{
for (auto &netid : GetSupportedNetworks())
rxNetworks.emplace_back(netid);
}
// The supported TX networks are the same as the supported RX networks for this device
void setupSupportedTXNetworks(std::vector<Network> &txNetworks) override { setupSupportedRXNetworks(txNetworks); }
void handleDeviceStatus(const std::shared_ptr<RawMessage> &message) override
{
if (message->data.size() < sizeof(radgigastar2_status_t))
return;
std::lock_guard<std::mutex> lk(ioMutex);
const radgigastar2_status_t *status = reinterpret_cast<const radgigastar2_status_t *>(message->data.data());
ethActivationStatus = status->ethernetActivationLineEnabled;
}
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override
{
return 512 * 4;
}
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override
{
return 0;
}
size_t getDiskCount() const override
{
return 1;
}
};
// Serial numbers start with GT
// USB PID is 0x1210, standard driver is DXX
// Ethernet MAC allocation is 0x22, standard driver is Raw
ICSNEO_FINDABLE_DEVICE(RADGigastar2, DeviceType::RADGigastar2, "GT");
static const std::vector<Network> &GetSupportedNetworks()
{
static std::vector<Network> supportedNetworks = {
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::AE_01,
Network::NetID::AE_02,
Network::NetID::AE_03,
Network::NetID::AE_04,
Network::NetID::AE_05,
Network::NetID::AE_06,
Network::NetID::AE_07,
Network::NetID::AE_08,
Network::NetID::AE_09,
Network::NetID::AE_10,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::LIN_05,
Network::NetID::LIN_06,
Network::NetID::LIN_07,
Network::NetID::LIN_08,
Network::NetID::LIN_09,
Network::NetID::LIN_10,
Network::NetID::LIN_11,
Network::NetID::LIN_12,
Network::NetID::LIN_13,
Network::NetID::LIN_14,
Network::NetID::LIN_15,
Network::NetID::LIN_16,
Network::NetID::I2C_01,
Network::NetID::I2C_02,
Network::NetID::MDIO_01,
Network::NetID::MDIO_02,
Network::NetID::SPI_01,
Network::NetID::SPI_02,
Network::NetID::SPI_03,
Network::NetID::SPI_04,
Network::NetID::SPI_05,
Network::NetID::SPI_06,
Network::NetID::SPI_07,
Network::NetID::SPI_08,
};
return supportedNetworks;
}
size_t getEthernetActivationLineCount() const override { return 1; }
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADGigastar2;
}
FirmwareVariant variantToFlash = FirmwareVariant::Invalid;
void setVariantToFlash(FirmwareVariant variant) {
variantToFlash = variant;
}
FirmwareVariant getCurrentVariant() {
if(supportsComponentVersions()) {
const auto& components = getComponentVersions();
for(const auto& component : components) {
if(!component.valid) {
continue;
}
if(component.identifier == static_cast<uint32_t>(ChipID::RADGigastar2_ZYNQ)) {
auto res = static_cast<FirmwareVariant>(std::clamp<uint8_t>(component.componentInfo, 0, 2));
if(variantToFlash == FirmwareVariant::Invalid) {
variantToFlash = res; // Set the variantToFlash if it hasn't been set yet, we always flash the same firmware variant as the current if it is unspecified
}
return res;
}
}
}
return FirmwareVariant::Invalid;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> linChips = {
{ChipID::RADGigastar2_ZYNQ, true, "ZCHIP", "RADGigastar2_T1S_LIN_SW_bin", 1, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_ZYNQ, true, "USB ZCHIP", "RADGigastar_USBz_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7010_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7010_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7007S_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7007s_SW_bin", 2, FirmwareType::Zip},
};
static std::vector<ChipInfo> t1sChips = {
{ChipID::RADGigastar2_ZYNQ, true, "ZCHIP", "RADGigastar2_T1S_CAN_SW_bin", 1, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_ZYNQ, true, "USB ZCHIP", "RADGigastar_USBz_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7010_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7010_SW_bin", 2, FirmwareType::Zip},
{ChipID::RADGigastar_USBZ_Z7007S_ZYNQ, false, "USB ZCHIP", "RADGigastar_USBz_Z7007s_SW_bin", 2, FirmwareType::Zip},
};
if(variantToFlash == FirmwareVariant::T1Sx8_CANx4_LINx6) {
return t1sChips;
}
return linChips; // Assume linChips even if variantToFlash is invalid
}
BootloaderPipeline getBootloader() override {
if(supportsComponentVersions()) {
auto chipVersions = getChipVersions();
auto mainVersion = std::find_if(chipVersions.begin(), chipVersions.end(), [](const auto& ver) { return ver.name == "ZCHIP"; });
if(mainVersion != chipVersions.end()) {
static constexpr uint8_t NewBootloaderMajor = 0;
static constexpr uint8_t NewBootloaderMinor = 0;
if(
mainVersion->major > NewBootloaderMajor ||
(mainVersion->major == NewBootloaderMajor && mainVersion->minor > NewBootloaderMinor)
) {
BootloaderPipeline pipeline;
for(const auto& version : chipVersions) {
pipeline.add<FlashPhase>(version.id, BootloaderCommunication::RADMultiChip);
}
pipeline.add<ReconnectPhase>();
pipeline.add<WaitPhase>(std::chrono::milliseconds(3000));
return pipeline;
}
}
}
// If we've reached this point, then we use the legacy flashing
if(com->driver->isEthernet()) {
return BootloaderPipeline()
.add<FlashPhase>(ChipID::RADGigastar2_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
return BootloaderPipeline()
.add<FlashPhase>(ChipID::RADGigastar_USBZ_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
std::vector<VersionReport> getChipVersions(bool refreshComponents = true) override {
if(refreshComponents) {
refreshComponentVersions();
}
if(supportsComponentVersions()) {
return Device::getChipVersions(false);
}
static constexpr size_t MainPeriphIndex = 1;
static constexpr size_t USBPeriphIndex = 2;
std::vector<VersionReport> chipVersions;
auto& appVersions = getVersions();
if(appVersions.size() < 3 && !appVersions.empty()) {
if(appVersions[0]) {
chipVersions.push_back({ChipID::RADGigastar2_ZYNQ, "ZCHIP", appVersions[0]->major, appVersions[0]->minor, 0, 0});
}
} else {
if(MainPeriphIndex < appVersions.size()) {
if(appVersions[MainPeriphIndex]) {
chipVersions.push_back({ChipID::RADGigastar2_ZYNQ, "ZCHIP", appVersions[MainPeriphIndex]->major, appVersions[MainPeriphIndex]->minor, 0, 0});
}
}
if(USBPeriphIndex < appVersions.size()) {
if(appVersions[USBPeriphIndex]) {
chipVersions.push_back({ChipID::RADGigastar_USBZ_ZYNQ, "USB ZCHIP", appVersions[USBPeriphIndex]->major, appVersions[USBPeriphIndex]->minor, 0, 0});
}
}
}
return chipVersions;
}
protected:
RADGigastar2(neodevice_t neodevice, const driver_factory_t &makeDriver) : Device(neodevice)
{
initialize<RADGigastar2Settings>(makeDriver);
}
void setupPacketizer(Packetizer &packetizer) override
{
Device::setupPacketizer(packetizer);
packetizer.disableChecksum = true;
packetizer.align16bit = false;
}
void setupDecoder(Decoder &decoder) override
{
Device::setupDecoder(decoder);
decoder.timestampResolution = 10; // Timestamps are in 10ns increments instead of the usual 25ns
}
void setupEncoder(Encoder &encoder) override
{
Device::setupEncoder(encoder);
encoder.supportCANFD = true;
encoder.supportEthPhy = true;
}
void setupSupportedRXNetworks(std::vector<Network> &rxNetworks) override
{
for (auto &netid : GetSupportedNetworks())
rxNetworks.emplace_back(netid);
}
// The supported TX networks are the same as the supported RX networks for this device
void setupSupportedTXNetworks(std::vector<Network> &txNetworks) override { setupSupportedRXNetworks(txNetworks); }
void handleDeviceStatus(const std::shared_ptr<RawMessage> &message) override
{
if (message->data.size() < sizeof(radgigastar2_status_t))
return;
std::lock_guard<std::mutex> lk(ioMutex);
const radgigastar2_status_t *status = reinterpret_cast<const radgigastar2_status_t *>(message->data.data());
ethActivationStatus = status->ethernetActivationLineEnabled;
}
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override
{
return 512 * 4;
}
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override
{
return 0;
}
size_t getDiskCount() const override
{
return 1;
}
};
}
#endif // __cplusplus

View File

@ -29,10 +29,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADJupiter;
}
protected:
RADJupiter(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADJupiterSettings>(makeDriver);

View File

@ -21,9 +21,6 @@ public:
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADMars;
}
protected:
RADMars(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADMarsSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -16,26 +16,6 @@ public:
uint8_t getPhyAddrOrPort() const override { return 6; };
ProductID getProductID() const override {
return ProductID::RADMoon2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADMoon2_ZYNQ, true, "ZCHIP", "RADMoon2_SW_bin", 0, FirmwareType::Zip},
{ChipID::RADMoon2_Z7010_ZYNQ, false, "ZCHIP", "RADMoon2_Z7010_SW_bin", 0, FirmwareType::Zip}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADMoon2_ZYNQ, BootloaderCommunication::RAD)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADMoon2(neodevice_t neodevice, const driver_factory_t& makeDriver) : RADMoon2Base(neodevice) {
initialize<RADMoon2Settings>(makeDriver);

View File

@ -18,23 +18,6 @@ public:
bool supportsTC10() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADMoon2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADMoon2_ZL_MCHIP, true, "MCHIP", "radmoon2_zl_mchip_ief", 0, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADMoon2_ZL_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>();
}
protected:
RADMoon2ZL(neodevice_t neodevice, const driver_factory_t& makeDriver) : RADMoon2Base(neodevice) {
initialize<RADMoon2Settings>(makeDriver);

View File

@ -30,24 +30,6 @@ public:
bool supportsTC10() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADMoon3;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::RADMoon3_MCHIP, true, "MCHIP", "radmoon3_mchip_ief", 0, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::RADMoon3_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
RADMoon3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADMoon3Settings>(makeDriver);

View File

@ -25,10 +25,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADMoonDuo;
}
protected:
RADMoonDuo(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADMoonDuoSettings>(makeDriver);

View File

@ -34,9 +34,6 @@ public:
bool supportsTC10() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADMoonT1S;
}
protected:
RADMoonT1S(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADMoonT1SSettings>(makeDriver);

View File

@ -34,9 +34,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADPluto;
}
protected:
RADPluto(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADPlutoSettings>(makeDriver);

View File

@ -32,9 +32,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::RADStar2;
}
protected:
RADStar2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADStar2Settings>(makeDriver);

View File

@ -50,9 +50,6 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
ProductID getProductID() const override {
return ProductID::RADSupermoon;
}
protected:
RADSupermoon(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADSupermoonSettings>(makeDriver);

View File

@ -22,9 +22,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::ValueCAN3;
}
private:
ValueCAN3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<ValueCAN3Settings>(makeDriver);

View File

@ -21,24 +21,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::ValueCAN4_1_2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::ValueCAN4_1_MCHIP, true, "MCHIP", "vcan41_mchip_ief", 0, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::ValueCAN4_1_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>();
}
protected:
ValueCAN4_1(neodevice_t neodevice, const driver_factory_t& makeDriver) : ValueCAN4(neodevice) {
initialize<ValueCAN4_1Settings>(makeDriver);

View File

@ -46,25 +46,6 @@ public:
return Device::getProductName();
}
ProductID getProductID() const override {
return ProductID::ValueCAN4_1_2;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::ValueCAN4_2_MCHIP, true, "MCHIP", "vcan42_mchip_ief", 0, FirmwareType::IEF},
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::ValueCAN4_2_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>()
.add<WaitPhase>(std::chrono::milliseconds(3000));
}
protected:
ValueCAN4_2(neodevice_t neodevice, const driver_factory_t& makeDriver) : ValueCAN4(neodevice) {
initialize<ValueCAN4_2Settings>(makeDriver);

View File

@ -60,25 +60,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::ValueCAN4_2EL_4;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::ValueCAN4_2EL_MCHIP, true, "MCHIP", "vcan44_mchip_ief", 0, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::ValueCAN4_2EL_MCHIP, BootloaderCommunication::RED)
.add<ReconnectPhase>();
}
protected:
ValueCAN4_2EL(neodevice_t neodevice, const driver_factory_t& makeDriver) : ValueCAN4(neodevice) {
initialize<ValueCAN4_2ELSettings>(makeDriver);

View File

@ -57,25 +57,6 @@ public:
return Device::getProductName();
}
ProductID getProductID() const override {
return ProductID::ValueCAN4_2EL_4;
}
const std::vector<ChipInfo>& getChipInfo() const override {
static std::vector<ChipInfo> chips = {
{ChipID::ValueCAN4_4_MCHIP, true, "MCHIP", "vcan44_mchip_ief", 0, FirmwareType::IEF},
{ChipID::ValueCAN4_4_SCHIP, true, "SCHIP", "vcan44_schip_ief", 1, FirmwareType::IEF}
};
return chips;
}
BootloaderPipeline getBootloader() override {
return BootloaderPipeline()
.add<EnterBootloaderPhase>()
.add<FlashPhase>(ChipID::ValueCAN4_4_MCHIP, BootloaderCommunication::RED)
.add<FlashPhase>(ChipID::ValueCAN4_4_SCHIP, BootloaderCommunication::RED, false, true)
.add<ReconnectPhase>();
}
protected:
ValueCAN4_4(neodevice_t neodevice, const driver_factory_t& makeDriver) : ValueCAN4(neodevice) {
initialize<ValueCAN4_4Settings>(makeDriver);

View File

@ -27,9 +27,6 @@ public:
return supportedNetworks;
}
ProductID getProductID() const override {
return ProductID::ValueCAN4Industrial;
}
protected:
ValueCAN4Industrial(neodevice_t neodevice, const driver_factory_t& makeDriver) : ValueCAN4(neodevice) {
initialize<ValueCAN4IndustrialSettings>(makeDriver);

View File

@ -28,10 +28,6 @@ public:
}
bool isOnlineSupported() const override { return false; }
ProductID getProductID() const override {
return ProductID::VividCAN;
}
protected:
VividCAN(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<VividCANSettings>(makeDriver);

View File

@ -1,26 +0,0 @@
#ifndef __VERSION_REPORT_H_
#define __VERSION_REPORT_H_
#ifdef __cplusplus
#include "icsneo/device/chipid.h"
#include <vector>
#include <string>
namespace icsneo {
struct VersionReport {
ChipID id;
std::string name;
uint8_t major;
uint8_t minor;
uint8_t maintenance;
uint8_t build;
};
}
#endif // __cplusplus
#endif

View File

@ -22,7 +22,6 @@ void DXX::Find(std::vector<FoundDevice>& found) {
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0006 } }, // RAD-A2B Rev A
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0601 } }, // ValueCAN 3
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0701 } }, // FIRE
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0801 } }, // neoVI PLASMA
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0901 } }, // neoVI ION
{ LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x1000 } }, // neoVI FIRE2
{ LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1201 } }, // RAD-SuperMoon