在使用meta-ma35d1 bitbake core-image-minimal时,recipe m4proj-M4-BSP-r0发生错误: 
- Log data follows:
 
 - | DEBUG: Executing python function sstate_task_prefunc
 
 - | DEBUG: Python function sstate_task_prefunc finished
 
 - | DEBUG: Executing shell function do_deploy
 
 - | cp: cannot stat '/P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/image//usr/m4proj/*': No such file or directory
 
 - | WARNING: exit code 1 from a shell command.
 
 - | ERROR: Execution of '/P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/temp/run.do_deploy.1416967' failed with exit code 1
 
 - ERROR: Task (/P4510/code/ma35d1/poky/../meta-nvt/meta-ma35d1/recipes-bsp/m4proj/m4proj_0.90.bb:do_deploy) failed with exit code '1'
 
 - NOTE: Tasks Summary: Attempted 2118 tasks of which 2115 didn't need to be rerun and 1 failed.
 
  复制代码 
 
进一步查看gcc_log.txt发现有两种类型的错误,第一种找不到symbol,怀疑源码文件不全: 
- Building target: Share_memory_sdram.elf
 
 - Invoking: Cross ARM GNU C Linker
 
 - arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g -T "/P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/Library/Device/Nuvoton/ma35d1_rtp/Source/GCC/gcc_arm.ld" -Xlinker --gc-sections -Wl,-Map,"Share_memory_sdram.map" --specs=nano.specs -o "Share_memory_sdram.elf" ./User/porting/mbox_whc.o ./User/porting/openamp.o ./User/porting/rsc_table.o  ./User/main.o  ./CMSIS/CMSIS/GCC/_syscalls.o ./CMSIS/CMSIS/GCC/startup_ma35d1_rtp.o  ./CMSIS/CMSIS/system_ma35d1_rtp.o   
 
 - ./User/porting/mbox_whc.o: In function `Mbox_Poll':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/mbox_whc.c:57: undefined reference to `WHC_Send'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/mbox_whc.c:68: undefined reference to `WHC_Send'
 
 - ./User/porting/mbox_whc.o: In function `WHC0_IRQHandler':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/mbox_whc.c:89: undefined reference to `WHC_Recv'
 
 - ./User/porting/openamp.o: In function `OPENAMP_shmem_init':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:50: undefined reference to `metal_init'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:52: undefined reference to `metal_register_generic_device'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:58: undefined reference to `metal_device_open'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:65: undefined reference to `metal_io_init'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:81: undefined reference to `metal_io_init'
 
 - ./User/porting/openamp.o: In function `MA35D1_OpenAMP_Init':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:107: undefined reference to `rproc_virtio_create_vdev'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:113: undefined reference to `rproc_virtio_wait_remote_ready'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:115: undefined reference to `rproc_virtio_init_vring'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:122: undefined reference to `rproc_virtio_init_vring'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:130: undefined reference to `rpmsg_virtio_init_shm_pool'
 
 - ./User/porting/openamp.o: In function `OPENAMP_create_endpoint':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:151: undefined reference to `rpmsg_create_ept'
 
 - ./User/porting/openamp.o: In function `OPENAMP_send_data':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/porting/openamp.c:176: undefined reference to `WHC_Send'
 
 - ./User/porting/openamp.o:(.rodata+0x0): undefined reference to `metal_default_log_handler'
 
 - ./User/main.o: In function `SYS_Init':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/main.c:39: undefined reference to `CLK_SetModuleClock'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/main.c:40: undefined reference to `CLK_EnableModuleClock'
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/main.c:41: undefined reference to `CLK_EnableModuleClock'
 
 - ./User/main.o: In function `main':
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/git/SampleCode/OpenAMP/Share_Memory_SDRAM/main.c:70: undefined reference to `UART_Open'
 
 - collect2: error: ld returned 1 exit status
 
 - make: *** [makefile:47: Share_memory_sdram.elf] Error 1
 
  复制代码 
 
第二种是ld参数错误,-T ""括号为空,未设置gcc_arm.ld路径: 
- Building target: Share_memory_demo.elf
 
 - Invoking: Cross ARM GNU C Linker
 
 - arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g -T "" -Xlinker --gc-sections -Wl,-Map,"Share_memory_demo.map" --specs=nano.specs -o "Share_memory_demo.elf" ./User/porting/mbox_whc.o ./User/porting/openamp.o ./User/porting/rsc_table.o  ./User/main.o  ./CMSIS/CMSIS/system_ma35d1_rtp.o   
 
 - /P4510/code/ma35d1/poky/build/tmp-glibc/work/numaker_iot_ma35d16f90-poky-linux/m4proj/M4-BSP-r0/recipe-sysroot-native/usr/share/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed
 
 - collect2: error: ld returned 1 exit status
 
 - make: *** [makefile:46: Share_memory_demo.elf] Error 1
 
 
  复制代码 
 
 
 |