shepherd-core 2025.2.1__py3-none-any.whl → 2025.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,8 +127,9 @@ class Firmware(ContentModel, title="Firmware of Target"):
127
127
  arch = fw_tools.read_arch(file)
128
128
  if "msp430" in arch and not fw_tools.is_elf_msp430(file):
129
129
  raise ValueError("File is not a ELF for msp430")
130
- if "nrf52" in arch and not fw_tools.is_elf_nrf52(file):
130
+ if ("nrf52" in arch or "arm" in arch) and not fw_tools.is_elf_nrf52(file):
131
131
  raise ValueError("File is not a ELF for nRF52")
132
+ logger.debug("ELF-File '%s' has arch: %s", file.name, arch)
132
133
  if "mcu" not in kwargs:
133
134
  kwargs["mcu"] = arch_to_mcu[arch]
134
135
 
@@ -31,7 +31,7 @@ class ProgrammingTask(ShpModel):
31
31
  mcu_type: SafeStr
32
32
  # ⤷ must be either "nrf52" or "msp430" ATM, TODO: clean xp to tasks
33
33
  voltage: Annotated[float, Field(ge=1, lt=5)] = 3
34
- datarate: Annotated[int, Field(gt=0, le=1_000_000)] = 500_000
34
+ datarate: Annotated[int, Field(gt=0, le=1_000_000)] = 200_000
35
35
  protocol: ProgrammerProtocol
36
36
 
37
37
  simulate: bool = False
@@ -66,16 +66,14 @@ def is_hex_nrf52(file: Path) -> bool:
66
66
  """Try to detect specifics for that MCU.
67
67
 
68
68
  Observations:
69
- - addresses begin at 0x0
69
+ - addresses begin mostly at 0x0 (no must)
70
70
  - only one segment (.get_segments), todo
71
71
  """
72
72
  if is_hex(file):
73
73
  ih = IntelHex(file.as_posix())
74
- if ih.minaddr() != 0x0000:
75
- return False
76
-
77
- # conservative test for now - should be well below 1 MB + 256 kB
78
- return ih.get_memory_size() < 1310720
74
+ # conservative test for now - should be between 0 and 1 MB + 256 kB,
75
+ # but lately showed much higher values > 4 MB
76
+ return ih.get_memory_size() > 0
79
77
  return False
80
78
 
81
79
 
@@ -145,15 +143,15 @@ def determine_arch(file: Path) -> str:
145
143
  """Figure out arch (msp430 or nrf52)."""
146
144
  file_t = determine_type(file)
147
145
  if file_t == FirmwareDType.path_elf:
148
- if is_elf_nrf52(file):
149
- return "nrf52"
150
146
  if is_elf_msp430(file):
151
147
  return "msp430"
148
+ if is_elf_nrf52(file):
149
+ return "nrf52"
152
150
  raise ValueError("Arch of ELF '%s' could not be determined", file.name)
153
151
  if file_t == FirmwareDType.path_hex:
154
- if is_hex_nrf52(file):
155
- return "nrf52"
156
152
  if is_hex_msp430(file):
157
153
  return "msp430"
154
+ if is_hex_nrf52(file):
155
+ return "nrf52"
158
156
  raise ValueError("Arch of HEX '%s' could not be determined", file.name)
159
157
  raise ValueError("Arch of file '%s' could not be determined", file.name)
shepherd_core/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Separated string avoids circular imports."""
2
2
 
3
- version: str = "2025.02.1"
3
+ version: str = "2025.02.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: shepherd_core
3
- Version: 2025.2.1
3
+ Version: 2025.2.2
4
4
  Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
5
5
  Author-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
6
6
  Maintainer-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
@@ -3,7 +3,7 @@ shepherd_core/calibration_hw_def.py,sha256=_nMzgNzSnYyqcLnVCGd4tfA2e0avUXbccjmNp
3
3
  shepherd_core/commons.py,sha256=vymKXWcy_1bz7ChzzEATUkJ4p3czCzjIdsSehVjJOY8,218
4
4
  shepherd_core/logger.py,sha256=4Q4hTI-nccOZ1_A68fo4UEctfu3pJx3IeHfa9VuDDEo,1804
5
5
  shepherd_core/reader.py,sha256=BxVWE-4BfDUjVh03l0SZHT5PwVN0xPEy4aP8Kr858kI,28270
6
- shepherd_core/version.py,sha256=o-7_x2K2hYD5ZqmJzGFJI_9bnBF0jpY08HmDCMNTfMA,76
6
+ shepherd_core/version.py,sha256=nTwMv1ayLMflxtnNktXAuPy5XKPBgwQv7w-EtHuCMtI,76
7
7
  shepherd_core/writer.py,sha256=GMR-7vkOgpTNPoknBWsRsC7-b7iGMtT60-KtSKunNe8,14636
8
8
  shepherd_core/data_models/__init__.py,sha256=bnHSP_HBOYm4WuoiHs_vyiRsWlvkyDjsarMNfKedN-Q,1836
9
9
  shepherd_core/data_models/readme.md,sha256=1bdfEypY_0NMhXLxOPRnLAsFca0HuHdq7_01yEWxvUs,2470
@@ -19,7 +19,7 @@ shepherd_core/data_models/content/__init__.py,sha256=69aiNG0h5t1OF7HsLg_ke5eaQKs
19
19
  shepherd_core/data_models/content/_external_fixtures.yaml,sha256=0CH7YSWT_hzL-jcg4JjgN9ryQOzbS8S66_pd6GbMnHw,12259
20
20
  shepherd_core/data_models/content/energy_environment.py,sha256=WuXMkKqnibGzM2WeW1_m2DAsc0fDqE9CkBYYPSw-7eA,1540
21
21
  shepherd_core/data_models/content/energy_environment_fixture.yaml,sha256=UBXTdGT7MK98zx5w_RBCu-f9uNCKxRgiFBQFbmDUxPc,1301
22
- shepherd_core/data_models/content/firmware.py,sha256=MyEiaP6bkOm7i_oihDXTxHC7ajc5aqiIDLn7mhap6YY,5722
22
+ shepherd_core/data_models/content/firmware.py,sha256=rH74sJPAjUUheVv0y2Y93BeT63CeKqdSEo8HZgHGlMo,5813
23
23
  shepherd_core/data_models/content/firmware_datatype.py,sha256=XPU9LOoT3h5qFOlE8WU0vAkw-vymNxzor9kVFyEqsWg,255
24
24
  shepherd_core/data_models/content/virtual_harvester.py,sha256=cf-DrSacZsct9e8eGoR4PX7S7RXlbxQfJHVsLR9njlM,10749
25
25
  shepherd_core/data_models/content/virtual_harvester_fixture.yaml,sha256=LZe5ue1xYhXZwB3a32sva-L4uKhkQA5AtG9JzW4B2hQ,4564
@@ -34,7 +34,7 @@ shepherd_core/data_models/task/emulation.py,sha256=tLb5auHOgdoG-e4hFljAYT49z7lME
34
34
  shepherd_core/data_models/task/firmware_mod.py,sha256=Rw_TA1ykQ7abUd_U0snqZlpZyrS8Nx6f4BEax1Xnji0,2818
35
35
  shepherd_core/data_models/task/harvest.py,sha256=HHnqWwRsJupaZJxuohs7NrK6VaDyoRzGOaG2h9y3s1Y,3360
36
36
  shepherd_core/data_models/task/observer_tasks.py,sha256=XlH_-EGRrdodTn0c2pjGvpcauc0a9NOnLhysKw8iRwk,3511
37
- shepherd_core/data_models/task/programming.py,sha256=Mg9_AZHIdG01FheEJAifIRPSB3iZ0UJITf8zeg2jyws,2323
37
+ shepherd_core/data_models/task/programming.py,sha256=hjzsxqqB0WXb0qY5gKk4iZ-Is3-OZNFnGehAxzA_0TI,2323
38
38
  shepherd_core/data_models/task/testbed_tasks.py,sha256=zvIitq0Ek1Ae7baWiBkSQN8nRugyw0N2P4SeVoj_QaY,2090
39
39
  shepherd_core/data_models/testbed/__init__.py,sha256=t9nwml5pbu7ZWghimOyZ8ujMIgnRgFkl23pNb5d_KdU,581
40
40
  shepherd_core/data_models/testbed/cape.py,sha256=D23ZKXpZRPIIOMn6LCoJrwHiRbSaYg-y7B6fAt1ap64,1246
@@ -56,7 +56,7 @@ shepherd_core/fw_tools/__init__.py,sha256=D9GGj9TzLWZfPjG_iV2BsF-Q1TGTYTgEzWTUI5
56
56
  shepherd_core/fw_tools/converter.py,sha256=3igRT33tghrBCao5njuPmePS-Y_lSa6EUHvwCakMo2s,3539
57
57
  shepherd_core/fw_tools/converter_elf.py,sha256=GQDVqIqMW4twNMvZIV3sowFMezhs2TN-IYREjRP7Xt4,1089
58
58
  shepherd_core/fw_tools/patcher.py,sha256=D6MHaCvKRRVQYSZozODAp_l7UnqxVsvnulPzpkfXWW8,4108
59
- shepherd_core/fw_tools/validation.py,sha256=hBLCKIUumPTA6iuXMVbMYph2jamaxeSTxRqsvl3C4-I,4699
59
+ shepherd_core/fw_tools/validation.py,sha256=dOweyWwVMq0b4Liha39mGUOiblD7Nz5kSFVrlxUx41o,4707
60
60
  shepherd_core/inventory/__init__.py,sha256=nRO11HG4eJ_FaXebSkE0dd1H6qvjrX5n3OQHOzKXVvk,3841
61
61
  shepherd_core/inventory/python.py,sha256=OWNnyEt0IDPW9XGW-WloU0FExwgZzYNA05VpRj4cZGc,1250
62
62
  shepherd_core/inventory/system.py,sha256=Q_mtM2zhUsTvzELgpEVxSxL9aFS1RSGcCX6RFpyZ-r8,3155
@@ -74,8 +74,8 @@ shepherd_core/vsource/virtual_harvester_model.py,sha256=GyA0uGl3r42t5c4roYtEaj22
74
74
  shepherd_core/vsource/virtual_harvester_simulation.py,sha256=MFT583s73BJZYyhcqgnDUGTPr9s_lN_lKafzJG6kueE,2457
75
75
  shepherd_core/vsource/virtual_source_model.py,sha256=9tiOzgrEgdEH5Uuhd8hjmmIkquNDuaNjLlblvInIlzg,3036
76
76
  shepherd_core/vsource/virtual_source_simulation.py,sha256=ZOnFd2uPawY2G1salCiLGx9o1OBG99_-EHBtDjx4ZUo,5140
77
- shepherd_core-2025.2.1.dist-info/METADATA,sha256=rYFb9DPtDYpbwy5xpIMWv7OtfQ87J12-pMQbvToPRpk,7806
78
- shepherd_core-2025.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
79
- shepherd_core-2025.2.1.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
80
- shepherd_core-2025.2.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
81
- shepherd_core-2025.2.1.dist-info/RECORD,,
77
+ shepherd_core-2025.2.2.dist-info/METADATA,sha256=r7kp-hqRWNI4HjNtagcpvXtUmZLcmrpj4iRTZo34g2Q,7806
78
+ shepherd_core-2025.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
79
+ shepherd_core-2025.2.2.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
80
+ shepherd_core-2025.2.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
81
+ shepherd_core-2025.2.2.dist-info/RECORD,,