Failured getting started with the SDK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failured getting started with the SDK

1,472 Views
patricio
Contributor IV

Hello,

These are the tools I am working with:

- Kinetis KDS v3.2.0

- MCUXpresso SDK v2.3.1

-TWR-KV58F220M

I followed all the steps to generate and donwload the file "SDK_2.3.1_TWR-KV58F220M" (MCUXpresso SDK and not KSDK). 

Now I am following the steps from the document "Getting Started with MCUXpresso SDK". I try to run and debug the 'Hello word' example, but I have not been able to continue from this point (please see the attached picture)

As it is shown in the appendix B of this document, TWR-KV58F220M board has CMSIS-DAP as debug interface, however, the 'Hello word' example is not charged in 'GDB Open Debbuggin' (please see the attachment). What am I doing wrong.

And if I try with 'GDB PEMicro Interface Debugging', I get the following error message: Exception occurred during launch. Reason: error in services launch sequence.

Any help would be appreciated. 

Thank you. 

8 Replies

1,092 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Customer,

  Normally, we use the JLINK or the opensda to download the code in KDS.

  I suggest you use the opensda or the JLINK to download the code in the KDS.

  Now, please modify your on board debugger to opensda or JLINK, then in the debug configurations, you can use:

1. opensda->GDB PEMicro Interface debugging

2. JLINK-> GDB SEGGER J-link debugging

About how to change the on board debugger to opensda or JLINK, please go to this link:

www.nxp.com/opensda

Choose board as TWR-KV58, then follow the step to change the firmware.

Please try it at first.

If you meet any problem when you use the JLINK or the opensda, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,092 Views
patricio
Contributor IV

Hi,

I have been working for 3 weeks with the TWR-KV58 board and I have not yet been able to debug the "hello word" example.

I am pretty lost and I do not know the way to follow. 

- I tried to change the on board debugger to opensda as Kerry Zhou advised, but I was not able to do it, as I was not able to find any the is note any 'MSD-DEBUG-TWR-KV58*.SDA.' file in PEmicro.

- I follow the 'KDSUG_Kinetis desing studio user guide' to install the sdk. I get the 'SDK_2.3.1_TWR-KV58F220M.zip' through MCUXpresso SDK Builder. However, in the user guide talks about a KSDK vx.x Eclipse update.zip.

Eclipse update zip.png

Where should I get it?

What should I do with 'SDK_2.3.1_TWR-KV58F220M.zip' from the SDK builder?

As you can see I am pretty lost and quite desperate. Any help will be appreciated.

BR.

0 Kudos
Reply

1,092 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi AITOR ARANZABAL,

     So sorry for my later reply.

     Don't worry, now follow my steps do it carefully, I will take the opensda debugger as the example, tell you how to download the SDK code to the TWR-KV58F220M board.

     TWR-KV58F220 on board opensda version is the opensda2.1.

   1. Download the P&E driver and install it

     Please download the driver from this link:

http://www.pemicro.com/downloads/download_file.cfm?download_id=53 

    2. Please download my attached opensda2.1 firmware(unzip it you will get file DEBUG_OpenSDA_for_MBED_Bootloader_by_Pemicro_v108_v2.1.bin), it will be used later.

    3. Enter the bootloader mode and change the firmware to the opensda firmware.

     1) Unplug the USB cable, then press the on board RESET button, hold on it, then plug the USB cable between J22 and the PC.

     2) You will find your board is a device named as BOOTLOADER:

pastedImage_2.png

Then release the on board RESET button, it means your board already enter the BOOTLOADER mode.

    3) Send my attached DEBUG_OpenSDA_for_MBED_Bootloader_by_Pemicro_v108_v2.1.bin to your BOOTLOADER, and wait the sending is finished.

    4) Unplug the USB cable, the plug the cable again.

        Wait a moment, you will a usb device is installing.

        Then open the computer device management, in the ports, you will find there has a JLINK virtual COM port, it means your on board is modified to the JLINK debugger, and you also have the virtual com port.

pastedImage_2.png     

   OK, until now, we can use the opensda to debug the SDK code.

   4. Open the SDK helloworld code.

   KDS project folder:SDK_2.3.1_TWR-KV58F220M\boards\twrkv58f220m\demo_apps\hello_world\kds

  1)  Use the KDS open it, and build the project

pastedImage_4.png

   2) open the debug configurations, choose the GDB PEMicro Interface debugging.

pastedImage_3.png

pastedImage_4.png

The opensda debug is entered in.

 Now, open a COM Terminal to test the function.

Then click the resume button in KDS debug interface.

pastedImage_5.png

The above is the test result.

Please follow my steps and do it carefully.

If you still have question, please kindly let me know!

     


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,092 Views
patricio
Contributor IV

Hello Kerry Zhou,

Thank you so much for your help. I appreciate your detailed steps. Everything went perfect.

Now, I can start working and fighting with the demoboard.

However I have a few doubts:

- Document 'KDSUG - Kinetis design studio user guide' says that KSDK should be installed in the KDS. Is it done in the steps shown by you? Is it necessary?

- Previos to follow your steps, everytime I pluged the TWR-KV58, the board was shown as a device named as MBED. However now nothing is shown. Is it normal?

Than you again.

Best regards.

0 Kudos
Reply

1,092 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi AITOR ARANZABAL,

     You are welcome, and it's good to hear you make it works now.

     Actually, KSDK can be used with IAR, MDK, KDS, and our newest IDE MCUXpresso IDE, if you have interest, you also can try our MCUXpresso IDE:

MCUXpresso IDE|Eclipse-based Integrated Development Environment (IDE)|NXP 

  1. About the document

    I highly suggest you refer to our KSDK doc folder document, insteading of KDSUG.  

  2. About the device name, when I use the opensda, I also don't have the device, but opensda can work, and the virtual also works, I think it is relate to the bootloader, you don't need to care about it, just use the opensda with IDE to download the code.

If you still have problems, just let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,092 Views
patricio
Contributor IV

Hello,

When you start working with a new board and new environment, the beginnings are difficult, and lot of time is needed to be invested until you start working with it. In the past I worked with the board FRDM-KL25 and Codewarrior 10.5, using the Processor Expert tool. This time we have a new project in the company and taking into account the knowledge I had previously adquired, I choosed to continue with Freescale (NXP). I opted for the TWR-KV58 board, mainly because of its 240MHz .

In the preliminary analysis of the demo board, I saw that NXP had bought Freescale and there were new development environments: from codewarrior  jumpted to Kinetis Design Studio, and now MCUXpresso IDE. But now what is my surprise when I discover that NXP choose not to continue with Processor Expert. Documentation about SDK is very poor and the job gets very complicated with the SDK.

Due to the characteristics of the products we develop in our company, we usually work with small  8bit micros, ATmega series (Atmel-Microchip). The jump to this type of micros has been bigger than I expected. 

Recently the conditions of my project have changed and I could work with a lower frequency microprocessor, which is why I am thinking of moving to the demo bard TWR-K64F120. From what I have analyzed, this board would allow me to work with KDS V3.2.0 and Processor Expert, without using the SDK. Is this correct or am I leaving something? Could you please confirm it? My intention is to make the job easier, making use of my previous knowledge since I am pushed for time.

Any advise will be appreciated.

Thank you.

0 Kudos
Reply

1,092 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi AITOR ARANZABAL,

  If you want to use the K64 chip and the PE, you can use the KDS

pastedImage_1.png

Don't worry, if you have any question in the future with NXP product, just create the question post, we will help you.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,092 Views
patricio
Contributor IV

Hi Kerry Zhou,

Thank you for your help. I tried to follow your advices, but I am still not able to run and debug. 

I tried to work with OpenSDA. I will try to explain all my steps:

1) I go to: www.nxp.com/opensda.Check the Bootloader and Application version of my boad:

   1a) Bootloader: I get the file 'k20dx128_bootloader_0x8000.bin'. What should I do with it?

   1b) Default firmware application: No access to the website. 

2) Download the OpenSDA application for my board:

I click on 'P&E Micro v108' and I access PEmicro website. I try to follow the steps in there. Please refer to the picture attached as "PEmicro.png"

   2a) Hardware information: I can not find SDA_INFO file. 

   2b) OpenSDA Firmware: I get 'Pemicro_OpenSDA_Debug_MSD_Update_Apps_2017_09_26.zip' but there is not any 'MSD-DEBUG-TWR-KV58....' file. The nearest file is 'MSD-DEBUG-TWR-KV46F15_Pemicro_v119.SDA'

   2c) Windows driver: I downloaded and installed the driver. However, previously I installed already the mbed serial drivers. Any problem with that?

PEmicro.png

3) KDS, debug configuration:

   3a) The dispositive administrator recognizes the TWR-KV58 board in COM28.

Dispositive administrator.png

   3b) However, in "PEmicro interface setting" it doesn´t shows nothing in PORT. 

   3c) It shows the following message: "Plugin has not been registered. Some functionality may not be available". What is it about.

Debug configuration.png

Thank you for your help in advance. 

BR.

0 Kudos
Reply