From fb8ecaecf56a2e393688a8907bd987cb1d7d763a Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Fri, 14 Nov 2025 03:57:46 +0100 Subject: [PATCH] renesas-ra/pin: Reduce footprint of pin structures. This commit performs a few minor changes to the structures used to store board pin information, in order to reduce the impact on the .rodata section of the firmware of instances of those structures. The pin objects structure ("machine_pin_obj_t") instead has its QSTR variable holder changed from "qstr" to "qstr_short_t", and some elements of that structure have been rearranged to remove enough padding bytes inside structure elements to let the linker allocate less data for instances of that structure. Signed-off-by: Alessandro Gatti --- ports/renesas-ra/pin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/renesas-ra/pin.h b/ports/renesas-ra/pin.h index 76d6c0b1e4..649f1f2fce 100644 --- a/ports/renesas-ra/pin.h +++ b/ports/renesas-ra/pin.h @@ -41,9 +41,9 @@ typedef struct { typedef struct { mp_obj_base_t base; - qstr name; - uint8_t pin; const machine_pin_adc_obj_t *ad; + qstr_short_t name; + uint8_t pin; } machine_pin_obj_t; // Include all of the individual pin objects