Building error Edge Impulse firmware for Himax WE-I Plus

Hello. I’m in trouble to build edge impulse firmware for himax we-1.


I did the same work in github.

I can’t build file.
I use virtual machine, ubuntu in window.
The error log is below.

msb@msb-VirtualBox:/usr/my/firmware-himax-we-i-plus-master/build$ make -j
...
    [ 99%] Building CXX object CMakeFiles/firmware-himax-we-i-plus-master.elf.dir/edge-impulse-sdk/dsp/kissfft/kiss_fftr.cpp.o
    /usr/my/firmware-himax-we-i-plus-master/QCBOR/src/qcbor_decode.c:687:20: error: 
          implicit conversion from 'long long' to 'double' changes value from
          9223372036854775807 to 9223372036854775808
          [-Werror,-Wimplicit-int-float-conversion]
                if(d > INT64_MAX) {
                     ~ ^~~~~~~~~
    /usr/my/linux/ARC/MetaWare/arc/inc/stdint.h:139:21: note: expanded from macro
          'INT64_MAX'
            #define INT64_MAX (9223372036854775807LL)
                               ^~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    make[2]: *** [CMakeFiles/firmware-himax-we-i-plus-master.elf.dir/build.make:115: CMakeFiles/firmware-himax-we-i-plus-master.elf.dir/QCBOR/src/qcbor_decode.c.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/firmware-himax-we-i-plus-master.elf.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2

Hi @SunBeenMoon Interesting that this errors, as I’ve not seen this throw with any compiler that we use. What’s your ccac version? This is the one we use:

ccac root@bc9ded2488cb:/app# ccac --version
DesignWare ARC C/C++ Compiler Q-2020.03
(c) Copyright 2013-2020 Synopsys Corporation
    Driver Version:        2.03
    Compiler Version:      9.0.1
    Revision:               (build 003) (LLVM 9.0.1)
    Based on LLVM version: 9.0.1

Could you try the following and see if it solves your issue?

  1. Open QCBOR/src/qcbor_decode.c.
  2. Change line 687 to read:
            if(d > (double)INT64_MAX) {

Hi @janjongboom. Thank you for your reply.

ccac version is below.

msb@msb-VirtualBox:/usr/my/firmware-himax-we-i-plus-master/build$ ccac --version
DesignWare ARC C/C++ Compiler R-2020.09
(c) Copyright 2013-2020 Synopsys Corporation
    Driver Version:        2.03
    Compiler Version:      10.0.1
    Revision:               (build 003) (LLVM 10.0.1)
    Based on LLVM version: 10.0.1

Wow, I fixed the code, then build 100%

Thank you.

OK, we’ll push a patch on our side too!

Getting same issue but line num:687 is not having the code which you mentioned.
image

Hi @prashant.s,

The Edge Impulse SDK and Himax firmware his likely changed since February 2021, can you please start a new forum post for this?

Thank you!