FRDM-KLZ25Z Will not connect in IAR enviornment.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDM-KLZ25Z Will not connect in IAR enviornment.

ソリューションへジャンプ
1,976件の閲覧回数
davegrissom
Contributor II

I have installed PE Micro Drivers.  I do note that in my device drivers under Jungo, I only see one listing, that of WinDriver.  Someone else told me they had two entries under Jungo.  When I bring up my IAR ARM V6.50.2, load an example program made for IAR (pwm_led) and try to move to debug, I get an window telling me "port: Undetected. Disconnect/Connect USB cable. Click Refresh List."  No matter select after this, I can not connect.  I am sure I have the latest drivers from PEMicro.  Anybody have this problem or an idea how to fix it?  I am plugged into the SDA connector.  My PC does recognize the KL25Z as an SD card and displays the directory.  The green LED is flashing at about a half second on and half second off.  The multicolor LED changes color when I move the KLZ25 as expected. 

ラベル(1)
1 解決策
1,136件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Dave,

the FRDM board with OpenSDA has two operation modes:

- MSD bootloader mode (factory default): the device enumerates as a mass storage device (like a memory stick). You can copy S19 files to it to program it

- Debugging mode: in this mode it is not a MSD, but runs a debugging agent on the OpenSDA processor. This is what you need in order to use it with IAR, CodeWarrior, Keil, etc to debug it.

So you need to switch the board into 'debugging' mode which loading the 'Debug Application'. Steps how you can do this is described in

OpenSDA on the Freedom KL25Z Board | MCU on Eclipse

I hope this helps.

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
1,136件の閲覧回数
Monica
Senior Contributor III

Hello Dave,

Were this suggestions helpful? Please keep us posted, we'd like to know :smileywink:

Best regards,

Monica

0 件の賞賛
返信
1,136件の閲覧回数
davegrissom
Contributor II

Thank you Monica.  I am still getting my feet on the ground and simple things like how to reply to these messages is a leaning experience.  I made a suggestion and I am still not sure if I was making a suggestion to someone in the community like you or someone at Freescale.  In any case putting the KL25Z in debug mode worked great.  Thanks.

0 件の賞賛
返信
1,136件の閲覧回数
davegrissom
Contributor II

The suggestions were very helpful. I was able to load the the pwm_led project into the IAR debugger enviornment. I did get a warning during download that told me the “Target inconsistency detected at Memory address 0x0000040C. The software does seem to run. The color LED is on but barely preceptable and changing colors. I can just make out the a pwm effect on each color as the LED changes color.

I would suggest a simple lab that walks us through the setup for IAR, into a working application and then back to the original software. It is impossible for an engineer to not skim through documents trying to decide what is important and what is not. Somehow I missed the info that you sent me and it took me a week to get going. The lab could be simple step 1, 2 and 3 with hyper links to any problems that are encountered in the field in completing the steps. For now, I am fine. I just need to solve the next warning mystery.

Dave

From: Monica Arvizu

Sent: Wednesday, April 17, 2013 4:04 PM

To: Dave Grissom

Subject: Re: Kinetis Microcontrollers - FRDM-KLZ25Z Will not connect in IAR enviornment.

FRDM-KLZ25Z Will not connect in IAR enviornment.

created by Monica Arvizu in Kinetis Microcontrollers - View the full discussion

0 件の賞賛
返信
1,136件の閲覧回数
chris_brown
NXP Employee
NXP Employee

Hi Dave,

The project you are using, pwm_led, was built in Processor Expert using the default flash configuration setup.  This setup
sets the FSEC field (memory location 0x0000_040C) to the following state:

Backdoor Key Security:  Disabled.

Mass Erase Enable:  Enabled

FSL Failure Analysis Access:  Enabled

Flash Security:  Unsecured

Specifically, it sets all of these 2-bit fields to 0b11 except for the Flash Security field, which it sets to 0b10, and the KEYEN field, which it sets to 0b01, the preferred KEYEN state to disable backdoor key access.  IAR's default function is to program the part with the specified output file, and then check the Flash configuration fields.  If they are not written to the factory default state, it will write them to the factory default state unless your *.board file includes the extra parameter "--enable_config_write" (which none of the sample code projects do).  Therefore, what is programmed on the part, is not exactly what IAR was told to program.  This is why there is a target inconsistency at that address. 

As for your other suggestions, thank you.  We are currently trying to address these concerns. 

Hope this helps,

Chris

0 件の賞賛
返信
1,136件の閲覧回数
dereksnell
NXP Employee
NXP Employee

Here is a tutorial on using the --enable_config_write parameter with the IAR .board file

Using IAR EWARM to program flash configuration field

0 件の賞賛
返信
1,136件の閲覧回数
davegrissom
Contributor II

Thank you Cristopher. I will see if I can find out where –enabl_config_wirte is put in IAR’s environment and go from there.

From: Christopher Brown

Sent: Thursday, April 18, 2013 4:04 PM

To: Dave Grissom

Subject: Re: Kinetis Microcontrollers - FRDM-KLZ25Z Will not connect in IAR enviornment.

FRDM-KLZ25Z Will not connect in IAR enviornment.

created by Christopher Brown in Kinetis Microcontrollers - View the full discussion

0 件の賞賛
返信
1,137件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Dave,

the FRDM board with OpenSDA has two operation modes:

- MSD bootloader mode (factory default): the device enumerates as a mass storage device (like a memory stick). You can copy S19 files to it to program it

- Debugging mode: in this mode it is not a MSD, but runs a debugging agent on the OpenSDA processor. This is what you need in order to use it with IAR, CodeWarrior, Keil, etc to debug it.

So you need to switch the board into 'debugging' mode which loading the 'Debug Application'. Steps how you can do this is described in

OpenSDA on the Freedom KL25Z Board | MCU on Eclipse

I hope this helps.

0 件の賞賛
返信
1,136件の閲覧回数
davegrissom
Contributor II

Thank You Erich.  Works great.

0 件の賞賛
返信