10 Replies Latest reply on Dec 27, 2013 9:44 AM by ogradyg

    Jlink doesn't seem to be downloading to ATSAM3UEK

    ogradyg

      I'm working with the v1.0.0 realease of the ATSAM3UEK bsp but I don't think code is being downloaded to the board during debug.

       

      I'm using a Jlink to debug the Kernel Demo as a Nucleus application. The project appears to build without issue.

      It seems that the Jlink connects to the board and Codebench will seem to step though the code - moves to next source line in csgnu_asm.S on each Step Over (Jlink activity light blinks on each step). However, in the Disassembly window, *all* instructions are listed as "movs r0,r0".

       

      If I click on gdb in the Debug tab, it lists the following messages:

       

      warning: while parsing target description (at line 38): Register "CR" has unknown type "CR"

      warning: Could not load XML target description; ignoring

      warning: while parsing target description (at line 38): Register "CR" has unknown type "CR"

      warning: Could not load XML target description; ignoring

       

      Is there some initial configuration that needs to be done to use the Jlink? The release notes indicate that the bsp is compatible with the Jlink.

       

      Regards,

      Galen

        • 1. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
          dan_schiro

          Hello Galen,

              Have you converted the MEP initialization script for the JLINK?  There is some lowlevel board initialization performed by this script that is needed to create a functional ReadyStart environment on the hardware.  This script can be found at bsp\atsam3uek\mep\atsam3uek.maj.

           

          Regards,

          Dan

          • 2. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
            ogradyg

            Dan,

             

            If any changes are required to the .maj file, I don't know what they are. The modifiable sections look to be more about jtag chaining and specific board features - I'm starting with the stock EK board.

             

            Should a Settings File be specified in the J-Link tab of the Debug Edit Configuration window? If so which one? Or is there a template to start from? The existing .maj file doesn't work here - at least not in it's original form.

             

            Regards,

            Galen

            • 3. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
              ogradyg

              Is there a JLink settings file required?

              Should it be somewhere in the bsp folder?

               

              Regards,

              Galen

              • 4. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                dan_schiro

                Hi Galen,

                     I apologize, I haven't had a chance to get back to you on this.  I need to check with our BSP team on this.  I would think the J-Link script would be provided with the BSP since J-Link is a supported debug connection for this BSP, but I have not found it.  Unforunately our BSP team is out on National holiday until Monday.  I will follow up with them then and get back to you.

                 

                Regards,

                Dan

                • 5. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                  ogradyg

                  Dan,

                   

                  Have you heard anything from your BSP team on this?

                   

                  Regards,

                  Galen

                  • 6. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                    dan_schiro

                    Hi Galen,

                         I've heard back from engineering and they re-tested the BSP with the J-Link and did not see the issues you report.  For the J-Link, there is no additional low level hardware initialization needed.  Here are the details of our setup:

                     

                     

                    CodeBench version 2013.05-53

                     

                    Nucleus Ready Start version 2013.08

                     

                    Jlink firmware 4.66

                     

                    Board ATSAM3U-EK Rev 007

                     

                    Engineering has requested your corresponding setup details. Can you please provide these?

                     

                    Regards,

                    Dan

                    • 7. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                      ogradyg

                      Dan,

                       

                      I've got a few version differences:

                       

                      CodeBench version 2012.09-127

                      Nucleus Ready Start version 2013.03

                      Jlink dll 4.42b

                      Board ATSAM3U-EK Rev 007

                       

                      The Jlink dll supplied with my ready start package is v4.42b (arm-none-eabi-jlinkarm.dll). I have v4.78d installed on my system and have the latest firmware (2013 Sep 20 15:09) on my JLink probe. I have tried replacing the ready start jlink dll with the latest (4.78d) but it doesn't work.

                       

                      Is there an automated process for getting up to the latest CodeBench and Ready Start or do I need to contact sales?

                       

                      Regards,

                      Galen

                      • 8. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                        ogradyg

                        Dan,

                         

                        Is it possible to get a copy of the working project for test with my tool setup?

                         

                        Regards,

                        Galen

                        • 9. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                          dan_schiro

                          Hello Galen,

                                   Engineering has also tested the following environment and has not had the issue with stepping into code:

                           

                          CodeBench version 2012.09-127

                           

                           

                           

                          Nucleus Ready Start version 2013.03

                           

                           

                           

                          Jlink dll 4.42b

                           

                           

                           

                           

                           

                           

                           

                          They did see the messages in the Debug tab but said these are safe to ignore.  They would like to see if you set a breakpoint somewhere in your application code if you can execute and hit the breakpoint rather than attempt to step over the first few assembly instructions. Can you please let me know the outcome of that test?

                           

                          Regards,

                          Dan

                          • 10. Re: Jlink doesn't seem to be downloading to ATSAM3UEK
                            ogradyg

                            Dan,

                             

                            At this point, when I try to start a debug session I get the following errors in a "Error in debugger startup" popup dialog

                             

                            ==========================

                            Failed to execute MI command:

                             

                            -exec-continue

                            Error message from debugger back end:

                            Warning:

                            Cannot insert breakpoint 4.

                            Error accessing memory address 0x6000002c: (undocumented errno -1).

                            Cannot insert breakpoint 2.

                            Error accessing memory address 0x6000018a: (undocumented errno -1).

                            Cannot insert breakpoint 1.

                            Error accessing memory address 0x6000020a: (undocumented errno -1).

                            ==============================

                             

                            Is it possible to get a working project to verify if I have a bad setup?

                             

                            Regards,

                            Galen.