foss-for-synopsys-dwc-arc-processors / toolchain

Repository containing releases of prebuilt GNU toolchains for DesignWare ARC Processors from Synopsys (available from "releases" link below).
http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/Pages/default.aspx
GNU General Public License v3.0
91 stars 48 forks source link

Suggestion for adding docker image support #399

Open gitE0Z9 opened 3 years ago

gitE0Z9 commented 3 years ago

After compiling this toolchain on colab, I feel this process is really time-consuming and not portable at all, the building directory and the install-dir are both large in size.

It would be great if you could provide docker image version to simplify this part and make installation easier.

Thanks!

abrodkin commented 3 years ago

@gitE0Z9 if you want something immediately usable you may try to use our pre-built toolchain, all flavors of which you may find here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2021.03-release.

Please let us know if for some reason pre-built version doesn't work for you and we'll try to see how that might be improved.

gitE0Z9 commented 3 years ago

@abrodkin Thanks for your reply, I didn't notice that there are releases already, shall give it a try later. At the same time, my tflite micro project with the compiler arc-elf32-g++ v10.2.0 built with the git repository showed me this message and the option -mno-sdata does't solve the problem.

In case you want to know related code: https://github.com/fishop0304/NKUST_TTSDGYD/tree/main/Project

/content/arc/bin/arc-elf32-g++ -mno-sdata -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -O3 -Wsign-compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -Wswitch -Wvla -Wall -Wextra -Wstrict-aliasing -Wno-unused-parameter -DREDUCE_CODESIZE -mxy -include ./../himax_we1_sdk/core_config.h -mcpu=em4_fpus -mlittle-endian -mcode-density -mdiv-rem -mswap -mnorm -mmpy-option=6 -mbarrel-shifter -mfpu=fpus_all -I ./.. -I ./inc -I ./../himax_we1_sdk -I ./../third_party/gemmlowp -I ./../third_party/flatbuffers/include -I ./../third_party/ruy -I ./../third_party/arc_mli_package/include -I ./../third_party/arc_mli_package/include/api -I ./../tensorflow/lite/micro/tools/make/downloads/kissfft -o output.elf ./../tensorflow/lite/micro/micro_interpreter.o ./../tensorflow/lite/micro/all_ops_resolver.o ./../tensorflow/lite/micro/simple_memory_allocator.o ./../tensorflow/lite/micro/memory_helpers.o ./../tensorflow/lite/micro/recording_micro_allocator.o ./../tensorflow/lite/micro/micro_error_reporter.o ./../tensorflow/lite/micro/micro_time.o ./../tensorflow/lite/micro/recording_simple_memory_allocator.o ./../tensorflow/lite/micro/micro_string.o ./../tensorflow/lite/micro/micro_profiler.o ./../tensorflow/lite/micro/micro_utils.o ./../tensorflow/lite/micro/himax_we1_evb/debug_log.o ./../tensorflow/lite/micro/micro_optional_debug_tools.o ./../tensorflow/lite/micro/test_helpers.o ./../tensorflow/lite/micro/micro_allocator.o ./../tensorflow/lite/micro/benchmarks/keyword_scrambled_model_data.o ./../tensorflow/lite/micro/kernels/logistic.o ./../tensorflow/lite/micro/kernels/arc_mli/conv.o ./../tensorflow/lite/micro/kernels/prelu.o ./../tensorflow/lite/micro/kernels/dequantize.o ./../tensorflow/lite/micro/kernels/l2norm.o ./../tensorflow/lite/micro/kernels/resize_nearest_neighbor.o ./../tensorflow/lite/micro/kernels/tanh.o ./../tensorflow/lite/micro/kernels/activations.o ./../tensorflow/lite/micro/kernels/arg_min_max.o ./../tensorflow/lite/micro/kernels/pad.o ./../tensorflow/lite/micro/kernels/reduce.o ./../tensorflow/lite/micro/kernels/unpack.o ./../tensorflow/lite/micro/kernels/sub.o ./../tensorflow/lite/micro/kernels/add.o ./../tensorflow/lite/micro/kernels/split.o ./../tensorflow/lite/micro/kernels/circular_buffer.o ./../tensorflow/lite/micro/kernels/kernel_runner.o ./../tensorflow/lite/micro/kernels/floor.o ./../tensorflow/lite/micro/kernels/round.o ./../tensorflow/lite/micro/kernels/ceil.o ./../tensorflow/lite/micro/kernels/svdf.o ./../tensorflow/lite/micro/kernels/hard_swish.o ./../tensorflow/lite/micro/kernels/arc_mli/pooling.o ./../tensorflow/lite/micro/kernels/concatenation.o ./../tensorflow/lite/micro/kernels/neg.o ./../tensorflow/lite/micro/kernels/quantize.o ./../tensorflow/lite/micro/kernels/ethosu.o ./../tensorflow/lite/micro/kernels/mul.o ./../tensorflow/lite/micro/kernels/maximum_minimum.o ./../tensorflow/lite/micro/kernels/reshape.o ./../tensorflow/lite/micro/kernels/strided_slice.o ./../tensorflow/lite/micro/kernels/softmax.o ./../tensorflow/lite/micro/kernels/pack.o ./../tensorflow/lite/micro/kernels/kernel_util.o ./../tensorflow/lite/micro/kernels/logical.o ./../tensorflow/lite/micro/kernels/elementwise.o ./../tensorflow/lite/micro/kernels/comparisons.o ./../tensorflow/lite/micro/kernels/arc_mli/fully_connected.o ./../tensorflow/lite/micro/kernels/arc_mli/depthwise_conv.o ./../tensorflow/lite/micro/memory_planner/linear_memory_planner.o ./../tensorflow/lite/micro/memory_planner/greedy_memory_planner.o ./../tensorflow/lite/micro/testing/test_conv_model.o ./../tensorflow/lite/c/common.o ./../tensorflow/lite/core/api/error_reporter.o ./../tensorflow/lite/core/api/flatbuffer_conversions.o ./../tensorflow/lite/core/api/op_resolver.o ./../tensorflow/lite/core/api/tensor_utils.o ./../tensorflow/lite/kernels/internal/quantization_util.o ./../tensorflow/lite/kernels/kernel_util.o ./../tensorflow/lite/micro/testing/test_utils.o ./../tensorflow/lite/micro/kernels/arc_mli/scratch_buffers.o ./../tensorflow/lite/micro/kernels/arc_mli/scratch_buf_mgr.o ./../tensorflow/lite/micro/kernels/arc_mli/mli_slicers.o ./src/model_settings.o ./src/synopsys_wei_gpio.o ./src/detection_responder.o ./src/main_functions.o ./src/person_detect_model_data.o ./src/main.o ./src/image_provider.o ./src/synopsys_wei_delay.o -Wl,-lmli -Wl,-lmwdepend -Wl,-marcv2elfx -Wl,-Map=memory.map -Wl,--strip-debug -Wl,--stats,--gc-sections -Wl,--cref -L./../third_party/arc_mli_package/bin/himax_arcem9d_r16/release -L./../third_party/mw_gnu_dependencies/gnu_depend_lib -L . -Wl,--start-group ./../himax_we1_sdk/libcpuarc.a ./../himax_we1_sdk/libbss.a ./../himax_we1_sdk/libboard_socket.a ./../himax_we1_sdk/libboard_open_socket.a ./../himax_we1_sdk/liblibcommon.a ./../himax_we1_sdk/liblibaudio.a ./../himax_we1_sdk/liblibsecurity.a ./../himax_we1_sdk/liblibsensordp.a ./../himax_we1_sdk/liblibtflm.a -Wl,--end-group 
/content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/bin/ld: address 0x54 of output.elf section `.ivt' is not within region `ICCM1'
/content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/bin/ld: address 0x54 of output.elf section `.ivt' is not within region `ICCM1'
./../tensorflow/lite/micro/kernels/arc_mli/conv.o: in function `void tflite::ops::micro::ConvertToMliTensorData<signed char>(TfLiteTensor const*, _mli_tensor*)':
conv.cc:(.text._ZN6tflite3ops5microL22ConvertToMliTensorDataIaEEvPK12TfLiteTensorP11_mli_tensor+0x90): relocation truncated to fit: R_ARC_SDA_LDST2 against symbol `_impure_ptr' defined in .sdata section in /content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/lib/em4_fpus/libc.a(lib_a-impure.o)
collect2: error: ld returned 1 exit status
Makefile:327: recipe for target 'output.elf' failed
make: *** [output.elf] Error 1
gitE0Z9 commented 3 years ago

As for pre-built version, I used this one for tflite project https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_elf32_le_linux_install.tar.gz here comes the same error message with some not implemented warnings.

/content/arc_gnu/bin/arc-elf32-g++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -O3 -Wsign-compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -Wswitch -Wvla -Wall -Wextra -Wstrict-aliasing -Wno-unused-parameter -DREDUCE_CODESIZE -mxy -include ./../himax_we1_sdk/core_config.h -mcpu=em4_fpus -mlittle-endian -mcode-density -mdiv-rem -mswap -mnorm -mmpy-option=6 -mbarrel-shifter -mfpu=fpus_all -I ./.. -I ./inc -I ./../himax_we1_sdk -I ./../third_party/gemmlowp -I ./../third_party/flatbuffers/include -I ./../third_party/ruy -I ./../third_party/arc_mli_package/include -I ./../third_party/arc_mli_package/include/api -I ./../tensorflow/lite/micro/tools/make/downloads/kissfft -o output.elf ./../tensorflow/lite/micro/micro_interpreter.o ./../tensorflow/lite/micro/all_ops_resolver.o ./../tensorflow/lite/micro/simple_memory_allocator.o ./../tensorflow/lite/micro/memory_helpers.o ./../tensorflow/lite/micro/recording_micro_allocator.o ./../tensorflow/lite/micro/micro_error_reporter.o ./../tensorflow/lite/micro/micro_time.o ./../tensorflow/lite/micro/recording_simple_memory_allocator.o ./../tensorflow/lite/micro/micro_string.o ./../tensorflow/lite/micro/micro_profiler.o ./../tensorflow/lite/micro/micro_utils.o ./../tensorflow/lite/micro/himax_we1_evb/debug_log.o ./../tensorflow/lite/micro/micro_optional_debug_tools.o ./../tensorflow/lite/micro/test_helpers.o ./../tensorflow/lite/micro/micro_allocator.o ./../tensorflow/lite/micro/benchmarks/keyword_scrambled_model_data.o ./../tensorflow/lite/micro/kernels/logistic.o ./../tensorflow/lite/micro/kernels/arc_mli/conv.o ./../tensorflow/lite/micro/kernels/prelu.o ./../tensorflow/lite/micro/kernels/dequantize.o ./../tensorflow/lite/micro/kernels/l2norm.o ./../tensorflow/lite/micro/kernels/resize_nearest_neighbor.o ./../tensorflow/lite/micro/kernels/tanh.o ./../tensorflow/lite/micro/kernels/activations.o ./../tensorflow/lite/micro/kernels/arg_min_max.o ./../tensorflow/lite/micro/kernels/pad.o ./../tensorflow/lite/micro/kernels/reduce.o ./../tensorflow/lite/micro/kernels/unpack.o ./../tensorflow/lite/micro/kernels/sub.o ./../tensorflow/lite/micro/kernels/add.o ./../tensorflow/lite/micro/kernels/split.o ./../tensorflow/lite/micro/kernels/circular_buffer.o ./../tensorflow/lite/micro/kernels/kernel_runner.o ./../tensorflow/lite/micro/kernels/floor.o ./../tensorflow/lite/micro/kernels/round.o ./../tensorflow/lite/micro/kernels/ceil.o ./../tensorflow/lite/micro/kernels/svdf.o ./../tensorflow/lite/micro/kernels/hard_swish.o ./../tensorflow/lite/micro/kernels/arc_mli/pooling.o ./../tensorflow/lite/micro/kernels/concatenation.o ./../tensorflow/lite/micro/kernels/neg.o ./../tensorflow/lite/micro/kernels/quantize.o ./../tensorflow/lite/micro/kernels/ethosu.o ./../tensorflow/lite/micro/kernels/mul.o ./../tensorflow/lite/micro/kernels/maximum_minimum.o ./../tensorflow/lite/micro/kernels/reshape.o ./../tensorflow/lite/micro/kernels/strided_slice.o ./../tensorflow/lite/micro/kernels/softmax.o ./../tensorflow/lite/micro/kernels/pack.o ./../tensorflow/lite/micro/kernels/kernel_util.o ./../tensorflow/lite/micro/kernels/logical.o ./../tensorflow/lite/micro/kernels/elementwise.o ./../tensorflow/lite/micro/kernels/comparisons.o ./../tensorflow/lite/micro/kernels/arc_mli/fully_connected.o ./../tensorflow/lite/micro/kernels/arc_mli/depthwise_conv.o ./../tensorflow/lite/micro/memory_planner/linear_memory_planner.o ./../tensorflow/lite/micro/memory_planner/greedy_memory_planner.o ./../tensorflow/lite/micro/testing/test_conv_model.o ./../tensorflow/lite/c/common.o ./../tensorflow/lite/core/api/error_reporter.o ./../tensorflow/lite/core/api/flatbuffer_conversions.o ./../tensorflow/lite/core/api/op_resolver.o ./../tensorflow/lite/core/api/tensor_utils.o ./../tensorflow/lite/kernels/internal/quantization_util.o ./../tensorflow/lite/kernels/kernel_util.o ./../tensorflow/lite/micro/testing/test_utils.o ./../tensorflow/lite/micro/kernels/arc_mli/scratch_buffers.o ./../tensorflow/lite/micro/kernels/arc_mli/scratch_buf_mgr.o ./../tensorflow/lite/micro/kernels/arc_mli/mli_slicers.o ./src/model_settings.o ./src/synopsys_wei_gpio.o ./src/detection_responder.o ./src/main_functions.o ./src/person_detect_model_data.o ./src/main.o ./src/image_provider.o ./src/synopsys_wei_delay.o -Wl,-lmli -Wl,-lmwdepend -Wl,-marcv2elfx -Wl,-Map=memory.map -Wl,--strip-debug -Wl,--stats,--gc-sections -Wl,--cref -L./../third_party/arc_mli_package/bin/himax_arcem9d_r16/release -L./../third_party/mw_gnu_dependencies/gnu_depend_lib -L . -Wl,--start-group ./../himax_we1_sdk/libcpuarc.a ./../himax_we1_sdk/libbss.a ./../himax_we1_sdk/libboard_socket.a ./../himax_we1_sdk/libboard_open_socket.a ./../himax_we1_sdk/liblibcommon.a ./../himax_we1_sdk/liblibaudio.a ./../himax_we1_sdk/liblibsecurity.a ./../himax_we1_sdk/liblibsensordp.a ./../himax_we1_sdk/liblibtflm.a -Wl,--end-group 
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-closer.o): in function `_close_r':
closer.c:(.text._close_r+0xa): warning: _close is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-fstatr.o): in function `_fstat_r':
fstatr.c:(.text._fstat_r+0xc): warning: _fstat is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-signalr.o): in function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-isattyr.o): in function `_isatty_r':
isattyr.c:(.text._isatty_r+0xa): warning: _isatty is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-signalr.o): in function `_kill_r':
signalr.c:(.text._kill_r+0xc): warning: _kill is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-lseekr.o): in function `_lseek_r':
lseekr.c:(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-readr.o): in function `_read_r':
readr.c:(.text._read_r+0x10): warning: _read is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-writer.o): in function `_write_r':
writer.c:(.text._write_r+0x10): warning: _write is not implemented and will always fail
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: address 0x54 of output.elf section `.ivt' is not within region `ICCM1'
/content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/bin/ld: address 0x54 of output.elf section `.ivt' is not within region `ICCM1'
./../tensorflow/lite/micro/kernels/arc_mli/conv.o: in function `_ZN6tflite3ops5microL22ConvertToMliTensorDataIaEEvPK12TfLiteTensorP11_mli_tensor':
conv.cc:(.text._ZN6tflite3ops5microL22ConvertToMliTensorDataIaEEvPK12TfLiteTensorP11_mli_tensor+0x90): relocation truncated to fit: R_ARC_SDA_LDST2 against symbol `_impure_ptr' defined in .sdata._impure_ptr section in /content/arc_gnu/bin/../lib/gcc/arc-multilib-elf/10.2.0/../../../../arc-multilib-elf/lib/em4_fpus/libc.a(lib_a-impure.o)
collect2: error: ld returned 1 exit status
Makefile:326: recipe for target 'output.elf' failed
make: *** [output.elf] Error 1
abrodkin commented 3 years ago

@gitE0Z9 could you please post results of compilation with -mno-sdata?

gitE0Z9 commented 3 years ago

@abrodkin Not sure if this is what you need. I got memory.map but output.elf failed.

I got some progress by deleting existed .o file in tensorflow, and now I faced a new file wf_exp.c. This is compiled with pre-build release. Would it be a problem in libm.a file or newlib link? Is it overflowed?

/content/arc/bin/arc-elf32-g++ -fno-rtti -fpermissive -fno-exceptions -fno-threadsafe-statics -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -O3 -Wsign-compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -Wswitch -Wvla -Wall -Wextra -Wstrict-aliasing -Wno-unused-parameter -DREDUCE_CODESIZE -mxy -include himax_we1_sdk/core_config.h -mcpu=em4_fpus -mno-sdata -mlittle-endian -mcode-density -mdiv-rem -mswap -mnorm -mmpy-option=6 -mbarrel-shifter -mfpu=fpus_all -I. -I./himax_we1_sdk -I./third_party/gemmlowp -I./third_party/flatbuffers/include -I./third_party/ruy -I./third_party/arc_mli_package/include -I./third_party/arc_mli_package/include/api -I./tensorflow/lite/micro/tools/make/downloads/kissfft -DSCRATCH_MEM_Z_SIZE=0x10000  -o person_detection_int8.elf tensorflow/lite/micro/simple_memory_allocator.o tensorflow/lite/micro/mock_micro_graph.o tensorflow/lite/micro/micro_allocator.o tensorflow/lite/micro/all_ops_resolver.o tensorflow/lite/micro/memory_helpers.o tensorflow/lite/micro/micro_interpreter.o tensorflow/lite/micro/micro_error_reporter.o tensorflow/lite/micro/micro_time.o tensorflow/lite/micro/recording_simple_memory_allocator.o tensorflow/lite/micro/micro_string.o tensorflow/lite/micro/micro_profiler.o tensorflow/lite/micro/micro_utils.o tensorflow/lite/micro/himax_we1_evb/debug_log.o tensorflow/lite/micro/test_helpers.o tensorflow/lite/micro/micro_graph.o tensorflow/lite/micro/system_setup.o tensorflow/lite/micro/recording_micro_allocator.o tensorflow/lite/micro/memory_planner/linear_memory_planner.o tensorflow/lite/micro/memory_planner/greedy_memory_planner.o tensorflow/lite/c/common.o tensorflow/lite/core/api/error_reporter.o tensorflow/lite/core/api/flatbuffer_conversions.o tensorflow/lite/core/api/op_resolver.o tensorflow/lite/core/api/tensor_utils.o tensorflow/lite/kernels/internal/quantization_util.o tensorflow/lite/kernels/kernel_util.o tensorflow/lite/schema/schema_utils.o tensorflow/lite/micro/kernels/activations.o tensorflow/lite/micro/kernels/add.o tensorflow/lite/micro/kernels/add_n.o tensorflow/lite/micro/kernels/arg_min_max.o tensorflow/lite/micro/kernels/batch_to_space_nd.o tensorflow/lite/micro/kernels/cast.o tensorflow/lite/micro/kernels/ceil.o tensorflow/lite/micro/kernels/circular_buffer.o tensorflow/lite/micro/kernels/comparisons.o tensorflow/lite/micro/kernels/concatenation.o tensorflow/lite/micro/kernels/arc_mli/conv.o tensorflow/lite/micro/kernels/conv_common.o tensorflow/lite/micro/kernels/cumsum.o tensorflow/lite/micro/kernels/depth_to_space.o tensorflow/lite/micro/kernels/arc_mli/depthwise_conv.o tensorflow/lite/micro/kernels/depthwise_conv_common.o tensorflow/lite/micro/kernels/dequantize.o tensorflow/lite/micro/kernels/detection_postprocess.o tensorflow/lite/micro/kernels/elementwise.o tensorflow/lite/micro/kernels/elu.o tensorflow/lite/micro/kernels/ethosu.o tensorflow/lite/micro/kernels/exp.o tensorflow/lite/micro/kernels/expand_dims.o tensorflow/lite/micro/kernels/fill.o tensorflow/lite/micro/kernels/floor.o tensorflow/lite/micro/kernels/floor_div.o tensorflow/lite/micro/kernels/floor_mod.o tensorflow/lite/micro/kernels/arc_mli/fully_connected.o tensorflow/lite/micro/kernels/fully_connected_common.o tensorflow/lite/micro/kernels/gather.o tensorflow/lite/micro/kernels/gather_nd.o tensorflow/lite/micro/kernels/hard_swish.o tensorflow/lite/micro/kernels/if.o tensorflow/lite/micro/kernels/kernel_runner.o tensorflow/lite/micro/kernels/kernel_util.o tensorflow/lite/micro/kernels/l2norm.o tensorflow/lite/micro/kernels/l2_pool_2d.o tensorflow/lite/micro/kernels/leaky_relu.o tensorflow/lite/micro/kernels/logical.o tensorflow/lite/micro/kernels/logistic.o tensorflow/lite/micro/kernels/log_softmax.o tensorflow/lite/micro/kernels/maximum_minimum.o tensorflow/lite/micro/kernels/mul.o tensorflow/lite/micro/kernels/neg.o tensorflow/lite/micro/kernels/pack.o tensorflow/lite/micro/kernels/pad.o tensorflow/lite/micro/kernels/arc_mli/pooling.o tensorflow/lite/micro/kernels/prelu.o tensorflow/lite/micro/kernels/quantize.o tensorflow/lite/micro/kernels/quantize_common.o tensorflow/lite/micro/kernels/reduce.o tensorflow/lite/micro/kernels/reshape.o tensorflow/lite/micro/kernels/resize_bilinear.o tensorflow/lite/micro/kernels/resize_nearest_neighbor.o tensorflow/lite/micro/kernels/round.o tensorflow/lite/micro/kernels/shape.o tensorflow/lite/micro/kernels/softmax.o tensorflow/lite/micro/kernels/softmax_common.o tensorflow/lite/micro/kernels/space_to_batch_nd.o tensorflow/lite/micro/kernels/split.o tensorflow/lite/micro/kernels/split_v.o tensorflow/lite/micro/kernels/squeeze.o tensorflow/lite/micro/kernels/strided_slice.o tensorflow/lite/micro/kernels/sub.o tensorflow/lite/micro/kernels/svdf.o tensorflow/lite/micro/kernels/svdf_common.o tensorflow/lite/micro/kernels/tanh.o tensorflow/lite/micro/kernels/transpose.o tensorflow/lite/micro/kernels/transpose_conv.o tensorflow/lite/micro/kernels/unpack.o tensorflow/lite/micro/kernels/zeros_like.o tensorflow/lite/micro/kernels/arc_mli/scratch_buffers.o tensorflow/lite/micro/kernels/arc_mli/scratch_buf_mgr.o tensorflow/lite/micro/kernels/arc_mli/mli_slicers.o tensorflow/lite/micro/examples/person_detection/himax_we1_evb/detection_responder.o tensorflow/lite/micro/examples/person_detection/himax_we1_evb/image_provider.o tensorflow/lite/micro/examples/person_detection/main.o tensorflow/lite/micro/examples/person_detection/main_functions.o tensorflow/lite/micro/examples/person_detection/model_settings.o tensorflow/lite/micro/tools/make/downloads/person_model_int8/person_detect_model_data.o -Wl,-lmli -Wl,-lmwdepend -Wl,-marcv2elfx -Wl,-Map=memory.map -Wl,--strip-debug -Wl,--stats,--gc-sections -Wl,--cref -Lthird_party/arc_mli_package/bin/himax_arcem9d_r16/release -Lthird_party/mw_gnu_dependencies/gnu_depend_lib -L . -Wl,--start-group himax_we1_sdk/libcpuarc.a himax_we1_sdk/libbss.a himax_we1_sdk/libboard_socket.a himax_we1_sdk/libboard_open_socket.a himax_we1_sdk/liblibcommon.a himax_we1_sdk/liblibaudio.a himax_we1_sdk/liblibsecurity.a himax_we1_sdk/liblibsensordp.a himax_we1_sdk/liblibtflm.a -Wl,--end-group 
/content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/bin/ld: address 0x54 of person_detection_int8.elf section `.ivt' is not within region `ICCM1'
/content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/bin/ld: address 0x54 of person_detection_int8.elf section `.ivt' is not within region `ICCM1'
/content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/lib/em4_fpus/libm.a(lib_a-wf_exp.o): in function `expf':
/content/newlib/newlib/libm/math/wf_exp.c:44:(.text+0xc): relocation truncated to fit: R_ARC_SDA_LDST2 against symbol `__fdlib_version' defined in .sdata section in /content/arc/lib/gcc/arc-elf32/10.2.0/../../../../arc-elf32/lib/em4_fpus/libm.a(lib_a-s_lib_ver.o)
collect2: error: ld returned 1 exit status
Makefile:469: recipe for target 'person_detection_int8.elf' failed
make: *** [person_detection_int8.elf] Error 1
cp: cannot stat 'person_detection_int8.elf': No such file or directory
Makefile:522: recipe for target 'flash' failed
make: *** [flash] Error 1
claziss commented 3 years ago

Here are some quick observations:

  1. probably mno-sdata will not help for time being as the relocation is in a prebuild library (i.e., libm.a)
  2. The error looks like you cannot fit the interrupt vector table (ivt section) to ICCM1 memory
  3. Most probably your problem resides in the linker script.
gitE0Z9 commented 3 years ago

@abrodkin @claziss Thanks for you guys generous help, I had found the solution finally. It is because the source project (https://github.com/HimaxWiseEyePlus/himax_tflm) was compiled with 2020-09 release, thereafter the compilation with 2021-03 release won't work.

claziss commented 3 years ago

@gitE0Z9 Thanks for leting us know. It seems the 2021.03 release is broken and needs to identified why. @abrodkin isn't this release when we jump to corss-ng? Can you investigate more in depth what is going on? Thanks.

abrodkin commented 3 years ago

@gitE0Z9 is it possible to reproduce your problem with sources available from https://github.com/HimaxWiseEyePlus/himax_tflm? Could you please provide complete instructions on how to get it reproduce so that we may get to the root cause of that issue?