
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 TWR-K70F120 tower board and occupies about 25k of the K70F120's
internal flash. The TWR-SER extension board is required for UART and the USB connection is on the processor board.

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_K70.S19 - This is the serial boot loader, which can be programmed to the tower kit's processor 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)

- software_V1.4.003.bin and software_V1.4.0T3.bin are two slightly different application software versions that can be copied
to an SD card. The file name must be renamed to "software.bin" in the root of the SD card so that it can be found by the SD card
loader part of the boot loader. Note that the content has an additional header in order to avoid other files on the SD card
which could have the same name from being recognised as a valid software to be loaded.

- 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 tower kit appears as a hard drive at the PC).

- password.txt The loader allows copying back the application vua USB-MSD (dragging the software fiel 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 vai USB-MSD it is possible to upload a file with the same name as the one loaded by
overwritin teh fiel rather than first deleting it.

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.



Good luck with your use of the flexibly serial loader!


Note that the application size is limited to 130k. 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



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 - only when debugging with peripheral register views will it be necessary to then select the
exact device type).

-In the project code make sure that #define TWR_K70F120M 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_K70.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. Hold the switch SW2 down when starting to force the boot loader to be sure - when the
loader is running one green LED will be blinking (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 2 timeout). Your application should do this otherwise it will
reset after 2s. The watchdog can also be disable din the serial loader by setting 
#define WATCHDOG_DISABLE()   1
in app_hw_kinetis.h
To test a disabled watchdog the switch SW1 can also be held down at reset.
