Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Can't read registers / memory while part is running
Andy P. Dec 11, 2019 at 09:06 AM (09:06 hours)
Staff: Gilbert Y.

  • I have gone back to a FreeRTOS project that uses an LPC1768 and when I try to debug it using my Multilink Universal FX using Eclipse and plugin version 4.4.1.201911122108 it stops as expected at the start of the main() function.

    It then also appears to run correctly to the first breakpoint I have set in the code that I wish to debug. Thereafter when trying to step-into or step-over code it generates (many) warnings:

    PE-ERROR: Warning. Can't read registers while part is running.
    PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
    PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
    PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)

    The debug session then goes off into oblivion!

    I've tried this on a couple of the LPC1768 based devices and both show the same behaviour.

    -Andy.




    Comments

    • Hi Andy,

      Since FreeRTOS projects are not readily available for LPC 1768, would you be able to send us your project for testing in house? This would speed up our support for your issue.

      Regards,
      Gilbert Y.

      • Due to the commercially sensitive nature of the product I can't send that project to you.  I'll try and dig out the "blinky" project that I created to prove I could get FreeRTOS running on that board.

        I've checked back through the updates that I applied to Eclipse and all was working fine when I had v4.3.8.201910242122 of the plugin (and whatever version of firmware it would have programmed into the FX). The issue seems to have arisen since the latest upgrade.

        -Andy.

        • Andy,

          A generic "blinky" FreeRTOS project would be greatly appreciated. I tested our FreeRTOS support on plugin v4.4.1 on a different device and it appears to run correctly. Would you be able to provide screenshots of your Debug Configuration "Debugger" and "Startup" tabs?

          Gilbert Y.

          • Can I attach screenshots here or do I need to email them somewhere?

            -Andy.

            • You can email them to technical-info @ pemicro.com. Please link this forum post along with mentioning Gilbert Yap so that it will be easy to find.

              • I have sent the email to the address provided with the subject "FAO: Gilbert Yap".

                -Andy.

                • Andy,

                  Thanks for sending screenshots. Your settings seem to be in line with ours. If you are able to provide us with a generic FreeRTOS blinky project, please open up a support request and attach that project to the message. We currently have a LPC1769 evaluation board, but I believe this will not be an issue.

                • I was able to get a project for the LPC1768 from FreeRToS' website directly (https://www.freertos.org/LPC1768_RedSuite.html) and ran their project without issues after a few modifications to get the code to compile in MCUXpresso. Please open up a support request with us so that I can send you the project and you can test it out to see if we have any differences in compatibility.

                • Hi Andy,

                  Just checking in to see if you were able to replicate the issue with the project on the FreeRToS website or if you are able to generate a project for us to test.

                • Hi Andy,

                  Do you have any updates on this issue?

                  Regards,
                  Gilbert Y.

                  • Hi Gilbert

                    Sorry for the delay in responding but I got dragged off to work on something else. I am now back on this project and am still seeing the problem.

                    Eclipse told me there was a new version of the PEmicro ARM Device Expansion and GNU ARM PEmicro Interface Debugging Support plugins. I have updated them both to 4.4.9.202001152348 and the problem persists.

                    Comparing the installation history of plugins within Eclipse and the commits into our SCM of changes to the project then it was definitely working with version 4.3.3 of the plugins and possibly also with version 4.3.8.

                    My guess would be that the firmware update that occurred with the Multilink Universal FX when I updated the Eclipse plugins from 4.3.8 to 4.4.1 is what has caused the issue. Is there any way to downgrade the firmware again?

                    I'll find the time now to put a simple test program together which I can send over for you to test with.

                    -Andy.

                    • Hi Andy,

                      Yes it is possible for you to downgrade the firmware of your MutliLink. If you navigate to the v4.3.3 or v4.3.8 plug-in folder within the install of Eclipse, you can grab the file called "usbmlfxufarmens", which is the firmware file for the MultiLink. There are multiple versions of the firmware within the folder, so you will want to grab the file with the largest number in the file extension (i.e. usbmlfxufarmens.1029 for 4.3.8).

                      Then, install the "resource CD" software available from the following link: https://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320143&productTab=3. Inside of the newly installed "PEMicro/multilink_universal" folder, paste the firmware file. Then, rename the file to something like "usbmlfxufarmens.9999". Run the PEFirmwareConfig.exe file. Connect your MultiLink Universal FX and follow the instructions to select ARM debugging. This will show your .9999 firmware file on the bottom. Continue with the firmware update.

                      Once that is complete, the last thing that you will need to do is go into the v4.4.9 plug-in folder and remove any files named "usbmlfxufarmens". I would recommend just creating a new backup folder within the directory and placing them into it. This will now stop Eclipse from trying to update your MultiLink.

                      Please let me know if this still has issues with debugging the LPC1768. There are also changes to our .dll files that may be causing the issue, but if we can rule out firmware that would make finding the problem easier. With regards to a testable project/program, you will want to open up a support request with us so that we can easily exchange files. Please link this forum post so that I can easily get the support request forwarded to me.

                      -Gilbert

                      • I've tried with a combination of firmware from the usbmlfxufarmens.1029 file with the v4.4.9 plugin and the problem persists.

                        I'm not sure whether it makes any difference but I am using Eclipse on a macOS host (10.15.2). I'm struggling to revert the Eclipse installation to plugin v4.3.8 as the repository for one of the other plugins I have seems to have vanished.

                        -Andy.

                        • If you need the .zip files for v4.3.8 or v4.3.3, please let me know and I can send those to you via email.

                          • I'm really confused now as to what is going on.

                            I have downgraded my Eclipse installation so that it is running v4.3.8 of the plugin which I have tried using with the usbmlfxufarmens.1029 and usbmlfxufarmens.1026 firmware.

                            In both cases, I am still seeing the same issue with the error. The full text being generated is:

                            PE-ERROR: Warning. Can't read registers while part is running.
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 5443505F4854545053
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 505A5F5345524D414E
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 505A5F4C4544
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 505A5F52454144
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 505A5F4950415049
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 5544505F534E4D50
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 49502D7461736B
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 546D7220537663
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 454D4143
                            PE-ERROR: Warning. Can't read memory while part is running. @61000000 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
                            Number of threads 10 qfThreadInfoIterator: 0
                            Number of threads 10 qfThreadInfoIterator: 10
                            rsp_qThreadExtraInfo - Thread extra info grabbed - result: 49444C45
                            PE-ERROR: Warning. Can't read memory while part is running. @61000200 (4 bytes)
                            PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)

                            I have created a "Blinky" project that I have been running on the target hardware and can't get it to show the same problem.

                            -Andy.

                            • Aside from file content differing between the "Blinky" project and your project, are there any build configurations or debug configurations that differ?

                              You mentioned previously that v4.3.3 was the last version of the plugin that worked. Do you have access to this plugin? If you need a .zip file for it, please let me know.

                              • I have tried rolling back to v4.3.3 of the Eclipse plugin and that was still failing.

                                I have tried creating a new Eclipse workspace and importing the project into it and that fails too.

                                I have updated Eclipse and all of the plugins back to the latest version and now the behviour is very odd. When I try to start the debug session in Eclipse, a gdb session is started (I can see it using ps -ax) but the amber LED on the Multilink FX never switches on, Eclipse reports a timeout with the debug session but gdb is left running on the host (according to ps -ax).

                                I am kind of running out of ideas as to what to try now - short of deleting the whole Eclipse installation and starting again. The only other potential place for there to be a problem is within the .cproject, .project files or the .settings directory within the project itself.

                                -Andy.

                                • Deleting Eclipse and installing it along with the plugins has cured the issue with gdb not starting properly.  It hasn't however made any difference to being able to debug or step through the code.

                                  The only things I haven't tried is to create a new project to see if any of the cproject, .project files or the .settings directory contain the problem.

                                  The only other thing that I can think has changed between working and not working is macOS having been updated from 10.14 (Mojave) to 10.15 (Catalina).

                                  -Andy.

                                  • Hi Andy,

                                    Thank you for providing more information on the issue. Is there any way that you could send a stripped down version of the project that would not contain sensitive information?

                                    • I think I _may_ have figured out what is going on...

                                      In a recent change to the source code for the firmware we are developing the watchdog timer got enabled using a number of Chip_WWDT_...() functions from the NXP LPCOPEN library. Debugging with those watchdog related function calls commented out appears to fix the issue.

                                      Should debugging work with the watchdog function calls enabled or should I wrap them in an #ifdef...#endif so they don't get compiled into the debug build?

                                      -Andy.

                                      • Hi Andy,

                                        Yes, that is correct. We are unable to service the watchdog while we are debugging the device. Please wrap that code in an #ifdef block going forward.

Add comment


   Want to comment? Please login or create a new PEmicro account.







© 2020 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement