Trouble with KDS and FRDM-KL26Z

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

Trouble with KDS and FRDM-KL26Z

Jump to solution
2,500 Views
jarnoldbrown
Contributor II

Just received an FRDM-KL26Z this morning, tried to set up Kinetis Design Studio. Followed the instructions on the pack, and went to the Jump Start Your Design. Some time later, I find that "Build SDK Package" has version 2.0 greyed out, and I can't find a new project wizard for anything older than 2.0. Now I'm stymied. Waht have I done wrong?

Labels (1)
1 Solution
1,570 Views
DavidS
NXP Employee
NXP Employee

Hi John,

You are not crazy.  It is grayed out for KSDK_v2 as it is not yet supported.

Here is a good link to review for roadmap of device support in KSDK_v2.

Introducing Kinetis SDK v2

End of March is target date for the KL26Z support in KSDK_v2.

Regards,

David

View solution in original post

24 Replies
1,533 Views
jarnoldbrown
Contributor II

I have made some progress with migrating the HID bootloader from the KL25Z source to KL26Z. It has been tricky, as the source code had been hacked about a lot, and there are no comments to help understand why. The bad thing that's happening now, which I doubt anyone can help with, is that the PEMicro CDC channel ceases to work as soon as I have established the HID connection with the KL26Z. The only way to recover the CDC channel seems to involve uninstalling and then re-installing the driver.

BTW, I believe a lot of the problems may have been caused by this code in the original KL25Z code, which has wTotalLength as one byte.

/*USB configuration descriptor structure*/

typedef struct _USB_CFG_DSC

{

    uint_8 bLength;

    uint_8 bDscType;

    uint_8 wTotalLength;

    uint_8 bNumIntf;

    uint_8 bCfgValue;

    uint_8 iCfg;

    uint_8 bmAttributes;

    uint_8 bMaxPower;

} USB_CFG_DSC;

Although, to be fair I've just noticed that the source code in question came from here:

http://blog.frankvh.com/2014/04/06/freescale-kinetis-usb-bootloader/

So the hacks in question may not have come from Freescale. If anyone can point me at the original Freescale equivalents, it could be useful.

John

0 Kudos
1,571 Views
DavidS
NXP Employee
NXP Employee

Hi John,

You are not crazy.  It is grayed out for KSDK_v2 as it is not yet supported.

Here is a good link to review for roadmap of device support in KSDK_v2.

Introducing Kinetis SDK v2

End of March is target date for the KL26Z support in KSDK_v2.

Regards,

David

1,533 Views
jarnoldbrown
Contributor II

Thanks.

0 Kudos
1,533 Views
jarnoldbrown
Contributor II

OK, now I have attempted to build the hello_world_frdmkl26z example. and I get the followinf error message:

make -k all

make: *** No rule to make target `C:/Freescale/KSDK_1.3.0/examples/frdmkl26z/demo_apps/hello_world/kds/../../../../../lib/ksdk_platform_lib/kds/KL26Z4/debug/libksdk_platform.a', needed by `hello_world_frdmkl26z.elf'.

make: Target `all' not remade because of errors.

Any advice welcome.

0 Kudos
1,533 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello John:

The platform library project needs to be built first so you get the libksdk_platform.a. Please read the getting started guide in KSDK folder:

C:\Freescale\KSDK_1.3.0\doc\Getting Started with Kinetis SDK (KSDK) v.1.3.pdf

There you find detailed instructions on how to build and run the examples.

Regards!

Jorge Gonzalez

0 Kudos
1,533 Views
jarnoldbrown
Contributor II

Thanks, will look into this.

Meanwhile, I have another problem. Installing Kinetis Design Studio has broken my Eclipse IDE that I use for Nordic nRF8122 development. Something to do with the Java update. I just needed to make a small mod today to a nRF application, but now I have to spend more hours trying to sort this out...

Can you tell me whether KDS is 32 or 64 bit, and whether the Java update it instigated is 32 or 64 bit?

0 Kudos
1,533 Views
BlackNight
NXP Employee
NXP Employee

Hi John,

KDS is a 32bit binary. But it does use its local local VM (see eclipse\kinetis-design-studio.ini).

features/com.somniumtech.jre.win32.win32.x86_1.7.0.76/jre/bin

Erich

0 Kudos
1,535 Views
jarnoldbrown
Contributor II

Thanks, Erich.

Any idea as to how I can arrange for KDS and Eclipse Luna(64 bit) to live in peace and harmony? Seems a bit silly, considering that KDS is built on Eclipse...

Should I, maybe, be looking at using native Eclipse for the KL26Z?

0 Kudos
1,535 Views
BlackNight
NXP Employee
NXP Employee

Hi John,

I have running Luna (64bit) and Mars (64bit) all running side-by-side on my machine with KDS (and other Eclipse distributions). I'm not sure what is going wrong with your Nordic environment. KDS actually does not need any special setup/installation apart of the USB drivers for the debug connection.

You certainly can build a DIY Eclipse for KL26Z (see for example Going to Mars: Building a DIY Eclipse IDE for ARM Embedded Microcontrollers | MCU on Eclipse ), but I think you should first understand what is going on in your Nordic environment.

You could have a look at the .log file inside the .metadata folder of your workspace, maybe it gives a clue.

I hope this helps,

Erich

0 Kudos
1,535 Views
jarnoldbrown
Contributor II

I re-installed java, and my previous Eclipse works again. It looks like the KDS does too, but I won't know until I've used it in anger.

Thanks again.

0 Kudos
1,535 Views
jarnoldbrown
Contributor II

Capture.JPGOK. I seem to be able to complie everything now, but I can't run. I get a dialog telling me that there are no available devices. I have been to the P and E website, dowloaded and installed the drivers.I have disconnected/reconnected the FRDM-KL26Z,

Sometimes I think it was easier programming 6502s in hex back in the old days...

0 Kudos
1,535 Views
DavidS
NXP Employee
NXP Employee

Hi John,

Press and hold down the reset button on the FRDM-KL26Z Freedom board and plug-in the US cable to the J10/OpenSDA connector.

It should enumerate as a MSD and have name BOOTLOADER.

Open attached ZIP file and drag-n-drop the file on to (or in) the BOOTLOADER.

This will then load the PEMicro OpenSDA debugging firmware on your Freedom board.

Re-try your debug session.

Hope this helps.

Regards,

David

0 Kudos
1,535 Views
jarnoldbrown
Contributor II

Thanks.

I've done that, and the .SDA file shows up in the BOOTLOADER. But it does not persist. If if disconnect the USB cable, and do the same thing again, the .SDA file is gone. So, I tried clicking "eject", same thing, .SDA file is gone.

I must be missing something simple, it can't be this difficult!

Kind regards,

John

0 Kudos
1,538 Views
BlackNight
NXP Employee
NXP Employee

Hi John,

are you using Windows 8 or 10? You need Windows 7 to update the bootloader first to make it working with windows 8/10. Otherwise loading the .sda will fail on Windows 8/10.

See Illustrated Step-by-Step Instructions: Updating the Freescale Freedom Board Firmware | MCU on Eclips... .

See as well the comment sections in above article: there should be a way to do the same thing with Windows 8/10 (see the link to the Microsoft article).

I hope this helps,

Erich

0 Kudos
1,538 Views
jarnoldbrown
Contributor II

Using Windows 7

0 Kudos
1,538 Views
BlackNight
NXP Employee
NXP Employee

Using a USB 3.0 port or a port on an external hub? I have seen cases where this could causes issues too. Try another USB port.

Disable any fancy 'memory stick accelerator' or virus scanner, or anything which could interfer with memory sticks/thumb drives.

Plus update that bootloader.

I hope that helps,

Erich

0 Kudos
1,538 Views
jarnoldbrown
Contributor II

USB 2.0, not from a hub.

0 Kudos
1,538 Views
jarnoldbrown
Contributor II

OK, finally got it working. I hadn't realised it was a two-stage thing, updating the bootloader first, then the OpenSDA stuff. My mistake. I guess I originally expected the FRDM PCB to be turnkey.

Anyway, thanks so much for all the prompt and out-of-hours support I've received so far. I'll probably be back with more dumb questions very soon!

Kind regards,

John

0 Kudos
1,537 Views
jarnoldbrown
Contributor II

OK, I'm back on this project. How do I find out how big the resulting code is? I'm used to having .hex files generated, that give me some idea, but the Kinetis Design Studio seems to only spit out .elf files, which are Greek to me.And the makefile explicitly warns me not to edit it...

0 Kudos
1,537 Views
BlackNight
NXP Employee
NXP Employee

It is here:

2016-03-03_17-24-49.png

See Printing Code Size Information in Eclipse | MCU on Eclipse

I hope this helps,

Erich

0 Kudos