K60F120M bootloader

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

K60F120M bootloader

Jump to solution
2,080 Views
guillaumetiffin
Contributor III

Hi all,

I looking for a USB or SDCARD bootloader for the MK60FX512VLQ15 (quite the same as for the TWRK60F120M).

I found the USB bootloader example but it's for the MK60N512VMD100 then the project doesn't build.

It's my first bootloader. I want to adapt the USB bootloader to read on a SD Card instead of the USB. I think that this part should not be so difficult. (just change USB driver to SDCARD driver ??)

But I can't find how to implement the bootloader. What shoud I include, what are the ressources needed and so on.

When I look at the USB example, it seems to be realy different between the two microcontroller. Especially for the flash_Driver. Where can I find them?

Am I going on a wrong way?

Thank you for your help

Regards,

Guillaume

Labels (1)
0 Kudos
1 Solution
1,164 Views
mjbcswitzerland
Specialist V

Hi Guillaume

The uTasker project is well supported and is fully active. In the past many Coldfire V2 projects were made with it and during the last 3 years many users have moved to the Kinetis devices. There are presently various Kinetis projects in progress and new features are added regularly (eg. utFAT2.0 will be released in the next days with full Microsoft conform LFN writing or Linux Copyright avoidance patch, with synchronised data caching for improved performance, as well as SNMPV1, SNMPV2c integration in the project).

It is very flexible in its configuration and projects can be moved easily between Coldfire and Kinetis (or various other devices). For example, to configure the UART in the serial loader project it is a simple case of defining the port number (in Loader.h):

#define LOADER_UART 5 // set 0 for UART0, 1 for UART1 etc.

If you need special UART pin mappings differeing from the defaults (see page 26 of http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf ) this is set in app_hw_kinetis.h:

#define UART5_ON_D // TXD/RXD on Port D9/D8 rather than E8/E9

The idea is that users can immediatley start benefiting from a tested project using a wide variety of chips and tools and you should find it easy to use (many documents, a dedicated on-line forum [as well as Freescale forums] and fast email or telephone support if anything is not clear or a problem exists). Its Kinetis simulator also simplifies and accelerates since it allows applications to be run, tested and debugged in real-time on the PC - you can simply check that all ports are configured as expected (place mouse over the port of interest and it shows whether it is an input, output or a peripheral function, what pin it is connected to and its state. If it is an input and configured for an edge sensitive interrupt (for example) clicking on the pins will cause the input state to toggle and the interrupt to be triggered so that the interrupt routine and associated code can be tested.

Regards

Mark

P.S. You can quickly test a simulated Kinetis device from here:

µTasker Test Software and Demos

View solution in original post

0 Kudos
12 Replies
1,164 Views
guillaumetiffin
Contributor III

Hello,


Sorry to answer so late, but I wasn't at my office.

I will have a look to the AN.

For the uTasker, I can't use it because it's not free to use.

If you have other ideas don't hesitate to tell me.

Regards.

Guillaume

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Hi Guillaume

The uTasker boot loader is free for non-commerical use, so your project may qualify.

If your project is a commercial one there is a license required. This costs in total about $249 for a project and includes 6 months project support. Depending on your development costs this may or may not be expensive - for example, assuming your costs are $10 an hour and you can complete the development within less that 2 days of work (including documenting its operation for other users) you will save your employer around $90.

Just as Freescale offers Codewarrior at no charge for project code up to 128k, the boot loader is also available for the K60F120 (configuration as on the K60F120 tower board) as a free image download that will allow it to be used without any licensing for up to this code size. You can get the software at µTasker Test Software and Demos and it allows loading your project via UART, USB-MSD or SD card (as shown in the following video http://www.youtube.com/watch?v=XVlCisUmJMI&feature=youtu.be )

Regards

Mark

0 Kudos
1,164 Views
guillaumetiffin
Contributor III

Hi Mark,

I have some question about the uTasker.

Is the uTasker project is still active and well supported?

Can we tune the project as we want or not? (change the serial port, the mapping and so on)

Is it easy to use?

Because if my company pay for it, I won't spend a lot of time on developing on it.

Thank you for your answer,

Regards,


Guillaume Tiffineau

0 Kudos
1,165 Views
mjbcswitzerland
Specialist V

Hi Guillaume

The uTasker project is well supported and is fully active. In the past many Coldfire V2 projects were made with it and during the last 3 years many users have moved to the Kinetis devices. There are presently various Kinetis projects in progress and new features are added regularly (eg. utFAT2.0 will be released in the next days with full Microsoft conform LFN writing or Linux Copyright avoidance patch, with synchronised data caching for improved performance, as well as SNMPV1, SNMPV2c integration in the project).

It is very flexible in its configuration and projects can be moved easily between Coldfire and Kinetis (or various other devices). For example, to configure the UART in the serial loader project it is a simple case of defining the port number (in Loader.h):

#define LOADER_UART 5 // set 0 for UART0, 1 for UART1 etc.

If you need special UART pin mappings differeing from the defaults (see page 26 of http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf ) this is set in app_hw_kinetis.h:

#define UART5_ON_D // TXD/RXD on Port D9/D8 rather than E8/E9

The idea is that users can immediatley start benefiting from a tested project using a wide variety of chips and tools and you should find it easy to use (many documents, a dedicated on-line forum [as well as Freescale forums] and fast email or telephone support if anything is not clear or a problem exists). Its Kinetis simulator also simplifies and accelerates since it allows applications to be run, tested and debugged in real-time on the PC - you can simply check that all ports are configured as expected (place mouse over the port of interest and it shows whether it is an input, output or a peripheral function, what pin it is connected to and its state. If it is an input and configured for an edge sensitive interrupt (for example) clicking on the pins will cause the input state to toggle and the interrupt to be triggered so that the interrupt routine and associated code can be tested.

Regards

Mark

P.S. You can quickly test a simulated Kinetis device from here:

µTasker Test Software and Demos

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Hi Guillaume

How did you get on with the loader tests?

I had some other contacts about use on the K60F120 including a case with a problem in using the binary reference - therefore I have added a short list of things to check in such a case:

- 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_K60F120M 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_K60F120.S19" but the board doesn't seem to run please check the following

-- On the K60F120 board J18 should be OFF. On the TWR-SER board the jumpers J2 3-4 and J3 2-3 should be ON [this drives a 50MHz clock from the TW_SER board

to the K60F120 board and supports Ethernet operation in the application]

-- It may be that there is some code already loaded on the board which means that the address 0x00008080 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 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)

Regards

Mark

0 Kudos
1,164 Views
guillaumetiffin
Contributor III

Hi Mark,

Thank you for your help.

I didn't have the time to try it.

I think that I will try it next and of week.

The solution of uTasker seems to be a good one.

If I have any problem I'll ask you.

Thank you in advance.

Regards,

Guillaume

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Hi Guillaume

Just an update to inform you (and others requiring an SD card, USB-MSD or serial loader). I have now extended the range of flexible-bootloader packages to allow use on the following kits:

- K20D50M

- K40X256

- K53N512

- K60N512

- K60F120

- K70F120

All at http://www.utasker.com/SW_Demos.html#KINETIS

Regards

Mark

0 Kudos
1,164 Views
guillaumetiffin
Contributor III

Hello Mark,

I didn't have enought time to have a look a it before. Thank you for your help.

I think that I will have time only at the end of next week. I'll keep you informed.

Regards, 

Guillaume Tiffineau

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Guillaume

OK - no rush for me.

Note that the loader documentation has also been updated with additional implementation details concerning USB-MSD disk emulation (see chapter 7.1):

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

Regards

Mark

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Hi

I received a Freedom FRDM-K20D50M this afternoon and added a version for it too. The present list is:

  • - K20D50M TWR board
  • - K20DX128 FRDM-K20D50M
  • - K40X256 TWR board
  • - K53N512 TWR board
  • - K60N512 TWR board
  • - K60F120 TWR board
  • - K70F120 TWR board

http://www.utasker.com/SW_Demos.html#K20

I also received another 6 Freedom boards (KEs and KLs) and expect another 7 TWR boards to arrive shortly. Will try to extend the list so that nothing is missing [as long as some time can be found to build and test each new kit].

In the meantime I ported the parts required and added additional versions of the boot loader to the list:

  • - KL46Z256  FRDM-KL46Z
  • - KL46Z256  TWR-KL46Z48M
  • - KL25Z128  FRDM-KL25Z
  • - KL26Z128  FRDM-KL26Z

µTasker Test Software and Demos

Regards

Mark

0 Kudos
1,164 Views
mjbcswitzerland
Specialist V

Guillaume


The uTasker serial boot loader: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF allows loading via UART, USB-MSD or SD card and is compatible between K60 and K70 100/120 or 150 versions. There is a single project define which will adapt everying (like flash driver - although there is only really a couple of lines of code different between them).

The SD card loader works on SPI or SDHC and is fully documented in the link and can be tested in the uTasker Kinetis simulator.

The USB-MSD loader supports copying code via drag-and-drop from the PC and reading it back. To protect code there is also optional password protection. There are videos of this here:

- http://www.youtube.com/watch?v=H4TYM9jY2-g

- USB-MSD-SW-Prot.wmv - YouTube

The SD card loader is about 12k in size (with long file name support) and can be built with GCC, CW10.x, Rowley Crossworks, IAR or Keil.

Note that there is a big difference between USB-MSD and SD card operation since the USB-MSD file system is controlled by the USB host (PC) [the loader actually emulates a disk interface but works with internal Flash] and the SD card operation requires a local FAT. The SD card loader uses the utFAT, which is documented here: http://www.utasker.com/docs/uTasker/uTasker_utFAT.PDF

Regards

Mark

1,164 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Guillaume:

What is the status of your design?

Maybe you can find the next application note useful:

http://cache.freescale.com/files/32bit/doc/app_note/AN4695.pdf

Also, you are correct, the flash driver is different between K60 100 MHz and K60 150 MHz. I think you can use the Freescale C90TFS flash driver. I leave here a link that works right now to download it:

http://cache.freescale.com/files/32bit/software/C90TFS_FLASH_DRIVER.exe?&Parent_nodeId=&Parent_pageT...

And for the SD card driver, I do not have one at hand, but you might find examples around the community, or maybe someone else reading this thread can provide one.

Hope my reply is somehow useful.

/Jorge Gonzalez