Skip to content

Add POSIX and Zephyr platform support for Ocre runtime#70

Merged
kr-t merged 1 commit intomainfrom
features/modules-refactoring-and-linux-port
Jul 17, 2025
Merged

Add POSIX and Zephyr platform support for Ocre runtime#70
kr-t merged 1 commit intomainfrom
features/modules-refactoring-and-linux-port

Conversation

@kr-t
Copy link
Collaborator

@kr-t kr-t commented Jul 17, 2025

Description

Add POSIX and Zephyr platform support for Ocre runtime

  • Introduced core internal headers and source files for both POSIX and Zephyr platforms, including memory management, threading, mutexes, message queues, timers, and miscellaneous utilities.

  • Implemented core functions for memory allocation and deallocation using malloc and free for POSIX, and k_malloc and k_free for Zephyr.

  • Developed message queue functionalities with initialization, sending, and receiving capabilities for both platforms.

  • Created thread management functions to handle thread creation, destruction, and execution for both environments.

  • Added timer functionalities to support periodic and one-shot timers in the Ocre runtime.

  • Implemented filesystem operations for Zephyr, including file opening, reading, and directory listing.

  • Configured CMake build scripts for both platforms, ensuring proper linking and compilation of the Ocre runtime components.

  • Integrated WAMR (WebAssembly Micro Runtime) support for both platforms, allowing for enhanced execution of WebAssembly modules.
    Also, please list any issue that this PR is intended to fix.

  • Fixes issue ocre on linux - objectives, concerns - discussion #35

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Code cleanup/refactoring
  • This change requires a documentation update

How Has This Been Tested?

Tested on Zephyr's native_sim and u585, and Linux x86_64

Test Configuration (required):

  • Host OS type, version, and arch: Ubuntu
  • Developer Board make & model: STM32 U585

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

- Introduced core internal headers and source files for both POSIX and Zephyr platforms, including memory management, threading, mutexes, message queues, timers, and miscellaneous utilities.
- Implemented core functions for memory allocation and deallocation using `malloc` and `free` for POSIX, and `k_malloc` and `k_free` for Zephyr.
- Developed message queue functionalities with initialization, sending, and receiving capabilities for both platforms.
- Created thread management functions to handle thread creation, destruction, and execution for both environments.
- Added timer functionalities to support periodic and one-shot timers in the Ocre runtime.
- Implemented filesystem operations for Zephyr, including file opening, reading, and directory listing.
- Configured CMake build scripts for both platforms, ensuring proper linking and compilation of the Ocre runtime components.
- Integrated WAMR (WebAssembly Micro Runtime) support for both platforms, allowing for enhanced execution of WebAssembly modules.

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
@kr-t kr-t self-assigned this Jul 17, 2025
@kr-t
Copy link
Collaborator Author

kr-t commented Jul 17, 2025

Both board on Zephyr (left) and Linux (right) work as expected
image

@kr-t kr-t merged commit fd94f25 into main Jul 17, 2025
3 checks passed
@kr-t kr-t deleted the features/modules-refactoring-and-linux-port branch July 17, 2025 06:33
kr-t added a commit that referenced this pull request Aug 28, 2025
* Update Readme (#71)
* Update MAINTAINERS.md (#73)
* Refactor and stabilize system initialization, messaging, and platform support (#75)
* Fix/readme and build script (#74)
* fixed native sim run command
* resolve input files to absolute paths before build dir change
* Update zephyr and wamr to internal staging branch

---------

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Stephen Berard <srberard@users.noreply.github.com>
Signed-off-by: Knox Lively <knox.lively@protonmail.com>
Co-authored-by: Stephen Berard <srberard@users.noreply.github.com>
Co-authored-by: Knox Lively <knox.lively@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants