OSD32MP157C-512M-BAA JTAG access and debug

Forums Devices OSD32MP15x OSD32MP157C-512M-BAA JTAG access and debug

Viewing 9 reply threads
  • Author
    Posts
    • #11991
      Gil Hershmangil_he
      Participant

        hello,

        We would like to have access to the SIP and debug capabilities.
        We would like to be able to do the following:
        1. Debug of bare-metal application triggered by UBOOT.
        Debug of Linux system bring-up.
        2. Program the SIP PMIC NVM.
        3. Program the eMMC Flash with our SW (Linux kernel, drivers, applications, etc.)

        I’ve gone through https://octavosystems.com/faqs/what-jtag-emulators-debuggers-can-be-used-with-the-osd335x-family-of-devices/ .

        – Is the basic JTAG interface (TMS/TCK/TDI/TDO) sufficient to handle these? (bandwidth wise and functionality wise).
        – Are the above capabilities feasible to have? What debug tool do we need to handle it?
        – What debug capabilities do serial-wire provide (SWD), that can’t be done via JTAG?
        – What debug capabilities do TRACED[15:0]/TRACECLK pins provide, that can’t be done via JTAG?
        – We use Digilent JTAG-to-USB JTAG-HS3 to access our Xilinx-based products (reference manual attached).
        Can it be used to access the SIP and provide the capabilities described above?
        – Octavo mentions the XDS110/200/560v2.
        Which emulator/JTAG adapter do we need to support the capabilities described above?

        thanks
        Gil

        Attachments:
      • #11999
        Neeraj Dantu
        Moderator

          Gil,

          First, I am assuming you want to run baremetal code on the M4 core and not on the A7 as baremetal code is not supported on the A7. There are a couple of ways of debugging code on M4. Please take a look at the following links:

          1. M4 getting started from ST: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4
          2. Cube IDE how to: https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE

          If you are looking to debug the kernel, this page: https://wiki.st.com/stm32mpu/wiki/Linux_tracing,_monitoring_and_debugging provides all the tools available to you. Additionally, https://wiki.st.com/stm32mpu/wiki/STM32MP1_Platform_trace_and_debug_environment_overview takes you through all the tools/debug ports available for debug on each software component.

          GDB can be used to debug the boot stages: https://wiki.st.com/stm32mpu/wiki/GDB.

          As for the JTAG hardware, we recommend STLINK. Please see https://octavosystems.com/forums/topic/getting-started-with-osd32mp1-brk-st-link-jtag-interface/ for a guide to use for the BRK/RED board.

          You can also use Engineering boot mode(https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_development_guidelines) to debug on M4 without any interference from the A7. You can see the boot switch configuration for Engineering boot mode on the 1st sheet of OSD32MP1-RED schematics: https://octavosystems.com/docs/osd32mp15x-red-schematic-pdf/.

          Hope this helps.

          Best,
          Neeraj

        • #12004
          Gil Hershmangil_he
          Participant

            Hello Neeraj,

            Part of board bring-up is programing the PMIC NVM.
            Please confirm:

            Option 1:
            Use the M4 core to run baremetal code.
            This will be done via JTAG (load/run the code on the M4 core).
            STLINK probe will be used.
            Boot mode 100.
            Will the A7 need to run Linux to support this environment?

            Option 2:
            Use ST’s Cube Programmer.
            This will be done via JTAG (access the STM32MP1 and PMIC).
            STLINK probe will be used.
            Boot mode 100.
            Will the A7 need to run Linux to support this environment?

            Are the two options valid to perform PMIC NVM programming?

            Are the libraries for the M4 core code provided by the STM32CubeIDE?
            Will we use C libraries or assembly code for the baremetal code?

            thank you
            Gil

            • This reply was modified 2 years, 10 months ago by Gil Hershmangil_he.
            • This reply was modified 2 years, 10 months ago by Gil Hershmangil_he.
          • #12012
            Neeraj Dantu
            Moderator

              Gil,

              You cannot use the M4 core without powering up the PMIC completely. In fact, see https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview, which states that the A7 needs to boot up first before M4 can execute code.

              If you don’t have provisions to change the hardware configurations for VDD, BYPASS_REG1V8 and VDDA_REG1V8, during programming and production, we recommend you make some modifications to your board design.

              Best,
              Neeraj

            • #12021
              Gil Hershmangil_he
              Participant

                hello Neeraj,

                I am combining here also this thread, https://octavosystems.com/forums/topic/changing-default-buck3-voltage/, so we communicate only through here.
                The issues are similar.

                We decided to use eMMC in DDR52 mode only, so PMIC programming is not required (vdd can remain 3.3V).
                However, I want to verify/confirm with you the following:
                1. On first power-up, when on-board storage is not programmed, accessing the SiP can ONLY be done from UART or USB.
                Boot mode pins should define UART/USB.
                2. STM32CubeProgrammer is running on the host pc and has the FSBL and SSBL which are loaded and run.
                After they run, we can use the STM32CubeProgrammer to program our image to the eMMC Flash.
                3. On first power-up, if we choose NoBoot mode, we can connect JTAG but nothing happens (ROM code goes into infinite loop).
                Can JTAG be used, in that mode, to program the eMMC Flash? (with the STM32CubeProgrammer).
                4. If we want to debug the platform with JTAG, should we have the NoBoot mode? Or should we normally have eMMC boot mode?

                thanks
                Gil

              • #12024
                Neeraj Dantu
                Moderator

                  Gil,

                  1. Yes. You can also add an SD card slot to boot with a Linux image
                  2. Yes
                  3. No, Engineering mode offers JTAG debugging for the M4 core using Cube IDE/Keil
                  4. Using JTAG, you will be able to debug on the M4 core specifically. The A7 core does not have JTAG debugging support via Cube IDE/Keil. You will need to use something like gdb

                  Best,
                  Neeraj

                • #12026
                  Gil Hershmangil_he
                  Participant

                    hello Neeraj,

                    How can we debug the Linux kernel?
                    Which hw tools can we use?

                    Can’t JTAG help debug the Linux kernel (running on the dual core A7) using the STLINK-V3SET?

                    thanks
                    Gil

                  • #12028
                    Neeraj Dantu
                    Moderator
                    • #12029
                      Gil Hershmangil_he
                      Participant

                        hello Neeraj,

                        I visited the sites you mentioned.
                        Something is not clear to me:
                        1. What is the usage of STLINK-V3SET? Can it be used to debug the Linux on A7 core (with GDB) or only the M4 core?
                        2. Using GDB to debug/trace the Linux system running on the A7 core: how do I connect the PC to the STM32MP15 SoC to allow the debug?

                        thanks
                        Gil

                      • #12030
                        Neeraj Dantu
                        Moderator

                          Gil,

                          Apologies for not being clear. Yes, STLink should be used to debug boot phases of A7, and can be used to debug full applications on M4. For debugging full Linux applications, ethernet connection is required. Please take a look at https://wiki.st.com/stm32mpu/wiki/GDB for all use cases. On the other hand, tracing applications do not require ethernet/STLink, just a UART terminal for messages.

                          Best,
                          Neeraj

                      Viewing 9 reply threads
                      • You must be logged in to reply to this topic.