Problem building "Hello Axon" Edge AI app using current documentation

Was excited to get an (apparently) early copy of the nRF54LM20B-DK so that I could explore all the Edge AI capabilities of the system (using both Neuton and Axon models). In the Axon case , I searched for any applicable code samples, videos, courseware, etc.  Only thing I found that appeared to be (currently) complete enough to be useful was the standard online software documentation (as opposed to anything in the Edge AI Lab web pages, for example).

 In particular, the "Hello Axon" sample looked like a good place to start, especially since it uses synthetic data to train the model, rather than requiring some sensor (e.g., motion sensor as in the Thingy 53 Edge AI sample code).  Proceeded through the documented steps up until I hit the Building and Running section.  But the abbreviated instructions there left me in a lurch.  Any attempt to build failed with Include errors on finding logging/log.h.  Normally I would expect to just examine the folder structure, find the appropriate file and patch the Include statement, but since we have a more complicated environment, I suspect the root cause of the error lies deeper.


Any suggestions on how to proceed? (I certainly would appreciate more detailed instructions in the Building and Running section -- and left a web page comment to that effect.)

Notes:

  • The "piggyback" procedure to create an integrated "Edge AI" version of the nRF SDK seems clumsy (acting as if you are building an app in order to merge in the Edge AI library).  I suspect Nordic will smooth this out in the future.  Is there currently any way to validate the integrated library other than building samples with it?
  • Other documentation suggests that the Hello Axon build requires the 3.3.0-preview2 branch of the SDK.   I presume the west instructions invoked in integrating the Edge AI library took care of this (and did notice the 3.3.0-preview2 tag appearing in the console output)
  • On a related question, other Edge AI sample code for motion sensing on this and related nRF5xxx devices require a peripheral MEMS board (9-axis? Probably a Bosch sensor.) But there is no documentation on this board, either to build or buy one.  I suspect a Sparkfun or Adafruit board might suffice.  Any hints on this subject?


As ever, thanks for any comments and suggestions.  Looking forward to fully exercising the nRF54LM20B,

Mike
[email protected] and [email protected]

PS: I expect that "Edge AI", "Axon", "nRF54LM20B", etc., would all be useful tags to add to this message.  Why can't I enter them?

Parents
  • OK, let me answer my own question (#1) -- and I should admit, with the help of AI. Here's a query I tried in a normal Google search:
    AI Query.pdf

    And here's the response I received (two pieces to avoid some unintentional "redacting" in creating the PDF:

    AI Response1.pdf

    what are the steps to build and compile an nrf Connect app in VS code once the app is copied from an example - Google Search.pdf

    Here's the critical step: "3.1 In the APPLICATIONS view, click on Add Build Configuration."

    Obvious, huh?  Certainly to old hands with VS Code and the nRF Connect extension.  But not to me. In the normal case of creating an app from sample code, this step is automatically done in code generation by the extension, complete with a warning to set the configuration if the user attempts to compile the app before doing so.  

    Once I added a configuration (using the only possible hardware, the nRF54LM20B-DK and no other inputs), the app compiled correctly as shown below, yielding a zephyr.elf file, ready for flashing to the dev board.

     *  Executing task: nRF Connect: Generate config nrf54lm20dk/nrf54lm20b/cpuapp for edge-ai/samples/axon/hello_axon
    
    Building hello_axon
    west build --build-dir /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon --pristine --board nrf54lm20dk/nrf54lm20b/cpuapp --cmake-only -- -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: /Users/mike/Library/Caches/zephyr
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf54lm20dk, qualifiers: nrf54lm20b/cpuapp
    Parsing /Users/mike/workspaceEdgeAI/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/empty.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/empty.conf'
    Configuration saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/zephyr/.config'
    Kconfig header saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/autoconf.h'
    --
       ********************************
       * Running CMake for hello_axon *
       ********************************
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon
    -- CMake version: 4.2.1
    -- Found Python3: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: /Users/mike/Library/Caches/zephyr
    -- Zephyr version: 4.3.99 (/Users/mike/workspaceEdgeAI/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf54lm20dk, qualifiers: nrf54lm20b/cpuapp
    -- Found host-tools: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/0c0f19d91c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /Users/mike/workspaceEdgeAI/zephyr/boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20b_cpuapp.dts
    -- Found devicetree overlay: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/boards/nrf54lm20dk_nrf54lm20b_cpuapp.overlay
    unit address and first address in 'reg' (0x5004c000) don't match for /soc/peripheral@50000000/vpr@4c000/mailbox@1
    -- Generated zephyr.dts: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/zephyr.dts
    -- Generated pickled edt: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/Kconfig
    Loaded configuration '/Users/mike/workspaceEdgeAI/zephyr/boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20b_cpuapp_defconfig'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/prj.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/misc/generated/extra_kconfig_options.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/.config.sysbuild'
    Configuration saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/.config'
    Kconfig header saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- CONFIG_NRF_AXON_INTERLAYER_BUFFER_SIZE 16
    -- CONFIG_NRF_AXON_PSUM_BUFFER_SIZE 0
    -- linking imported library /Users/mike/workspaceEdgeAI/edge-ai/lib/axon/bin/arm/libnrf-axon-driver-internal.a
    -- Using ccache: /opt/nordic/ncs/toolchains/0c0f19d91c/bin/ccache
    -- Found gen_kobject_list: /Users/mike/workspaceEdgeAI/zephyr/scripts/build/gen_kobject_list.py
    CMake Warning at /Users/mike/workspaceEdgeAI/zephyr/CMakeLists.txt:2350 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done (26.3s)
    -- Generating done (0.9s)
    -- Build files have been written to: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon
    -- Configuring done (38.6s)
    -- Generating done (0.1s)
    -- Build files have been written to: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build
     *  Terminal will be reused by tasks, press any key to close it.
    
     *  Executing task: nRF Connect: Build [incremental]: hello_axon/build
    
    Building hello_axon
    west build --build-dir /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon
    
    [6/280] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/Users/mike/workspaceEdgeAI/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [280/280] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       65268 B      1940 KB      3.29%
                 RAM:        8504 B       511 KB      1.63%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/zephyr.elf for board: nrf54lm20dk/nrf54lm20b/cpuapp
    [8/8] Completed 'hello_axon'
     *  Terminal will be reused by tasks, press any key to close it.
    

    So we can close my question #1, leaving #2 and #3 open yet.

    I have carefully documented this interaction here, hoping it will be users to others trying to use the Edge AI library.  I also suggest the following corrections:

    Suggested changes in Edge AI and nRF Connect:

    1. [Documentation] Following my experience as a curmudgeonly leader of software development teams, read the associated documentation for MIS-understanding, and correct appropriately.  If there's any way to read it wrong, someone will do it.  For the case in question, a bit more detail in the Building and Running section, e.g., the steps outlined in the AI response I got would be very useful.
    2. [nRF Extension] Is there any reason why the extension should not automatically add the blank configuration as part of generating the code?  Might require a dialog with the user to select which of the Edge AI is the desired target app.

    Thanks for your attention to these issues

    Mike

Reply
  • OK, let me answer my own question (#1) -- and I should admit, with the help of AI. Here's a query I tried in a normal Google search:
    AI Query.pdf

    And here's the response I received (two pieces to avoid some unintentional "redacting" in creating the PDF:

    AI Response1.pdf

    what are the steps to build and compile an nrf Connect app in VS code once the app is copied from an example - Google Search.pdf

    Here's the critical step: "3.1 In the APPLICATIONS view, click on Add Build Configuration."

    Obvious, huh?  Certainly to old hands with VS Code and the nRF Connect extension.  But not to me. In the normal case of creating an app from sample code, this step is automatically done in code generation by the extension, complete with a warning to set the configuration if the user attempts to compile the app before doing so.  

    Once I added a configuration (using the only possible hardware, the nRF54LM20B-DK and no other inputs), the app compiled correctly as shown below, yielding a zephyr.elf file, ready for flashing to the dev board.

     *  Executing task: nRF Connect: Generate config nrf54lm20dk/nrf54lm20b/cpuapp for edge-ai/samples/axon/hello_axon
    
    Building hello_axon
    west build --build-dir /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon --pristine --board nrf54lm20dk/nrf54lm20b/cpuapp --cmake-only -- -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: /Users/mike/Library/Caches/zephyr
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf54lm20dk, qualifiers: nrf54lm20b/cpuapp
    Parsing /Users/mike/workspaceEdgeAI/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/empty.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/empty.conf'
    Configuration saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/zephyr/.config'
    Kconfig header saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/_sysbuild/autoconf.h'
    --
       ********************************
       * Running CMake for hello_axon *
       ********************************
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon
    -- CMake version: 4.2.1
    -- Found Python3: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: /Users/mike/Library/Caches/zephyr
    -- Zephyr version: 4.3.99 (/Users/mike/workspaceEdgeAI/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf54lm20dk, qualifiers: nrf54lm20b/cpuapp
    -- Found host-tools: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/0c0f19d91c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /Users/mike/workspaceEdgeAI/zephyr/boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20b_cpuapp.dts
    -- Found devicetree overlay: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/boards/nrf54lm20dk_nrf54lm20b_cpuapp.overlay
    unit address and first address in 'reg' (0x5004c000) don't match for /soc/peripheral@50000000/vpr@4c000/mailbox@1
    -- Generated zephyr.dts: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/zephyr.dts
    -- Generated pickled edt: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/Kconfig
    Loaded configuration '/Users/mike/workspaceEdgeAI/zephyr/boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20b_cpuapp_defconfig'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/prj.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/misc/generated/extra_kconfig_options.conf'
    Merged configuration '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/.config.sysbuild'
    Configuration saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/.config'
    Kconfig header saved to '/Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/nordic/ncs/toolchains/0c0f19d91c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- CONFIG_NRF_AXON_INTERLAYER_BUFFER_SIZE 16
    -- CONFIG_NRF_AXON_PSUM_BUFFER_SIZE 0
    -- linking imported library /Users/mike/workspaceEdgeAI/edge-ai/lib/axon/bin/arm/libnrf-axon-driver-internal.a
    -- Using ccache: /opt/nordic/ncs/toolchains/0c0f19d91c/bin/ccache
    -- Found gen_kobject_list: /Users/mike/workspaceEdgeAI/zephyr/scripts/build/gen_kobject_list.py
    CMake Warning at /Users/mike/workspaceEdgeAI/zephyr/CMakeLists.txt:2350 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done (26.3s)
    -- Generating done (0.9s)
    -- Build files have been written to: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon
    -- Configuring done (38.6s)
    -- Generating done (0.1s)
    -- Build files have been written to: /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build
     *  Terminal will be reused by tasks, press any key to close it.
    
     *  Executing task: nRF Connect: Build [incremental]: hello_axon/build
    
    Building hello_axon
    west build --build-dir /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon
    
    [6/280] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/Users/mike/workspaceEdgeAI/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [280/280] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       65268 B      1940 KB      3.29%
                 RAM:        8504 B       511 KB      1.63%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /Users/mike/workspaceEdgeAI/edge-ai/samples/axon/hello_axon/build/hello_axon/zephyr/zephyr.elf for board: nrf54lm20dk/nrf54lm20b/cpuapp
    [8/8] Completed 'hello_axon'
     *  Terminal will be reused by tasks, press any key to close it.
    

    So we can close my question #1, leaving #2 and #3 open yet.

    I have carefully documented this interaction here, hoping it will be users to others trying to use the Edge AI library.  I also suggest the following corrections:

    Suggested changes in Edge AI and nRF Connect:

    1. [Documentation] Following my experience as a curmudgeonly leader of software development teams, read the associated documentation for MIS-understanding, and correct appropriately.  If there's any way to read it wrong, someone will do it.  For the case in question, a bit more detail in the Building and Running section, e.g., the steps outlined in the AI response I got would be very useful.
    2. [nRF Extension] Is there any reason why the extension should not automatically add the blank configuration as part of generating the code?  Might require a dialog with the user to select which of the Edge AI is the desired target app.

    Thanks for your attention to these issues

    Mike

Children
No Data
Related