Author Topic: Kinetis K64 and Serial Loader Configuration  (Read 5975 times)

Offline Phil

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Kinetis K64 and Serial Loader Configuration
« on: January 15, 2018, 07:31:12 PM »
Mark, et al,

I have an application that works great using uTasker. I am not trying to take advantage of the features of the Serial Bootloader so I can upload new firmware via RS232, Ethernet, USB-CDC, or USB-MSD (preferred).

The Serial Bootloader seems to be working well. I am using a switch on my custom PCB that gets it into bootloader mode and my PC opens a USB-MSD folder perfectly.

I have modified the application linker file so that it starts at 32K point per the Serial Bootloader documentation. I have attached that file called "K_512_192_Using_Bootloader.ld".  The application compiles just fine and creates .bin, .hex, and .srec files.

I drag and drop the .bin file into the MSD folder and everything seems go-to-go but the application does not start. Resetting the board does not work either. The bootloader just resets like normal.

When I load the bootloader itself and I run this in debug mode. Pausing shows it within the "irq_default(void)" undefined interrupt routine.  But, as I said before, when I trigger the bootloader switch the bootloader rumps into action and the USB-MSD pops up just fine. However, this might be a clue why things are not working properly.  I have attached the config.h and app_hw_kinetis.h files from the bootloader.

Any ideas or suggestions?

Regards,

Phil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Kinetis K64 and Serial Loader Configuration
« Reply #1 on: January 15, 2018, 07:48:06 PM »
Phil

You can use the linker script file "K_1M_256_BM.ld" which is set up for this.

Note that with USB-MSD the start address is 0x8080 and not 0x8000.

You will also see that the vector segment start needs to be adjusted too.

K_512_192 doesn't have the correct size of SRAM for the K64, which may also be a reason for failure.

Regards

Mark

Offline Phil

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Kinetis K64 and Serial Loader Configuration
« Reply #2 on: January 15, 2018, 07:59:01 PM »
Mark,

Thanks for the quick reply.

I'm using the MK64FX512VLL12 which has 512K program flash, 640K total flash, and 196 SRAM.  It's not the same 1M processor used in the FRDM_K64 board.

Phil
« Last Edit: January 15, 2018, 08:08:55 PM by Phil »

Offline Phil

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Kinetis K64 and Serial Loader Configuration
« Reply #3 on: January 15, 2018, 08:01:03 PM »
I will try K_512_192_BM.ld.  I think this is the one you want me to use.

Thanks.

Phil