From 7df4872d95dbab4b3a2264e497a30e1b172d9914 Mon Sep 17 00:00:00 2001
From: Marko Mecina <marko.mecina@univie.ac.at>
Date: Mon, 5 May 2025 14:18:27 +0200
Subject: [PATCH] add ARIEL ASW upload script

---
 Ccs/scripts/ARIEL/upload_ASW.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Ccs/scripts/ARIEL/upload_ASW.py

diff --git a/Ccs/scripts/ARIEL/upload_ASW.py b/Ccs/scripts/ARIEL/upload_ASW.py
new file mode 100644
index 0000000..96d028e
--- /dev/null
+++ b/Ccs/scripts/ARIEL/upload_ASW.py
@@ -0,0 +1,22 @@
+"""Template for uploading the ASW binary to ARIEL DPU"""
+
+import Ccs.tools.asw_upload.asw_image_lib_ariel as ail
+
+POOLNAME = "LIVE"
+binary = "/home/marko/space/ariel/asw_images/flightos_v1.0b.elf"
+
+#! CCS.BREAKPOINT
+memid = 2  # memory ID
+start_addr = 0x40000000  # start address/entry point of ASW in RAM
+asw = ail.AswImage(memid, start_addr, binary, skip_bytes=65536)
+
+#! CCS.BREAKPOINT
+mem_addr = 0x80000  # address where the data is uploaded to (relative to base address of memid)
+cfl.load_to_memory(asw.img, memid, mem_addr, max_pkt_size=1024, progress=True, calc_crc=True, byte_align=4, pool_name=POOLNAME)
+
+#! CCS.BREAKPOINT
+MemoryID16 = 'MRAM'  # JA0H0124
+# N = 1  # JA0H0042 [NOT EDITABLE]
+StartAddress = mem_addr  # JA0H0125
+Length = asw.size  # JA0H0123
+cfl.Tcsend_DB('SASW CheckMemData', MemoryID16, StartAddress, Length, pool_name=POOLNAME)
-- 
GitLab