I built a tensorflow lite micro library successfully.
In tensorflow lite micro library project
Output: *** Using Compiler 'V6.18', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin' Build target 'Target 1' Note: source file '.\Packages\tflite_micro\tensorflow\lite\micro\kernels\kernel_util.cc' - object file renamed from '.\Objects\kernel_util.o' to '.\Objects\kernel_util_1.o'. compiling arm_relu_q15.c... compiling arm_relu6_s8.c... compiling arm_nn_activations_q7.c... compiling arm_nn_activations_q15.c... compiling arm_relu_q7.c... compiling arm_elementwise_add_s16.c... compiling arm_elementwise_add_s8.c... compiling arm_elementwise_mul_s8.c... compiling arm_concatenation_s8_w.c... compiling arm_concatenation_s8_z.c... compiling arm_elementwise_mul_s16.c... compiling arm_concatenation_s8_y.c... compiling arm_concatenation_s8_x.c... compiling arm_convolve_1_x_n_s8.c... compiling arm_convolve_1x1_s8_fast.c... compiling arm_convolve_1x1_HWC_q7_fast_nonsquare.c... compiling arm_convolve_fast_s16.c... compiling arm_convolve_HWC_q7_fast.c... compiling arm_convolve_HWC_q7_basic.c... compiling arm_convolve_HWC_q7_fast_nonsquare.c... compiling arm_convolve_HWC_q7_basic_nonsquare.c... compiling arm_convolve_HWC_q7_RGB.c... compiling arm_convolve_HWC_q15_basic.c... compiling arm_convolve_HWC_q15_fast.c... compiling arm_convolve_wrapper_s8.c... compiling arm_convolve_HWC_q15_fast_nonsquare.c... compiling arm_convolve_s16.c... compiling arm_convolve_s8.c... compiling arm_convolve_wrapper_s16.c... compiling arm_depthwise_conv_3x3_s8.c... compiling arm_depthwise_conv_s8_opt.c... compiling arm_depthwise_conv_wrapper_s8.c... compiling arm_depthwise_conv_s16.c... compiling arm_depthwise_separable_conv_HWC_q7.c... compiling arm_depthwise_conv_u8_basic_ver1.c... compiling arm_nn_mat_mult_kernel_q7_q15.c... compiling arm_nn_depthwise_conv_s8_core.c... compiling arm_depthwise_conv_s8.c... compiling arm_depthwise_separable_conv_HWC_q7_nonsquare.c... compiling arm_nn_mat_mult_kernel_q7_q15_reordered.c... compiling arm_nn_mat_mult_kernel_s8_s16.c... compiling arm_nn_mat_mult_s8.c... compiling arm_fully_connected_mat_q7_vec_q15.c... compiling arm_fully_connected_q7.c... compiling arm_fully_connected_mat_q7_vec_q15_opt.c... compiling arm_fully_connected_q7_opt.c... compiling arm_fully_connected_q15.c... compiling arm_nn_mat_mult_kernel_s8_s16_reordered.c... compiling arm_fully_connected_s8.c... compiling arm_fully_connected_q15_opt.c... compiling arm_nn_accumulate_q7_to_q15.c... compiling arm_fully_connected_s16.c... compiling arm_nn_add_q7.c... compiling arm_nn_depthwise_conv_nt_t_padded_s8.c... compiling arm_nn_depthwise_conv_nt_t_s8.c... compiling arm_nn_mat_mul_core_1x_s8.c... compiling arm_nn_mat_mul_core_4x_s8.c... compiling arm_nn_mat_mul_kernel_s16.c... compiling arm_nn_mult_q7.c... compiling arm_nn_mult_q15.c... compiling arm_nn_mat_mult_nt_t_s8.c... compiling arm_nn_vec_mat_mult_t_s16.c... compiling arm_nn_vec_mat_mult_t_s8.c... compiling arm_nntables.c... compiling arm_nn_vec_mat_mult_t_svdf_s8.c... compiling arm_q7_to_q15_no_shift.c... compiling arm_q7_to_q15_reordered_no_shift.c... compiling arm_q7_to_q15_reordered_with_offset.c... compiling arm_q7_to_q15_with_offset.c... compiling arm_avgpool_s8.c... compiling arm_avgpool_s16.c... compiling arm_max_pool_s16.c... compiling arm_reshape_s8.c... compiling arm_pool_q7_HWC.c... compiling arm_max_pool_s8.c... compiling arm_softmax_q15.c... compiling arm_softmax_q7.c... compiling arm_softmax_s8.c... compiling arm_softmax_s8_s16.c... compiling arm_nn_softmax_common_s8.c... compiling arm_softmax_s16.c... compiling arm_softmax_u8.c... compiling arm_softmax_with_batch_q7.c... compiling error_reporter.cc... compiling arm_svdf_s8.c... compiling arm_svdf_state_s16_s8.c... compiling common.cc... compiling tensor_utils.cc... compiling debug_log.cc... compiling kernel_util.cc... compiling schema_utils.cc... compiling op_resolver.cc... compiling all_ops_resolver.cc... compiling fake_micro_context.cc... compiling flatbuffer_utils.cc... compiling memory_helpers.cc... compiling flatbuffer_conversions.cc... compiling micro_log.cc... compiling micro_profiler.cc... compiling micro_string.cc... compiling micro_time.cc... compiling micro_allocation_info.cc... compiling micro_allocator.cc... compiling micro_context.cc... compiling system_setup.cc... compiling micro_graph.cc... compiling micro_interpreter.cc... compiling micro_resource_variable.cc... compiling micro_utils.cc... compiling recording_micro_allocator.cc... compiling mock_micro_graph.cc... compiling test_helper_custom_ops.cc... compiling add.cc... compiling conv.cc... compiling test_helpers.cc... compiling depthwise_conv.cc... compiling mul.cc... compiling fully_connected.cc... compiling pooling.cc... compiling softmax.cc... compiling svdf.cc... compiling activations.cc... compiling arg_min_max.cc... compiling assign_variable.cc... compiling batch_to_space_nd.cc... compiling broadcast_args.cc... compiling broadcast_to.cc... compiling call_once.cc... compiling ceil.cc... compiling cast.cc... compiling detection_postprocess_flexbuffers_generated_data.cc... compiling circular_buffer.cc... compiling cumsum.cc... compiling ethosu.cc... compiling depth_to_space.cc... compiling dequantize.cc... compiling div.cc... compiling elementwise.cc... compiling detection_postprocess.cc... compiling elu.cc... compiling exp.cc... compiling expand_dims.cc... compiling fill.cc... compiling floor.cc... compiling floor_div.cc... compiling floor_mod.cc... compiling gather.cc... compiling gather_nd.cc... compiling hard_swish.cc... compiling if.cc... compiling kernel_util.cc... compiling kernel_runner.cc... compiling l2_pool_2d.cc... compiling l2norm.cc... compiling micro_tensor_utils.cc... compiling leaky_relu.cc... compiling log_softmax.cc... compiling logical.cc... compiling logistic.cc... compiling maximum_minimum.cc... compiling lstm_eval.cc... compiling mirror_pad.cc... compiling neg.cc... compiling pack.cc... compiling pad.cc... compiling quantize.cc... compiling read_variable.cc... compiling prelu.cc... compiling reshape.cc... compiling reduce.cc... compiling resize_bilinear.cc... compiling resize_nearest_neighbor.cc... compiling shape.cc... compiling round.cc... compiling select.cc... compiling slice.cc... compiling space_to_batch_nd.cc... compiling space_to_depth.cc... compiling split.cc... compiling split_v.cc... compiling squared_difference.cc... compiling squeeze.cc... compiling unidirectional_sequence_lstm_test_config.cc... compiling strided_slice.cc... compiling sub.cc... compiling tanh.cc... compiling transpose.cc... compiling unpack.cc... compiling var_handle.cc... compiling unidirectional_sequence_lstm.cc... compiling while.cc... compiling zeros_like.cc... compiling activations_common.cc... compiling add_common.cc... compiling conv_common.cc... compiling circular_buffer_common.cc... compiling depthwise_conv_common.cc... compiling dequantize_common.cc... compiling hard_swish_common.cc... compiling fully_connected_common.cc... compiling leaky_relu_common.cc... compiling logistic_common.cc... compiling logical_common.cc... compiling pooling_common.cc... compiling greedy_memory_planner.cc... compiling linear_memory_planner.cc... compiling quantize_common.cc... compiling gesture_detect_model_data.cc... compiling softmax_common.cc... compiling sub_common.cc... compiling reduce_common.cc... compiling op_resolver_bridge.cc... compiling flatbuffer_conversions_bridge.cc... compiling svdf_common.cc... compiling main_functions.cc... creating Library... ".\Objects\TensorflowLiteMicro.lib" - 0 Error(s), 0 Warning(s).
So, I got a .lib file.
However, something happened when I imported the library to my project and compiled the whole project.
There are multiply defined errors between the library and another library in my project .
Compiling result In My project:
linking... Error: L6200E: Symbol _btod_d2e multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol _btod_ediv multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol _d2e_denorm_low multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol _d2e_norm_op1 multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol __btod_div_common multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol _e2e multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol _btod_emul multiply defined (by btod.o and ROM.lib). Error: L6200E: Symbol __btod_mult_common multiply defined (by btod.o and ROM.lib). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 8 error messages.
How can I remove the redefined source files btod.o? I can't find them in my Tensorflow Lite Micro library project.
When I comment this line, the errors will not happen anymore. But it can't solve the problem basically.
===>We can disable related symbols by opening the .lib file and commenting(#) lines in the .lib file.