This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62A-LP: Missing Serial Console UI and Python SOC Detection Error

Part Number: SK-AM62A-LP
Other Parts Discussed in Thread: TDA4VM

Tool/software:

A few months ago, we acquired the AM62A-LP board along with the Arducam V3Link Camera. I am new to working with any Texas Instruments boards, and after reviewing the available documentation, I still have several questions regarding the use of the board.

  1. In the Arducam V3Link Camera Solution Quick Start Guide, serial communication is used along with PuTTY to access the terminal of the AM62A-LP board. However, is there any built-in terminal interface accessible from the board's graphical environment itself, in case a computer is not available?

  2. While exploring the board, I noticed that it includes some Python example scripts. However, when attempting to run one of them, the following error appears: "Exception: Could not determine TI SOC model." I have searched for a solution but have not found one yet. Could you please provide guidance on how to enable Python functionality directly from the board?

Thank you in advance for your support.

Best regards.

  • Hello,

    I understand your questions and will do my best to resolve each of them. Which version of the SDK are you using?

    1)

    However, is there any built-in terminal interface accessible from the board's graphical environment itself, in case a computer is not available?

    No, the AM62A is generally designed for headless systems, so it is necessary to connect an external machine to access the terminal. Serial/UART or SSH are recommended.

    The AM62A has a 2D display subsystem (DSS) for visualizing output, but does not have a GPU. It is possible to use Wayland/Weston to bring up a terminal, but this is generally slow to interact with. 

    2)

    1. While exploring the board, I noticed that it includes some Python example scripts. However, when attempting to run one of them, the following error appears: "Exception: Could not determine TI SOC model." I have searched for a solution but have not found one yet. Could you please provide guidance on how to enable Python functionality directly from the board?

    That's strange, assuming you are using our SDK. Typically, there is a startup script (~/.profile, which calls /opt/edgeai-gst-apps/init_script.sh) that will define an 'SOC' environment variable to "am62a" by reading device-tree entries (part of /opt/edgeai-gst-apps/scripts/detect_soc.sh)

    Is that "SOC" variable defined in your terminal session? If so and you are still seeing this error, please let me know which python script is giving this issue

    For using CSI/V3Link cameras, some extra docs that may be helpful:

    BR,
    Reese

  • I installed the operating system from the file tisdk-edgeai-image-am62a-evm.wic provided by Arducam, which is based on Texas Instruments software.

    I searched for the init_script.sh in /opt/edgeai-gst-apps/, and the script does exist there along with detect_soc.sh, located in /opt/edgeai-gst-apps/scripts/.

    However, when running a Python example, I encountered the following error:

    Traceback (most recent call last):
      File "simple_out.py", line 23, in <module>
        import RPi.GPIO as GPIO
      File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 1, in <module>
        from TI.GPIO import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/__init__.py", line 1, in <module>
        from .gpio import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio.py", line 74, in <module>
        model, BOARD_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio_pin_data.py", line 155, in get_data
        raise Exception('Could not determine TI SOC model')
    Exception: Could not determine TI SOC model

    Then I tried running the following command:
    cd ~/.profile
    But received the error:
    -sh: cd: /home/root/.profile: Not a directory
  • Hi Wilberth,

    Okay, you acquired this software image from Arducam. I would generally suggest getting such images from our site directly. 

    Generally the .profile script will immediately source /opt/edgeai-gst-apps/init_script.sh. This sets an SOC variable that helps our other software determine the right software to reference relative to on-chip hardware. For AM62A, SOC=am62a is the right setting. 

    Since the .profile script is not there and did not run, there were likely some settings not applied into your environment variables. Manually sourcing the init_script.sh should resolve this. 

    Since this installation is also running python3.8, this indicates it is based on the 8.6 SDK. This is an older version of software, and if you are planning to compile and run deep learning models on the accelerator, you will need to ensure you get the corresponding TIDL-tools version from edgeai-tidl-tools

    BR,
    Reese

  • I ran the init_script.sh and setup_script.sh scripts, but I'm still getting the same error:
    traceback (most recent call last):
      File "simple_out.py", line 23, in <module>
        import RPi.GPIO as GPIO
      File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 1, in <module>
        from TI.GPIO import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/__init__.py", line 1, in <module>
        from .gpio import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio.py", line 74, in <module>
        model, BOARD_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio_pin_data.py", line 155, in get_data
        raise Exception('Could not determine TI SOC model')
    Exception: Could not determine TI SOC model

  • Hi Wilberth,

    Did you use 'source' to call those scripts? This is necessary so that the environment variables set/exported within that script become variable in your calling shell/terminal. Otherwise, the scripts can run correctly but will not set the expected environment variables like SOC

    You can check if that was defined:

    #source /opt/edgeai-gst-apps/init_script.sh
    #echo $SOC
    am62a
    #echo $EDGEAI_SDK_VERSION  
    10_01_00
    
    

  • I already used source /opt/edgeai-gst-apps/init_script.sh, but I’m still getting the same error:

    Traceback (most recent call last):
      File "/opt/ti-gpio-py/samples/simple_out.py", line 23, in <module>
        import RPi.GPIO as GPIO
      File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 1, in <module>
        from TI.GPIO import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/__init__.py", line 1, in <module>
        from .gpio import *
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio.py", line 74, in <module>
        model, BOARD_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
      File "/usr/lib/python3.8/site-packages/TI/GPIO/gpio_pin_data.py", line 155, in get_data
        raise Exception('Could not determine TI SOC model')
    Exception: Could not determine TI SOC model

    When I use echo $SOC, it does return AM62A, and echo $EDGEAI_SDK_VERSION shows version 08_06_00.

  • This is strange, and I wonder if it's to do with the SDK image Arducam has provided. No such issue is encountered in my fresh install of the 8.6 SDK.

    Actually, can you provide the init_script.sh that you are using? In the default 8.6 SDK from TI, I do not see any references to the /opt/ti-gpio-py (or -cpp) within that init_script.sh. I would recommend commenting out any lines in the init_script.sh that reference this GPIO package.

    The scripts that are throwing this error seem to be looking for pinout configurations that apply to a different board (J721E aka TDA4VM) -- I think this component was not properly ported for the SK-AM62A-LP board.

    BR,
    Reese