mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-25 10:52:38 +00:00
Fit Wio-E5 Companion without reducing storage or contacts
This commit is contained in:
1 parent
3d04bb3048
commit
dbe092f5d5
4 files changed
+26
-4
No files matched your search
@@ -222,7 +222,7 @@ int main(void) {
|
||||
str(harness), str(ED25519 / "fe.c"), "-o", str(executable)], check=True)
|
||||
subprocess.run([str(executable)], check=True)
|
||||
|
||||
def test_only_stm32_companion_recipes_opt_in(self):
|
||||
def test_only_size_constrained_stm32_companions_opt_in(self):
|
||||
profiles = []
|
||||
for ini in (ROOT / "variants").glob("*/platformio.ini"):
|
||||
section = ""
|
||||
@@ -233,6 +233,7 @@ int main(void) {
|
||||
profiles.append((ini.parent.name, section))
|
||||
self.assertEqual(sorted(profiles), [
|
||||
("rak3x72", "[env:RAK_3x72_companion_radio_usb]"),
|
||||
("wio-e5-dev", "[env:wio-e5_companion_radio_usb]"),
|
||||
("wio-e5-mini", "[env:wio-e5-mini_companion_radio_usb]"),
|
||||
])
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ int main(void) {
|
||||
str(harness), str(ED25519 / "sc.c"), "-o", str(executable)], check=True)
|
||||
subprocess.run([str(executable)], check=True)
|
||||
|
||||
def test_only_stm32_companion_profiles_enable_compact_scalars(self):
|
||||
def test_only_size_constrained_stm32_companions_enable_compact_scalars(self):
|
||||
profiles = []
|
||||
for ini in (ROOT / "variants").glob("*/platformio.ini"):
|
||||
section = ""
|
||||
@@ -139,6 +139,7 @@ int main(void) {
|
||||
profiles.append((ini.parent.name, section))
|
||||
self.assertEqual(sorted(profiles), [
|
||||
("rak3x72", "[env:RAK_3x72_companion_radio_usb]"),
|
||||
("wio-e5-dev", "[env:wio-e5_companion_radio_usb]"),
|
||||
("wio-e5-mini", "[env:wio-e5-mini_companion_radio_usb]"),
|
||||
])
|
||||
|
||||
|
||||
@@ -56,8 +56,22 @@ class STM32CompanionProfileTest(unittest.TestCase):
|
||||
self.assertEqual(self.companion["build_unflags"].split(), ["-Os"])
|
||||
|
||||
def test_size_profile_uses_equivalent_fixed_loop_field_products(self):
|
||||
self.assertRegex(self.companion["build_flags"],
|
||||
r"-D\s+ED25519_COMPACT_FIELD=1\b")
|
||||
for definition in ("SHA512", "SCALAR", "FIELD"):
|
||||
self.assertRegex(self.companion["build_flags"],
|
||||
r"-D\s+ED25519_COMPACT_" + definition + r"=1\b")
|
||||
|
||||
|
||||
class WioDevSTM32CompanionProfileTest(STM32CompanionProfileTest):
|
||||
variant = "wio-e5-dev"
|
||||
target = "wio-e5_companion_radio_usb"
|
||||
base = "lora_e5"
|
||||
|
||||
def test_uart_pins_and_adc_monitor_are_retained(self):
|
||||
flags = self.config[self.base]["build_flags"]
|
||||
self.assertRegex(flags, r"-D\s+PIN_SERIAL_RX=PB7\b")
|
||||
self.assertRegex(flags, r"-D\s+PIN_SERIAL_TX=PB6\b")
|
||||
header = (ROOT / "variants" / self.variant / "target.h").read_text()
|
||||
self.assertIn("analogRead(PIN_A3)", header)
|
||||
|
||||
|
||||
class WioSTM32CompanionProfileTest(STM32CompanionProfileTest):
|
||||
|
||||
@@ -90,7 +90,13 @@ extends = lora_e5
|
||||
platform_packages = platformio/toolchain-gccarmnoneeabi@^1.140201.0
|
||||
build_unflags = -Os
|
||||
build_flags = ${lora_e5.build_flags}
|
||||
; This headless UART Companion uses ADC, GPIO and SysTick, not PWM/tone.
|
||||
; Retain the low-level TIM HAL without unused Arduino timer wrappers.
|
||||
-D RADIOLIB_TONE_UNSUPPORTED
|
||||
-D HAL_TIM_MODULE_ONLY
|
||||
-D ED25519_COMPACT_SHA512=1 ; same hash rounds, compact loop preserves the filesystem boundary
|
||||
-D ED25519_COMPACT_SCALAR=1 ; equivalent fixed-loop arithmetic preserves Companion capacities
|
||||
-D ED25519_COMPACT_FIELD=1 ; share field products without moving the filesystem boundary
|
||||
-Oz
|
||||
-flto
|
||||
-fno-inline-small-functions
|
||||
|
||||
Reference in new issue
Block a user