# Linker error when compiling mmfv2\_video\_example

**URL:** <https://forum.amebaiot.com/t/linker-error-when-compiling-mmfv2-video-example/4812>\
**Category:** SDK\
**Tags:** evb-amb82\
**Created:** [April 9, 2026, 1:45pm UTC](https://forum.amebaiot.com/t/linker-error-when-compiling-mmfv2-video-example/4812 "2026-04-09T13:45:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![k-adarsh](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@k-adarsh](https://forum.amebaiot.com/u/k-adarsh)\
**Post date:** [April 9, 2026, 1:45pm UTC](https://forum.amebaiot.com/t/linker-error-when-compiling-mmfv2-video-example/4812/1 "2026-04-09T13:45:23Z")

</div>

I’m running into a linker error while trying to build this example: [ameba-rtos-pro2/project/realtek\_amebapro2\_v0\_example/src/mmfv2\_video\_example at c4d145117c9410821aad08f1f1b74a168064a174 · Ameba-AIoT/ameba-rtos-pro2 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/tree/c4d145117c9410821aad08f1f1b74a168064a174/project/realtek_amebapro2_v0_example/src/mmfv2_video_example)

**Error:**  
`[90%] Building C object application/CMakeFiles/application.ntz.dir/home/adarsh/Documents/realtek_amb82/ameba-rtos-pro2/component/video/osd2/osd_render.c.obj`  
`/home/adarsh/Documents/realtek_amb82/ameba-rtos-pro2/component/video/osd2/osd_render.c: In function ‘canvas_create_bitmap’:`  
`/home/adarsh/Documents/realtek_amb82/ameba-rtos-pro2/component/video/osd2/osd_render.c:56:6: warning: unused variable ‘pic_idx’ [-Wunused-variable]`  
`56 | int pic_idx = ch * OSD_OBJ_MAX_NUM + available_block_idx[ch][idx];`  
`| ^ ~~~~~~ `  
`/home/adarsh/Documents/realtek_amb82/ameba-rtos-pro2/component/video/osd2/osd_render.c: In function ‘osd_render_task’:`  
`/home/adarsh/Documents/realtek_amb82/ameba-rtos-pro2/component/video/osd2/osd_render.c:162:14: warning: unused variable ‘buff_bmp’ [-Wunused-variable]`  
`162 | uint8_t **buff_bmp = &(obj->bitmap[bimap_index].buff);`  
`| ^ ~~~~~~~ `  
`[91%] Linking CXX executable application.ntz`  
`/home/adarsh/Documents/realtek_amb82/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: section .ram.bss' type changed to PROGBITS /home/adarsh/Documents/realtek_amb82/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: section .ddr.bss’ type changed to PROGBITS`  
`/usr/bin/objcopy: Unable to recognise the format of the input file `application.ntz.axf’`  
`gmake[3]: *** [application/CMakeFiles/application.ntz.dir/build.make:3738: application/application.ntz] Error 1`  
`gmake[3]: *** Deleting file ‘application/application.ntz’`  
`gmake[2]: *** [CMakeFiles/Makefile2:474: application/CMakeFiles/application.ntz.dir/all] Error 2`  
`gmake[1]: *** [CMakeFiles/Makefile2:192: CMakeFiles/flash.dir/rule] Error 2`  
`gmake: *** [Makefile:151: flash] Error 2`

**Steps I did:**

1. Clone the repo.

2. Run `export PATH=/home/adarsh/Documents/realtek_amb82/asdk-10.3.0/linux/newlib/bin:$PATH`

3. From `project/realtek_amebapro2_v0_example/GCC-RELEASE/build` run `cmake .. -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DVIDEO_EXAMPLE=on`

4. Run `cmake --build . --target flash`

Any idea what might be missing from my environment?

---

<div class="post-metadata">

**Author:** ![KevinKL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kevinkl/32/2632_2.png) [@KevinKL](https://forum.amebaiot.com/u/KevinKL)\
**Post date:** [April 10, 2026, 9:36am UTC](https://forum.amebaiot.com/t/linker-error-when-compiling-mmfv2-video-example/4812/2 "2026-04-10T09:36:52Z")

</div>

Hi @k-adarsh ,

There are a few suggestions to fix this issue,

1. Ensure that you have given permission for the whole repo, `sudo chmod 777 -R .`
2. Verify that the toolchain is extracted properly and completely.
3. You may choose to add the toolchain `export PATH=/home/adarsh/Documents/realtek_amb82/asdk-10.3.0/linux/newlib/bin:$PATH` to ~/.bashrc
4. Perform a clean build, rm -r \* on build folder.

Thank you.
