bootload for k60 use by serial port

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

bootload for k60 use by serial port

3,117 Views
李志權
Contributor II

I have searched an2295

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2295.pdf?&Parent_nodeId=&Parent_pag...

https://community.freescale.com/docs/DOC-95039

But I only find the IAR and KEIL projects inside, had not found the cw,

Can provide a project of the cw?

Or tell me how to create the bootload projects?

I use the development board is TWR - K60D100M

The cw version is 10.4

Labels (1)
0 Kudos
Reply
21 Replies

2,020 Views
李志權
Contributor II

Thank you, I rewriting the bootload code, and debug to ok, the problem has been solved, thank you.

2,020 Views
yantailuo
Contributor I

How do u fix your problem? i encountered the problem as u did.

0 Kudos
Reply

2,020 Views
李志權
Contributor II

use FLASH_LDD module to rewrite the bootload code

But my company code is encrypted, copy not to come out to you,sorry!

1.PNG.png

0 Kudos
Reply

2,018 Views
yantailuo
Contributor I

i think u mean u replace all the flash erase and write operation in AN2295 with the function generated by FLASH_LDD module?

0 Kudos
Reply

2,018 Views
李志權
Contributor II

Yes,you right

0 Kudos
Reply

2,020 Views
yantailuo
Contributor I

Sorry to write a letter to trouble u, coz i didn't see u reply to me. i understand the code is encrypted,  but can u explain that why this problem happened? i mean that the memory programme is not success. thank u

0 Kudos
Reply

2,020 Views
BlackNight
NXP Employee
NXP Employee

Looks like you are using the legacy Freescale compiler (not the new GNU ARM gcc one).

This compiler only offers to generate an S19 file in the linker options.

I recommend that you either use GNU ARM gcc compiler in CodeWarrior, or have a look at these forum posts:

S19 vs. HEX

CW 10.2 / K70 How to create S19 or other file for Flash burn

0 Kudos
Reply

2,020 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

You can find the latest firmware package with the CodeWarrior projects if you run a search for "AN2295SW" in Freescale WebPage.

In any case I leave you here a link to download it:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2295SW.zip?&Parent_nodeId=&Parent_p...

Hope this helps!

Jorge Gonzalez

0 Kudos
Reply

2,020 Views
李志權
Contributor II

I downloaded it and Try to compile it.

But compiling failure.

bootload_k60_error_cw10.4.PNG.png

0 Kudos
Reply

2,020 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

For the <bootloader_asm.s> file is bootloader jump to application function for KEIL compiler, please remove this file for CodeWarrior project compile.

And after that, customer need clear the project, please select menu "Project -> Clean..." to clear this project.

Then, customer need modify the link file address, which using the absolute address for that file, customer can modify it with below path:

${ProjDirPath}\CW_Linker_cfg\AN2295_LinkerFile.lcf

The below picture for more detailed info, after that, there with no compile issue about this project.

Wish it helps.

link.jpg

0 Kudos
Reply

2,020 Views
李志權
Contributor II

When I debug, also found a problem:

When I click on the Connect, there will be a timeout,just like

1.PNG.png

Using a serial port debug tool, found that it is to get the data

But in the code, it is also read in the data

3.PNG.png

so,What is the problem?

0 Kudos
Reply

2,020 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

About how to generate S19 file, you can refer below picture for CW project:

Step 1:

step1.jpg

Step 2:

step2.jpg

Step 3:

step3.jpg

I also recommend to refer below link about application link config file:

I have writed a application with a serial bootloader support for TWR-K60D100M

Wish it helps.

0 Kudos
Reply

2,020 Views
李志權
Contributor II

I according to your method to generate the s19 file, and the connection, but it hints

1.PNG.png

when i click AutoProgram、Read、BlankCheck ,it show

2.PNG.png

0 Kudos
Reply

2,020 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

The application code need start address at 0x4000, customer need to modify the application project link configure file (.lcf) to set the application code start address.

Wish it helps.

0 Kudos
Reply

2,020 Views
李志權
Contributor II

I didn't find the LCF files in the project, but have found. Ld file

And then the start address modification into 0 x4000

2.PNG.png

But after recompile, and become the original value

1.PNG.png

0 Kudos
Reply

2,020 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

For you are using Processor Expert tool, it need to set the Processors' Component Inspector [Build options] to set ROM/RAM Areas.

Please check below picture for more detailed info:

Wish it helps.

pe.jpg

0 Kudos
Reply

2,020 Views
李志權
Contributor II

Change the address after compile successfully:

1.PNG.png

But burning program still fail:

2.PNG.png

0 Kudos
Reply

2,020 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

I am not sure current AN2259 software supports TWR-K60D100M(Kinetis 100MHz silicon 2.x) board or not. As I know, previous AN2259 software only supports TWR-K60N512(Kinetis 100MHz silicon 1.x) board.

I will check it and let you know later.

Thank you for the patience.

0 Kudos
Reply

2,020 Views
李志權
Contributor II

I according to the code of AN2295, rewriting a bootload, now can download S19 file correctly.

But I can only use RAM way can jump to APP, use FLASH mode will not be able to jump to the APP

1.PNG.png

0 Kudos
Reply

2,020 Views
李志權
Contributor II

I want to burn AN2295, but didn't find how to generate the hex file options

1.PNG.png

0 Kudos
Reply