5 Replies Latest reply: May 14, 2014 10:18 AM by joealderson RSS

Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?

nabaneetakar Null

I am using ARM DS5 Ultimate Edition (Version 5.18.0)

 

Target aarch64-arm-none-eabi is being used for compilation.
I am trying to run the .axf on ARMAEMv8-A_MP_0.
While running the .axf I am getting this error:-
ERROR(CMD426): Cannot find symbol to start or entrypoint, the file or load commands may be used to set the entrypoint.

How could I solve this error?

  • Re: Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?
    joealderson Employee

    Hi,

     

    If you are using DS-5 Ultimate Edition as a fully licensed version (rather than the 30-day trial), you may be entitled to official ARM support. If that's the case, you can contact support here: Support - ARM

     

    If not - please could you attach a screenshot of your debug configuration panel, or write down the settings that you have in each tab?

     

    Thanks,

    Joe

    • Re: Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?
      nabaneetakar Null

      Hi Joe,


      After setting the image entry point and image layout, I could  run the code for assembler target -  aarch64-arm-none-eabi.

      The image entry point and image layout has been set to-
      Image entry point - 0x80000000
      Image Layout -      0x80000000


      Now I am trying to build the code for AARCH32, I have set the target to : armv8a-arm-none-eabi.

      I am again trying to run the axf on the same target ARMAEMv8-A_MP_0.

      The build is succesful but while running I am again facing this issue of missing entry point.
      Below I have mentioned the issue reported by the debugger-

      WARNING(CMD399-COR168):
      ! Failed to start the target
      ! No function named "main" could be found
      WARNING(CMD407): Trying the entry point instead
      ERROR(CMD426): Cannot find symbol to start or entrypoint, the file or load commands may be used to set the entrypoint


      Should we manually set the entry point? And if so to what value should it be set?
      By default the entry point is set to 0x00008000
      Or is there any other changes that needs to be done?

      • Re: Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?
        joealderson Employee

        Hi,

         

        My colleague Stephen Theobald has managed to reproduce some of what you're seeing.

         

        Are you seeing the following warning from armlink?

         

        Warning: L6305W: Image does not have an entry point. (Not specified or not set due to multiple choices.)

         

        If so, check that there's a --entry=address on the armlink line.

         

        You are correct that you have to manually set the entry point.

         

        Hope this helps,

        Joe

        • Re: Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?
          nabaneetakar Null

          Hi,

          I did not see the warning mentioned by you (Warning:L6305W:) and also checked for the entry address on the armlink line.
          It is correctly set to  --entry = 0x8000.

          I am mentioning below all the settings I have used for building the project. This will probably help in reproducing the issue.
          I am basically trying to run a 32 bit solution on arm v8 architecture. (using the AARCH32 state)

           

          Arm C Compiler 6 -> Code Generation -> target -> armv8a-arm-none-eabi
          Arm Assembler 6 -> Code Generation -> target -> armv8a-arm-none-eabi
          Arm Linker 6 -> General -> Image Entry Point -> 0x8000
          Arm Linker 6 -> Image Layout -> RO base address  -> 0x8000


          The build is successful and the axf is generated. I am facing issues while debugging/running the axf
          I am trying to run the axf on  VE_AEMv8x4 as mentioned below:
          Run -> Debug Configuration -> VE_AEMv8x4 -> Bare Metal Debug -> Debug ARMAEMv8-A_MP_0.

          The error thrown on the "commands" window :

           

          Connected to stopped target ARM FVP - VE_AEMv8x4
          Execution stopped at: EL3:0x0000000000000000
          EL3:0x0000000000000000   DCI      0xe7ff0010 ; ? Undefined
          loadfile "D:\test_v8_1\sample1\Debug\sample1.axf"
          ERROR(CMD16-IMG72):
          ! Failed to load "sample1.axf"
          ! Cannot load "D:\test_v8_1\sample1\Debug\sample1.axf" which contains 32-bit addresses using the 64-bit address space "EL3:"
          cd "D:\test_v8_1"
          Working directory "D:\test_v8_1"
          set debug-from *$ENTRYPOINT
          start
          WARNING(CMD399-CMD38-CMD722):
          ! Failed to start the target
          ! The string "$ENTRYPOINT" cannot be interpreted as a positive int
          ! Entry point not set
          WARNING(CMD407): Trying the entry point instead
          ERROR(CMD426): Cannot find symbol to start or entrypoint, the file or load commands may be used to set the entrypoint
          wait

           

          • Re: Facing issues while using debugger ARMAEMv8-A_MP_0 on DS5. How to solve it?
            joealderson Employee

            Hi,

             

            This error message means that you're trying to load an AArch32 image into a 64-bit address space (EL3:0x0000000000000000):

             

            ERROR(CMD16-IMG72):
            ! Failed to load "sample1.axf"
            ! Cannot load "D:\test_v8_1\sample1\Debug\sample1.axf" which contains 32-bit addresses using the 64-bit address space "EL3:"

             

            Since this is not allowed, you have to either run some AArch64 startup code to switch the processor into AArch32 space or specify using an address modifier that the image needs to be loaded into a 32-bit space (this address modifier might be S: N: or H: for secure, non-secure or hypervisor). An example of this would be: loadfile sample1.axf N:0

             

            Also, in this case, the default link address that you used: 0x8000 maps to the NOR Flash on the VE_AEMv8x4 model. To run it in the model RAM, you'll need to use an address like 0x80000000.

             

            For reference, the memory map is given here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0423q/CHDJFJHF.html

             

            I'd encourage you to raise a support case if these suggestions don't help you solve your problem, as they will be able to walk you through any other issues in much greater detail.

             

            Thanks,

            Joe