Firmware download through UART

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

Firmware download through UART

2,682 Views
durgeshk
Contributor II

Hi,

I'm using MKL16Z256 controller ,need help to develop code for download firmware through UART...please help 

Labels (1)
0 Kudos
14 Replies

2,030 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi DURGESH KUMAR,

   Please download our kboot2.0 at first:

               NXP_Kinetis_Bootloader_2.0.0 package

  Then refer to the KL25 flash bootloader in folder: NXP_Kinetis_Bootloader_2_0_0\targets\MKL25Z4

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,030 Views
carlosglez
Contributor I

You know if it's possible to use UART2 with that bootloader package on a KL25?

0 Kudos

2,030 Views
mjbcswitzerland
Specialist V

Carlos

I think that you may be asking about the KBOOT package but in case you ask about the uTasker one (also free and open-source) - it can be used on any UART by setting the define

#define LOADER_UART           x

to the one desired, plus choosing mapping options if the pinout is not using the defaults, such as
#define UART3_ON_B                                                   // alternative UART3 pin mapping
#define UART3_ON_C                                                   // alternative UART3 pin mapping
etc.

Regards

Mark

0 Kudos

2,029 Views
carlosglez
Contributor I

Thanks Mark,

    Yes, im talking about the KBOOT, but I will also give a look to the uTasker one, you where can I download it?

    Thanks!!

CarlosG.

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Carlos

***********************************************************************************************************

Quick start guide:

1) Download the Kinetis package using the links below - the following video shows how to get started https://www.youtube.com/watch?v=K8ScSgpgQ6M&t=311s
2) Start by reading the Kinetis documentation on the Kinetis landing page: http://www.utasker.com/kinetis.html and maybe by loading some reference code to your HW
3) Follow the Ethernet/Simulator tutorial to start working with the uTasker simulator (using VisualStudio C++  - the free VS2015 Community Edition is adequate) – this will give you a fast introduction to how to benefit quickly from the project’s capabilities and how to increase development efficiency with this tool
4) See the Compiler/IDE information at www.utasker.com/kinetis/compilers.html for building the project with the environment of your choice
Check out also the video quick start guide for Kinetis KE/KL/K and CodeWarrior: http://youtu.be/uBbiw36Caq4
5) A useful guide to adding your own tasks to the project can be found here: http://www.utasker.com/docs/uTasker/uTaskerV1.3_user_guide.PDF
6) There are various further uTasker documents on the documentation page: http://www.utasker.com/docs/documentation.html handling a variety of themes and peripherals. These will help you working with these extensions as well as using the uTasker boot loader(s)
7) If there are any problems or you have any questions don't hesitate to post questions: http://www.utasker.com/forum/
You will find topics for your processor as well as general discussions - if you don't find what you are looking for, just start a new thread
8) Regularly visit the uTasker forum for news on new features and patches
9) Have fun with the uTasker project!!

Download the uTasker V1.4.11 Kinetis open-source project from GITHUB:
Web:      https://github.com/uTasker/uTasker-Kinetis
HTTPS:    https://github.com/uTasker/uTasker-Kinetis.git
SSH:      git@github.com:uTasker/uTasker-Kinetis.git

*There are various uTasker videos available – go to YouTube and search for “uTasker” to see them, including Kinetis USB-MSD boot loader and SLCD simulator
*Follow uTasker at www.twitter.com/uTasker to receive immediate information about updates
* See further professional services and offers at http://www.utasker.com/services.html


***********************************************************************************************************

Regards

Mark

0 Kudos

2,029 Views
carlosglez
Contributor I

Hi Mark!

   That info was very usefull for me! Just one more question: The Kinetis Flash Tools is compatible with the uTakser? I mean, is possible to use the tool to upload the application?

    Thank your for your help!


CarlosG.

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Carlos

Yes, both UART and HID loaders are KBOOT compatible, but USB can also operate with USB-MSD in parallel (or together with other methods).


USB-MSD is however recommended generally since it doesn't need a PC program, works on all Windows, Linux and MACs, is easier to use (drag and drop) and is also faster. It allows the user to see the file (its name, data and size) and read it back, with optional password protection. It also allows files in binary, SREC or iHEX.

Regards

Mark

0 Kudos

2,029 Views
carlosglez
Contributor I

Mark,

   I already change the LOADER_UART  to 2 and keep the UART2 pins as default (D2, D3). I also specified that I'm using the KL25 and i'm using the TaskerSerialLoaderKinetis_FLASH file. Working with the Kinetis Flash Tool but can't connect with my board. I must be missing something, but don't know what. 

  Does it have autobaudrate or I have to set one? When I try to connect with the device it sends the following error message:

pastedImage_2.png

 

   Thanks for your time. 

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Carlos


The KBOOT mode uses a fixed 57600 Baud (I think that this was to be compatible with early KBOOT utilities which had this as fixed rate).

Regards

Mark

0 Kudos

2,029 Views
carlosglez
Contributor I

Still not working, any idea of what can I be missing?

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Carlos

I just checked with the FRDM-KL25Z board (on the Open SDA VCOM) and I could connect.

The modification for UART2 is OK - it sets the UART to PTD2/PTD3.

I would remove the define KBOOT_LOADER (in the serial setup) and ensure that REMOVE_SREC_LOADING is not enabled. This will give you an SREC loader on the UART instead, with the advantage that it gives a splash screen like:

 uTasker Serial Loader V1.4
============================
[0x00008000/0x00017fff]
me = mass erase
bc = blank check
dc = delete code
ld = start load
go = start application
>
You can enter ? to show the menu again to verify that the HW connection is good.

I do see that there is an error message on connection when used with the newest KBOOT (the uTasker KBOOT mode in the OpenSource project is about 2 years old) because it now requests multiple parameters on connection (originally it only ever requested a single one).

Connected to device successfully!
Collecting device information......
Error: Update status failed(invalid vector<T> subscript).

However this can be ignored because it doesn't stop the loading from operating.

I confirm that I could successfully upload an application, that then runs (using latest KBOOT utility on FRDM-KL25Z).

Regards

Mark

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Carlos

Note also that you can build the project with Visual Studio and connect a virtual COM loop back between KBOOT and the simulated KL25. This allows the complete operation to be tested, as well as verifying details about ports being configured as expected.

Regards

Mark

0 Kudos

2,029 Views
mjbcswitzerland
Specialist V

Hi

See http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

Contains KBOOT UART, Developer's Serail Loader, SREC and/or iHex loading on UARTs for almost all Kinetis parts. Use the KL26 since it is compatible with the KL16 as long as USB is not attempted.

Regards

Mark

http://www.utasker.com/kinetis/FRDM-KL26Z.html
http://www.utasker.com/kinetis/TEENSY_LC.html

OpenSource on GITHUB - http://www.utasker.com/kinetis.html

0 Kudos

2,029 Views
egoodii
Senior Contributor III

Search the forum for "serial bootloader", you will find lots of considerations.

0 Kudos