Author Topic: uTasker Serial Bootloader with brand new FRDM-K64F.  (Read 3581 times)

Offline ssinfod

  • Newbie
  • *
  • Posts: 7
    • View Profile
uTasker Serial Bootloader with brand new FRDM-K64F.
« on: December 02, 2016, 11:43:47 PM »
Hello,

I have a Freescale FRDM-K64F board and I have a simple question.
By default, the dev kit came with the mbed bootloader.

Now, I want to program the BIN file from here:
http://www.utasker.com/kinetis/FRDM-K64F.html
http://www.utasker.com/kinetis/FRDM-K64F/uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin

Here are my questions:
Q1) Can you use the KDS (Kinetis Design Studio) with the integrated OpenSDA to burn this software ?

Q2) Otherwise do I have to buy a JTAG programmer to change the bootloader in the FDRM-K64F ?
Example P&E Universal Multilink :
https://mcuoneclipse.com/2015/05/11/debugging-the-frdm-k64f-with-pe-multilink/#more-14938
http://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320137&productTab=1

Q3) What is the recommended reader/writer (programmer) software for the Freescale Kinetis ?
Is there any tool (similar to CFFlasher of the Coldifre ) but for the Kinetis ?

Thanks


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3013
    • View Profile
    • uTasker
Re: uTasker Serial Bootloader with brand new FRDM-K64F.
« Reply #1 on: December 03, 2016, 12:13:38 AM »
Hi

There are two ways to program this binary file to the board:
1. With mbed boot loader (in the K20 on the board that make up the OpenSDA):
- when the OpenSDA is connected the board appears as an external hard drive, drag and drop the bin to it. This will program it.
2. With the P&E loader boot loader installed KDS's Flash utility can be used to load the file to the board (this is the symbol with a lightening flash on it). It requires a debug configuration to be created the first time it is used but it is not complicated (choose P&E interface and select the K64 target device).

The boot loader in the K20 (the OpenSDA chip) can be reprogrammed by powering the board with the RESET button held down and then doing a drag and drop of the new code (see the mbed page for later version and instructions [ https://developer.mbed.org/platforms/FRDM-K64F/ ] - I have attached the P&E and mbed ones that I use).

Beware that it is recommended to use Windows 7 to program new boot loaders to the OpenSDA K20 since it may not work with Win 8.1 or Win 10....

When using the FRDM-K64F the mbed loader is the simplest and fastest programming method.
The P&E one is best for debugging (I don't think KDS can use it) and loading with KDS flasher. I would say that the KDS Flasher is the method to use and can be considered approx. equivalent to CFFlasher in this context.

Regards

Mark



Offline ssinfod

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: uTasker Serial Bootloader with brand new FRDM-K64F.
« Reply #2 on: December 03, 2016, 05:01:48 AM »
OK, it's getting more clear to me but I got a few more questions while we are on that subject.

Q1) Is it exact to say that there are actually 3 bootloaders available ?
 *mbed bootloader (default with the board)
 *P&E bootloader (.SDA) file
 *uTasker bootloader (uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin).  (a.k.a uTasker Serial Loader)


Q2) If I program the "uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin" file to the FRDM-K64F with the mbed bootloader then do I loose the current mbed bootloader ?
(Is it overwritten?)
Otherwise, is there any co-habitation between the mbed and the utasker bootloader ?


Q3) Can I use the KDS flash utility with uTasker Serial loader or do I need to change the bootloader to the P&E bootloader (.SDA) while doing development in KDS ?


Q4) What happens if I use KDS to program a .S19 generated by the uTasker project while having the uTasker serial loader present in the FRDM-K64F.
 Do I loose the uTasker bootloader ?
 Where is the uTasker bootloader located in memory ?

For now, I suppose the uTasker bootloader is not erased because the uTasker project settings does not erase and write to the specific zone of memory where the uTasker bootloader is located. Right ?

If this is true, then it should be possible to send the .S19 with the serial bootloader (when in the field) or with the KDS Flash Utility (while doing development).


Q5) At some point my goal is to have a robust bootloader that I can use in the field for remote update. (Over Serial or Ethernet)

I suppose that the mbed bootloader or the P&E bootloader are more lab's development tools that actual 'in the field' bootloader.
Therefore, I'm leaning toward replacing the mbed bootloader by the utasker bootloader as quickly as possible. (So I will be closer to my final 'in the field' configuration)

Do you consider that the utasker bootloader (for Kinetis) is reliable enough to be used in the field for remote / in the field update ?

Thanks for patience,
« Last Edit: December 03, 2016, 05:03:21 AM by ssinfod »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3013
    • View Profile
    • uTasker
Re: uTasker Serial Bootloader with brand new FRDM-K64F.
« Reply #3 on: December 03, 2016, 08:14:38 PM »
Hi

Quote
Q1) Is it exact to say that there are actually 3 bootloaders available ?
 *mbed bootloader (default with the board)
 *P&E bootloader (.SDA) file
 *uTasker bootloader (uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin).  (a.k.a uTasker Serial Loader)

The first two are present in the K20 based OpenSDA part, which is used to program the K64, as debugger and also as USB-CDC UART bridge.
The third is a "standalone" boot loader that, once programmed to the K64, allows applications to be updated.
Real products (not evaluation boards) would not normally use the OpenSDA (requires board space, costs additional money and current consumption) and so only the third would be used - programmed using a JTAG or SWD adapter.

Quote
Q2) If I program the "uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin" file to the FRDM-K64F with the mbed bootloader then do I loose the current mbed bootloader ?
(Is it overwritten?)
Otherwise, is there any co-habitation between the mbed and the utasker bootloader ?

The uTaskerSerialBootxxx.bin is programmed to the K64 and not the K20 (OpenSDA where mbed boot loader is present), therefore the boot loader/debugger in the K20 device is not modified. It still allows further applications (or serial loaders) to be programmed. Therefore the mbed (or P&E) loader is ALWAYS present and can ALWAYS be used - it will never be impacted by loading any K64 code.

Quote
Q3) Can I use the KDS flash utility with uTasker Serial loader or do I need to change the bootloader to the P&E bootloader (.SDA) while doing development in KDS ?
I don't think the the mbed boot loader includes debugging capability for KDS, therefore the P&E one can be loaded (to the K20 based OpenSDA). Then the uTasker serial loader can be programmed using KDS's Flash utility.
Once the uTasker serial loader is programmed you can use it to upload application code so in fact the KDS Flash utility is not necessary any more: it is only needed to load the uTasker serial loader or to load 'standalone' applications.

Quote
Q4) What happens if I use KDS to program a .S19 generated by the uTasker project while having the uTasker serial loader present in the FRDM-K64F.
 Do I loose the uTasker bootloader ?
 Where is the uTasker bootloader located in memory ?

For now, I suppose the uTasker bootloader is not erased because the uTasker project settings does not erase and write to the specific zone of memory where the uTasker bootloader is located. Right ?

If this is true, then it should be possible to send the .S19 with the serial bootloader (when in the field) or with the KDS Flash Utility (while doing development).

If you load an application with KDS Flash utility is "may" overwrite the uTasker serial loader (I think that there are options to not erase all flash though so it depends). Once the uTasker serial loader is installed there is no reason to use the KDS flashing utility normally so this is not an issue anyway - the USB-MSD loader, for example, is many times faster that the KDS Flashing utility, and easier and quicker to use, so it is simplest to just work with it....


Quote
Q5) At some point my goal is to have a robust bootloader that I can use in the field for remote update. (Over Serial or Ethernet)

I suppose that the mbed bootloader or the P&E bootloader are more lab's development tools that actual 'in the field' bootloader.
Therefore, I'm leaning toward replacing the mbed bootloader by the utasker bootloader as quickly as possible. (So I will be closer to my final 'in the field' configuration)

Do you consider that the utasker bootloader (for Kinetis) is reliable enough to be used in the field for remote / in the field update ?

That is correct (the points I made above - it is not worth the expense of having a debugger on the board (OpenSDA) in a final target) - the OpenSDA device is an inbuilt debugger for the developer and I know of no HW products that add it.
The uTasker serial loaders (over serial, USB, SD card, memory stick and Ethernet) has been used for over 10 years on many parts (Coldfire, Atmel, STM32, Luminary Micro) and for 5 years in various Kinetis based products, so can be considered mature (only memory stick use is fairly new) and there are no know issues. It was developed expressly for in-field remote updates (there is also the "Bare-Minimum" loader which is often used for 'very' remote Ethernet based upgrading with fail-safe characteristics) and reliability was/is of course paramount.

Regards

Mark


Offline ssinfod

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: uTasker Serial Bootloader with brand new FRDM-K64F.
« Reply #4 on: December 04, 2016, 04:56:44 PM »
It all makes sense to me now..

Thanks!