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

how to run example in real board (iotdk or emsk)

swingxu opened this issue · 6 comments

Hi,
I successfully built and run the project on nSIM, but I can't build the project on iotdk(em9d).
I try to build the project like the example "Blinky" offered in official guide, but i failed.
Can you provide some documents or example? How to change the Makefile to make it work?

Hi,
For the analysis of this problem we need some extra information.
Could you share with us:

the complete log file of the failure
which tool versions did you use
did you use a pre-compiled libmli? if so, which version?
If you did build the lib yourself, could you provide the version info of the tool that you used for this?
What is the command line that you used to build the lib
What is the command line that you used to build the example
Thanks!

Closing due to lack of response from external user

NO ,it is worked on nsim ,just like your documents write.
TOOCHAIN=mwdt
command line:
buildlib em9d_rt_libs -bd ./ -tcf="../../hw/em9d.tcf"
gmake clean
gmake TCF_FILE=../../hw/em9d.tcf RT_LIB=./em9d_rt_libs

i did not use libmli ,I just did the kws example like README.md say.
Maybe it is the question of makefile,which set the enviroment into the nsim.
sorry, could you please be more specific about how to run kws example on iotdk board rather in nsim?
do I need to modify the makefile?

Hi @L-leopold ,
We are preparing some instructions for you on how to run the KWS example on IoTDK.
We'll post these here once done (we expect to have something ready by middle of next week)
Thank you
Jamie

Hi @L-leopold
Here are some instructions on getting the KWS example from the MLI repo going. We used MLI 1.1 RC3 for our experiments.

  1. Go to the root of MLI and checkout Release 1.1 RC3 to avoid any fluctuations on the current state of library.
    git checkout Release_1.1_RC3

  2. Clean and build the library for iotdk:
    cd to MLI root directory
    gmake libclean
    gmake lib TCF_FILE=../../hw/iotdk_arcem9d.tcf -j4

  3. Build RT libraries for iotdk
    buildlib iotdk_arcem9d -tcf=hw/iotdk_arcem9d.tcf

  4. Prepare linker command file (LCF) for the application.
    Use this one as a basis (you can save it to the hw directory in the MLI tree, next to the iotdk_arcem9d.tcf).
    The only change needed to run this app is to move DATA sections from ICCM to DCCM.
    Find

    GROUP BLOCK(4): {
        .text? : { *('.text$crt*') }
        * (TEXT): {}
        * (LIT): {}
        * (DATA): {}
    } > ICCM0

and cut the * (DATA): {} line from there.
Paste it into the DCCM section, so it looks like the following:

    GROUP BLOCK(4): {
       .Zdata? : {}
        * (DATA): {}
       .stack ALIGN(4) SIZE(DEFINED _STACKSIZE?_STACKSIZE:32K): {}
    } > DCCM
  1. Go to the KWS example folder and build it for IoTDK using the Runtime library you built in step 3
    gmake TCF_FILE=..\..\hw\iotdk_arcem9d.tcf RT_LIB=iotdk_arcem9d LDFLAGS=..\..\hw\iotdk_arcem9d.lcf

  2. Connect the board to your PC via the USB connector next to the power connector
    Install Digilent drivers in your environment (see here for instructions)
    To connect the board see steps 1 and 2 here.

  3. Run application on the board using Metaware debugger using the following command:
    mdb -run -digilent ./bin/example_kws_stream.elf ./test.wav

You should expect to see application output like this:

0.240   1.215   "on"(99.994%)
1.440   2.415   "stop"(99.997%)
3.600   4.575   "_unknown_"(99.960%)

Thank you , anyway .But maybe I have not enough time to finish my production in Chuang xin game. Lollololol..... ,Thank you anyway ,I will finish my work even if the game is over .Thank you.