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
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:
-
Clone the repo.
-
Run
export PATH=/home/adarsh/Documents/realtek_amb82/asdk-10.3.0/linux/newlib/bin:$PATH -
From
project/realtek_amebapro2_v0_example/GCC-RELEASE/buildruncmake .. -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DVIDEO_EXAMPLE=on -
Run
cmake --build . --target flash
Any idea what might be missing from my environment?