removed ploc updater

This commit is contained in:
Jakob Meier 2022-05-06 19:30:38 +02:00
parent 2e24f764a6
commit 91e11482f4
5 changed files with 0 additions and 159 deletions

View File

@ -32,7 +32,6 @@ class CustomServiceList(enum.Enum):
REACTION_WHEEL_3 = "reaction_wheel_3"
REACTION_WHEEL_4 = "reaction_wheel_4"
RAD_SENSOR = "rad_sensor"
PLOC_UPDATER = "ploc_updater"
GPS_0 = "gps0"
GPS_1 = "gps1"
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"

View File

@ -61,7 +61,6 @@ PDEC_HANDLER_ID = bytes([0x50, 0x00, 0x07, 0x00])
STAR_TRACKER_ID = bytes([0x44, 0x13, 0x00, 0x1])
RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
PLOC_UPDATER_ID = bytes([0x44, 0x33, 0x00, 0x00])
PLOC_MEMORY_DUMPER_ID = bytes([0x44, 0x33, 0x00, 0x01])
STR_IMG_HELPER_ID = bytes([0x44, 0x33, 0x00, 0x02])
PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])

View File

@ -659,9 +659,7 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
{OpCodeDictKeys.TIMEOUT: 2.0},
),
}
service_ploc_updater_tuple = ("Ploc Updater", op_code_dict_srv_ploc_updater)
cmd_dict[CustomServiceList.PLOC_SUPV.value] = service_ploc_supv_tuple
cmd_dict[CustomServiceList.PLOC_UPDATER.value] = service_ploc_updater_tuple
cmd_dict[
CustomServiceList.PLOC_MEMORY_DUMPER.value
] = service_ploc_memory_dumper_tuple

View File

@ -1,148 +0,0 @@
# -*- coding: utf-8 -*-
"""
@file ploc_udpater.py
@brief Commands to initiate update transfer to ploc supervisor. This only updates the software of the MPSoC, it is not
possible to update the software of the supervisor.
The supervisor is programmed by Thales.
@author J. Meier
@date 10.07.2021
"""
import struct
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.packer import TcQueueT
from spacepackets.ecss.tc import PusTelecommand
latchup_id_dict = {
"0": "0.85V",
"1": "1.8V",
"2": "MISC",
"3": "3.3V",
"4": "NVM_4XO",
"5": "MISSION",
"6": "SAFECOTS",
}
class UpdaterActionIds:
UPDATE_A_UBOOT = 0
UPDATE_A_BITSTREAM = 1
UPDATE_A_LINUX = 2
UPDATE_A_APP_SW = 3
UPDATE_B_UBOOT = 4
UPDATE_B_BITSTREAM = 5
UPDATE_B_LINUX = 6
UPDATE_B_LINUX = 7
class ImagePathDefs:
imageAuboot = "/mnt/sd0/ploc/updateAuboot.bin"
imageAbitsream = "/mnt/sd0/ploc/updateAbitstream.bin"
imageAlinux = "/mnt/sd0/ploc/updateAlinux.bin"
imageAappsw = "/mnt/sd0/ploc/updateAappsw.bin"
imageBuboot = "/mnt/sd0/ploc/updateBuboot.bin"
imageBbitsream = "/mnt/sd0/ploc/updateBbitstream.bin"
imageBlinux = "/mnt/sd0/ploc/updateBlinux.bin"
imageBappsw = "/mnt/sd0/ploc/updateBappsw.bin"
def pack_ploc_updater_test_into(
object_id: bytearray, tc_queue: TcQueueT, op_code: str
) -> TcQueueT:
tc_queue.appendleft(
(
QueueCommands.PRINT,
"Testing PLOC updater with object id: 0x" + object_id.hex(),
)
)
if op_code == "0":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update uboot on partition A")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_A_UBOOT)
+ bytearray(ImagePathDefs.imageAuboot, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update bitstream on parition A")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_A_BITSTREAM)
+ bytearray(ImagePathDefs.imageAbitsream, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update linux on partition A")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_A_LINUX)
+ bytearray(ImagePathDefs.imageAlinux, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update application on partition A")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_A_APP_SW)
+ bytearray(ImagePathDefs.imageAappsw, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update uboot on partition B")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_B_UBOOT)
+ bytearray(ImagePathDefs.imageBuboot, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "5":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update bitstream on parition B")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_B_BITSTREAM)
+ bytearray(ImagePathDefs.imageBbitsream, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "6":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update linux on partition B")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_B_LINUX)
+ bytearray(ImagePathDefs.imageBlinux, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "7":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Update application on partition B")
)
command = (
object_id
+ struct.pack("!I", UpdaterActionIds.UPDATE_B_APP_SW)
+ bytearray(ImagePathDefs.imageBappsw, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())

View File

@ -29,7 +29,6 @@ from pus_tc.devs.ploc_supervisor import pack_ploc_supv_commands
from pus_tc.devs.heater import pack_heater_test_into
from pus_tc.devs.reaction_wheels import pack_single_rw_test_into
from pus_tc.devs.rad_sensor import pack_rad_sensor_test_into
from pus_tc.devs.ploc_upater import pack_ploc_updater_test_into
from pus_tc.devs.ploc_memory_dumper import pack_ploc_memory_dumper_cmd
from pus_tc.devs.ccsds_handler import pack_ccsds_handler_test
from pus_tc.system.core import pack_core_commands
@ -58,7 +57,6 @@ from config.object_ids import (
RW4_ID,
RAD_SENSOR_ID,
PLOC_SUPV_ID,
PLOC_UPDATER_ID,
STAR_TRACKER_ID,
PLOC_MEMORY_DUMPER_ID,
GPS_HANDLER_0_ID,
@ -175,11 +173,6 @@ def pack_service_queue_user(
return pack_ploc_supv_commands(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.PLOC_UPDATER.value:
object_id = PLOC_UPDATER_ID
return pack_ploc_updater_test_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.STAR_TRACKER.value:
object_id = STAR_TRACKER_ID
return pack_star_tracker_commands(