Making mpy from C module

Hello there!
I’ve been trying to create .mpy file from C module.
To have a start from example I’ve found in src/micropthon/examples/natmod/urandom C module which I tried to make
But it can’t be compiled because of error
I have the same error with other modules in natmod directory

GEN build/urandom_armv7emdp.config.h
CC urandom.c
LINK build/urandom.o
Traceback (most recent call last):
  File "../../../tools/mpy_ld.py", line 964, in <module>
    main()
  File "../../../tools/mpy_ld.py", line 961, in main
    do_link(args)
  File "../../../tools/mpy_ld.py", line 937, in do_link
    load_object_file(env, file)
  File "../../../tools/mpy_ld.py", line 595, in load_object_file
    if s.data_size == 0:
AttributeError: 'Section' object has no attribute 'data_size'
../../../py/dynruntime.mk:138: recipe for target 'build/urandom_armv7emdp.native.mpy' failed
make: *** [build/urandom_armv7emdp.native.mpy] Error 1

Please explain me how to fix it.

No clue, we do not provide help support for the C firmware.

But, also, I don’t know what quite you are doing. We’ve never used that feature of MicroPython.

I am gonna use .mpy modules according to this link Native machine code in .mpy files — MicroPython 1.14 documentation
Is that feature achievable for openmv?

Yeah, but, you are on your own. You need to figure out how MicroPython works and how c modules work.