!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Note that the SD card loader has been disabled in the FRDM-KL25Z version since the board
doesn't have an SD card slot.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This flexible uTasker serial loader combines SREC-UART loading with SD card and also USB-MSD loading.
It is configured to operate on the Freescale Freedom FRDM-KL25Z and occupies about 25k of the KL256Z128's
internal flash. [about 20k without integrated SD card loader]. The UART operates via the OpenSDA virtual COM port and the USB connection is on the Freedom board.
The boot loader mode is forced by connecting PTD4 to ground when resetting the board (J1 pin 6).
The watchdog can be disabled by connecting PTA12 to ground when resetting the board (J1 pin 8).

The application is linked to the start address 0x8080.

For further details of the serial loader and its modes of operation see the user's guide at
http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF



The following files are included:

- uTaskerSerialLoader_FRDM-KL25Z.S19 - This is the serial boot loader, which can be programmed to the Freedom board (for example by using CW10.x "Flash File to Target" function).

- software_V1.4.003_serial.S19 is a test application that can be loaded via the serial interface at 115200 Baud N 8.
When the application runs it displays V1.4.003 as version number (hit the enter key when the application is running to see
this and a menu with further operations)


- USB_software_1.4.003.bin and USB_software_V1.4.0T3.bin are two binary images of the two slightly different applications that can
be loaded using USB-MSD (when the Freedom board appears as a hard drive at the PC).


One application displays the software version "V1.4.003" and the other "V1.4.0T3" (hit the enter key when the application is
running to see this and a menu with further operations). The version number allows one to verify that the application has been
successfully changed.


- password.txt The loader allows copying back the application via USB-MSD (dragging the software file back to the PC) however the content
of the file will be all zeros since also password protection is enabled. By dragging this file to the disk (see the content for password)
it will temporarily remopve password protection (until next reset) so that the content is then identical to the application binary file.

- note that when uploading new application software via USB-MSD it is possible to upload a file with the same name as the one loaded by
overwriting the file rather than first deleting it.



Note that the application size is limited to 40k. To enable larger applications the uTasker project can be built with adjusted
settings or loader modes removed to decrease the required boot loader size.
Get full details, source code and support for your own project at www.uTasker.com.

See the boot loader in operation at http://youtu.be/XVlCisUmJMI

Good luck with your use of the flexibly serial loader!


HELP: when something goes wrong here are a few tips:
====================================================
- If building the serial loader yourself with CodeWarrior 10.x select the target MK60N512VMD100_SERIAL_BOOT_FLASH (don't worry about the
type since it is fairly general). However the processor type must be set to cortex-m0 and linker script file MUST be set to the correct part by editing 
Properties | C/C++ Build | Settings | Tool Settings | ARM Linker| Input -> Linker Command File to
${SERIAL_LOADER_LOC}/Project_Settings/Linker_Files/MKL128_flash.lcf

-In the project code make sure that #define FRDM_KL25Z is active in config.h and make any of your own changes here or in either app_hw_kinetis.h
or Loader.h

- If you have loaded "uTaskerSerialLoader_FRDM-KL25Z.S19" but the board doesn't seem to run please check the following
-- It may be that there is some code already loaded to the board which means that the address 0x8080 is not deleted (0xffffffff). This will cause the
serial loader to try to start it and fail. Ground PTD4 (J1 pin 6) when starting to force the boot loader to be sure - when the
loader is running the LED will be blinking green (deleting the entire internal flash before beginning helps).

- If you load your own application make sure that it has its reset code is linked to be at 0x8080. Interrupt vectors should be run from RAM or set to a
location in the code (not left at 0x00000000)
- Also note that the serial loader starts the watchdog and retriggers it every 200ms (with 1 timeout). Your application should do this otherwise it will
reset after 1s. The watchdog can also be disabled in the serial loader by setting 
#define WATCHDOG_DISABLE()   1
in app_hw_kinetis.h
To test a disabled watchdog Ground PTA12 (J1 pin 8) when the board is reset.

Note that the SREC loading will usually fail on this board since the OpenSDA virtual com port implementation doesn't respect XON/XOFF correctly.
This may be solved in furure revisions of the driver.

