Commit Graph

109 Commits

Author SHA1 Message Date
iabdalkader
552f4ada8e lib/imlib: Fix raw stream buffer size check.
Check frame dimensions as well as total image size
top scale the image if needed.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-21 16:41:34 +02:00
Kwabena W. Agyeman
f6f39f924b lib/models: Add blazeface model. 2025-09-18 13:41:56 -07:00
Kwabena W. Agyeman
14d277c95b lib/stai: Add multi-tensor input/output support.
The name of the buffer being NULL defines the end of the buffer list.
2025-09-18 13:30:14 -07:00
iabdalkader
f994fe1d06 micropython: Update submodule
- Revert "stm32/uart: Enable UART clock in low power modes."
- stm32/uart: Enable UART FIFO for STM32N6.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-16 18:26:34 +02:00
iabdalkader
1dd9b33acc ports/alif: Implement hardware accelerated CRC.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-11 22:08:58 +02:00
iabdalkader
1308129fdb lib/imlib: Enable raw streaming control at runtime.
Not for use with USBDBG.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-11 21:43:16 +02:00
iabdalkader
22981bdb61 lib/imlib: Add an embedded frame header in the streaming buffer.
Embed framebuffer header before frame data in streaming protocol to
enable protocol channels to read header+data from contiguous memory
with zero-copy operations. Header contains width, height, pixformat
and compressed size.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-11 18:09:24 +02:00
iabdalkader
f177d221e9 lib/imlib: Remove test loop.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-02 18:54:38 +02:00
iabdalkader
d05d5f1d3c lib/imlib: Use framebuffer_t for main and streaming buffers.
Removes separate jpegbuffer_t and consolidates streaming/preview
functionality into the main framebuffer_t structure.

Main changes:
- Remove jpegbuffer_t structure and global jpegbuffer variable
- Add streaming fields (enabled, quality, lock, raw_w, raw_h) to framebuffer_t
- Replace framebuffer_update_jpeg_buffer() with framebuffer_update_preview()

API improvements:
- Rename framebuffer_init_image() -> framebuffer_to_image()
- Rename framebuffer_init_from_image() -> framebuffer_from_image()
- Add framebuffer_set_enabled() and framebuffer_set_preview() utilities
- Remove accessor macros, use direct field access (kept framebuffer_get_buffer_size)
- Update framebuffer_init() to accept enabled parameter
- Add configurable raw preview dimensions per framebuffer

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-02 15:52:17 +02:00
iabdalkader
4c2c59d0e5 lib/imlib: Remove old framebuffer macros.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-02 13:41:30 +02:00
iabdalkader
927a2c7b54 lib/tflm: Add manual profiling instrumentation.
Use OMV_PROFILER_ENTER/EXIT macros to manually instrument the TensorFlow
Lite inference function instead of automatic -finstrument-functions to
avoid C++ linking issues with operator delete and atomics.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-24 16:57:15 +02:00
iabdalkader
e5cdccc72e common: Introduce profiling support.
This adds a simple code profiler that leverages both SysTick and
the Performance Monitoring Unit (PMU) available on Armv8.1-M cores.
SysTick provides a simple high-resolution timer source, while the PMU
offers a cycle counter and multiple configurable event counters that
can track low-level performance metrics such as cache misses, pipeline
stalls, etc... See the Armv8.1-M Performance Monitoring User Guide
for additional details.

Function-level instrumentation is enabled using -finstrument-functions
on select files to automatically record statistics on entry/exit.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-24 16:57:06 +02:00
iabdalkader
cf7b84d682 ports/all: Remove old profiling macros.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-24 14:40:02 +02:00
iabdalkader
0d5c5bc6eb ports/stm32: Revert N6 slow-peripheral IC clock source.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-19 13:39:33 +02:00
Kwabena W. Agyeman
89fc302812 lib/cmsis: Fix cmsis compile time constant folding. 2025-08-18 13:33:25 -07:00
iabdalkader
bb7431cb27 lib: Update to MicroPython 1.26.0.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
e936b69371 lib/stm32/n6: Fix default tick priority.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
941e1996bc lib/stm32: Build hal_uart_ex.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
eae16e4e4b lib/cmsis: Set N6 USART clock source.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
Kwabena W. Agyeman
c26ed091a1 lib/alif: Fix Mac M4 USB enumeration. 2025-08-13 14:12:16 -07:00
Ibrahim Abdelkader
72d09d8f61
Merge pull request #2747 from kwagyeman/kwabena/genx320_event_mode
Some checks failed
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (DOCKER) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_AE3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_N6) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
drivers/sensors: Add RAW event output mode for the genx320.
2025-08-09 21:14:40 +03:00
Kwabena W. Agyeman
051396b4b8 modules/py_image: Add event histogram drawing method. 2025-08-09 09:32:10 -07:00
Kwabena W. Agyeman
af9679c3a0 lib/imlib: Add event camera imlib data structure. 2025-08-09 09:32:10 -07:00
Kwabena W. Agyeman
dabdd6994a lib/imlib: Add f32 conversion ops. 2025-08-07 15:40:48 -07:00
Kwabena W. Agyeman
0e9e936553 lib/imlib: Add rgb565 to rgb888 simd conversion. 2025-08-05 11:05:38 -07:00
Kwabena W. Agyeman
1b2c38fa6d lib/imlib: Add s8/s16 scatter/gather ops. 2025-08-05 10:48:52 -07:00
Kwabena W. Agyeman
374d1a8de2 lib/imlib: Add simd constant add/sub.
Broadcast a constant to add across all values.
2025-08-05 10:40:55 -07:00
Kwabena W. Agyeman
d786099bb4 lib/imlib: Fix simd intrinsics compile issue.
These lines cause compile time errors when using simd.h in more
files.
2025-08-05 10:38:16 -07:00
iabdalkader
994dee3d2b lib/micropython: Update submodule.
Enable SPI for n6.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-02 13:13:31 +02:00
Kwabena W. Agyeman
47c5618231 lib/imlib: Add transform argument to draw_image. 2025-07-31 13:13:45 -07:00
Kwabena W. Agyeman
20839405a2 lib/imlib: Add transform support to GPU drivers. 2025-07-31 13:12:48 -07:00
Kwabena W. Agyeman
680bd322ce lib/imlib: Fix draw line glitch. 2025-07-28 19:40:35 -07:00
iabdalkader
0458db2130 misc: Use updated mutex API.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-25 20:20:57 +02:00
iabdalkader
5d1f8860b1 imlib: Rework framebuffer management.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-23 18:24:52 +02:00
Ibrahim Abdelkader
1522b1b89b
Merge pull request #2773 from kwagyeman/kwabena/tf_readme
tflm: Remove out of date tf documentation.
2025-07-23 10:46:07 +03:00
iabdalkader
772808efa9 lib/micropython: Update submodule.
* OpenMV-PT fixes.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-22 09:37:56 +02:00
Kwabena W. Agyeman
7bd3cb08bd tflm: Remove out of date tf documentation. 2025-07-21 21:58:58 -07:00
iabdalkader
8df82bdc00 lib: Use common alignment macros.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-16 11:18:56 +02:00
iabdalkader
9f98ac73a0 lib/stm32: Pass DCMI handle to DCMI_DMAConvCpltUser.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:34 +02:00
iabdalkader
5966cf4b21 micropython: Update submodule.
Fix RT1060 USB ID and buffer size.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-08 20:01:57 +02:00
Kwabena W. Agyeman
e6dff41517 lib/imlib: Remove old fallback image transfer code. 2025-07-07 20:39:29 -07:00
Kwabena W. Agyeman
e14bbe586d lib/imlib: Fix update_jpeg_buffer to update from the passed image.
framebuffer_update_jpeg_buffer was previously bugged as it always
updated the jpeg buffer from the frame buffer versus the image
object it was attached to. e.g. img.flush() always flushed the
frame buffer and not the image object it was called on.
2025-07-07 20:39:29 -07:00
Kwabena W. Agyeman
84c3db58a4 modules/py_omv: Remove disable fb from omv module. 2025-07-07 20:39:29 -07:00
Kwabena W. Agyeman
caec00224a lib/micropython: Update RT1062 USB ID and buffers. 2025-07-05 17:59:41 -07:00
iabdalkader
d0dfa219a9 lib/micropython: Update submodule.
Fix Alif machine_pin_irq.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-01 20:32:01 +02:00
Kwabena W. Agyeman
a63c8ba8d6 lib/imlib: Remove unused functions. 2025-06-27 19:16:29 -07:00
iabdalkader
4ded9fba91 common: Remove xalloc.
Originally meant to abstract gc_collect but we could just use
m_alloc and friends. Also was meant to provide functions like
alloc0, alloc_maybe etc.. which are all available in MP anyway.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-27 14:50:16 +02:00
iabdalkader
1e0281555c micropython: Update submodule.
Fix Alif LPGPIO pin IRQ.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-26 09:41:05 +02:00
iabdalkader
c7d84b8ca5 lib/imlib: Add deep copy flag to image_copy.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:16:00 +02:00
iabdalkader
2913d78182 imlib/framebuffer: Support dynamic frame buffers.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-24 20:19:25 +02:00