AN2295 (HC08/S08 Developer's Serial Bootloader) updated for rev. 9.2 - CF V1 (alpha) support added

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

AN2295 (HC08/S08 Developer's Serial Bootloader) updated for rev. 9.2 - CF V1 (alpha) support added

Jump to solution
85,062 Views
ok2ucx
Contributor IV
Dears,

software for Application note AN2295 (HC08/S08 Developer's Serial Bootloader) has been updated recently. Since the last rev. 8 (Aug-2006) several additions and enhancements has been done:
  • S08LC family added
  • S08QE (Flexis) added
  • S08GB/GT family updated for A-family
  • S08EL/SL family added (including EEPROM programming)
  • S08QD family added (with software SCI)
  • S08DZ family added (including EEPROM programming)
  • HC08GR8A corrected
  • S08QG8 corrected
  • hc08sprg.exe master updated
  • simple Windows GUI application added
  • all projects updated for CodeWarrior 6.1
HC08 families supported: AB/AS/AZ, AP, GP32, GR(A), GZ, JKJL, JKJL8, JW32, KX/EY/GT, LB, LJ, MR, QB, QC, QT/QY, SR

S08 families supported: AW, DZ, EL/SL, GB/GT(A), LC, QD, QE, QG, RC/RD/RE/RG, SR

Any comments, reports, suggestions or wishes are more than welcome. Some of the latest bootloaders are still in alpha stage, tested briefly.

Direct download link is here:
http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2295SW

Unfortunately accompanying application note AN2295.pdf has not been updated yet (to reflect new protocol variations).

Best regards, Pavel, ok2ucx
Freescale Czech Republic
an2295 developer


Message Edited by ok2ucx on 2008-02-19 04:16 PM
Message Edited by ok2ucx on 2009-08-04 10:37 AM
Labels (1)
1 Solution
33,203 Views
Limestone
Contributor III

Hi Pavel and thanks for your response!

 

It worked like a charm!

 

I changed that line and stopt feeding my watchdog when I wanted to reboot and enter the bootloader.

 

Since I spent alot of time searching for a solution like this on the forum and did not find it, mabey this should be documented in someway :smileyhappy:

 

Best regards

Martin

 

 

View solution in original post

0 Kudos
241 Replies
1,034 Views
sebasira
Senior Contributor I

Good News!!! That's perfect!

 

I'll try that on CFv1QE

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

Hi David,

 

this is example of modification of LCF file in CodeWarrior 10.2:

 

 

# Default linker command file.
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E0
m_text (RX) : ORIGIN = 0x00000800, LENGTH = 0x00040000-0x00000800
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
# Modified linker command file.
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E0
m_text (RX) : ORIGIN = 0x00004400, LENGTH = 0x00040000-0x00004400
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}

 

 

Best regards,

 

Pavel

0 Kudos
1,034 Views
Ruds
Contributor I

Thankyou so much sir,

 I have changed as per your inputs, then I connected it . getting no warnings during connection as shown below.

==========================================================

Bootloader version string: K60
System device ID: 0x14A [Kinetis K60] rev. 2
Kinetis Package: 144-pin .
Number of memory blocks: 1
Memory block #1: 0x00004400-0x0003FFFF
Erase block size: 2048 bytes
Write block size: 128 bytes
Original vector table: 0x00000000-0x000003FF
New vector table: 0x00004000-0x000043FF

S19 Image Control.
Parsed S-record lines: 15 Bytes total: 2704
Source address range: 0x0000-0x4CAF

=============================================================

 

But when I press on the Program button the software is hanging itself(not responding)

May I know the reason for that please?

Is there any latest version of universal bootloader? as now it is v10.0.3.0

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

And before you pushed the button program you erase the memory ? And I recommend to try the BLANK CHECK after the memory erase. If will blank check you will see the following: (Blank check is complete and memory is erased)

After that is flash memory prepared for programming.

0 Kudos
1,034 Views
sebasira
Senior Contributor I

Hi, I'd like to test this bootloader for MCF51QE128.

 

I've got some questions...

 

1) I'm working with CW6.1... And it tells me that the project is made with a newer incompatible format and needs to be converted. Wich version are they made for? CW6.3?

 

2) I choose the option to convert it (from above message). I copy SCI_1.inc into main asm (becasuse of the version conversion). But it still says that some files are missing. Those files are:

- exceptions.h

- startcf.c

- startcf.h

 

I've just copy them from a project of mine that uses MCF51QE, is that correct? But still the problem is that it cannot find thefunction exit called from startcf.c. Where's that function? In my project (the one I copied those files from) I don't have it neither and compiler won't complain. It's a settings issue? Maybe because of conversion?

 

 

Thannks!

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Sebastian,

 

Yes, the latest version of the bootloader for MCF51QE128 is written in CodeWarrior 6.3. Easiest way how to solve your issue should be update of your CW6.1 ->6.3.

 

Link: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-MICROCONTROLLERS&fpsp=1&tab=Design...

 

 

Best regards,

B20253

0 Kudos
1,034 Views
Nouchi
Senior Contributor II

Hello,

 

Is there any plans to support ColdFire+ family (MCF51Jx & MCF51Qx) ?

 

 

Regards,

Emmanuel

0 Kudos
1,034 Views
Nouchi
Senior Contributor II

Hi,

 

Before reinvent the wheel, somebody knows if ColdFire+ is on the pipe?

 

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

Hi BugMan,

 

ColdFire+ family is not on the pipe yet. There is a new type of the flash memory (90nm TFS) and it will take some time to develope and test the bootloader for these MCUs. 

We will plan extension of the AN2295 by ColdFire+ family in the near future.

 

 

 

Regards,

 

Pavel Křenek,

AN2295 developer

0 Kudos
1,034 Views
Nouchi
Senior Contributor II

Hi Pavel,

 

So, I'm plan to write my own, starting from kinetis bootloader with FTFL driver, using the same protocol version.

Is it a good idea ?

 

Regards,

Emmanuel

 

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

Yes, it is.

 

I think the easiest way how to implement this bootloader is use part of the FTFL driver from Kinetis and add to the bootloader for any of ColdFire V1 and modified etc.

 

 

Regards,

Pavel

0 Kudos
1,034 Views
sebasira
Senior Contributor I

Thanks! I've download CW6.2 and it compiles without any problem...

 

I did it last night but I didn't have time to test it.... I'm not sure if I understood properly how does it work... Most of the bootloaders I've try, they need a way to access them rigth after reset, for example, set a pin LOW.

I haven't found this on the AN2295 (or at least is that what I understand), instead bootloader is enter when 0xFC is receive on the SCI? If so that confuse me.... Normally my code (user code) will be executing, if then I receive 0xFC bootloader mode is entered? Or is there a kind of window after reset where 0xFC needs to be input in order to enter bootloader?

 

Thanks in advance!

Best regards

0 Kudos
1,034 Views
ok2ucx
Contributor IV

Sebastian,

 

your understanding is correct. AN2295 (by default) uses what we call a “certain character at a certain time” method. I.e. there's a window (after power-on-reset) in which PC and embedded part have to connect in order to engage the bootloader communication. See section 2.1 in http://www.freescale.com/files/microcontrollers/doc/app_note/AN2295.pdf for further details.

 

Of course, you can modify the behaviour of the code for a “certain level on certain pin” method (which is what you'd expect). I.e. you can effectively disable the bootloader start if the level at the certain pin is not high/low.

 

Pavel

 

AN2295 ex-developer :smileyhappy:

 

 

P.S. Long time ago announced release 10 (e.g. with Kinetis support and Windows GUI) is now really behind the door...

 

 

0 Kudos
1,034 Views
Ruds
Contributor I

When I click on erase memory its hanging there only(I mean GUI software is not responding...). 

May I know the reson for the same pleease?

 

 

0 Kudos
1,034 Views
pavel_krenek
NXP Employee
NXP Employee

Hi,

 

The reason is simple, it is only due to bigger memory size. If the flash memory size is bigger GUI software has a little wait state. After this short time memory will be successful erased and GUI will be functional.

0 Kudos
1,034 Views
TurboBob
Contributor IV

Pavel, 

 

do you have a newer revision yet?

 

Bob

0 Kudos
1,034 Views
jmvoisin
Contributor I

Hello everyone,

 

I'm trying to use the serial bootloader for kinetis K60.

When launching the windows GUI, the bootloader can find all the needed information of the bootloader.

When disconnecting the bootloader, my program (in 0x4400) starts fine.

But no command from the GUI (erase, Blank check, Program, ...) works.

I always got an error.

I sometime (let's say 1 out of 50) can read a half of a block.

 

How can I debug this ?

Is there a basic test to run to make sur the issue is on our side ?

 

Thanks a lot,

Jean-Marie

0 Kudos
1,034 Views
TurboBob
Contributor IV

working with the CF51JM USB version.  Having issues with the PC side.  It was working this morning.  This evening I loaded the bootloader into another unit and when I tried to download the application to it,  the driver was showing up with an error in the device manager.  The properties of the port said "error could not start".  I reloaded the driver and eventually got the error to clear,  but the loader will not load the app.

 

The GUI runs,  and the DOS window just flashes by.  An improvement in the software would be to either capture the error in the GUI,  or leave the cmd window up with a "Press Enter to continue" so the error can be seen.

 

At any rate,  when run from the command line,  the error looks like:

 

can't setup serial port (COM2 @ (null))

 

 

The new Windows gui master gives the same error in its error pane:

Can't setup serial port (COM2 @ 115200)

 

any ideas whats up with this?

 

 

I pulled out the system I was programming fine this morning,  and it gives the following error

Can't open serial port COM2

 

 

0 Kudos
1,034 Views
TurboBob
Contributor IV

In reading thru the code and the documentation,  the beta version is considerably different the the alpha.

 

I like the beta version better.  Good work there.

 

I am having issues making it work.  I think the master is erasing the wrong memory range.

 

If I try to run version 0,  the master closes in the middle of the erase cycle.

 

If I run version 1.  it bootloads properly the first time.  But the bootload operation appears to erase the vector table in the bootloader,  so that the next time it runs,  there is no vector table for the bootloader to use.  So it crashes.

 

Also,  the code refers to version 0 and 1,  the documentation refers to version A and B.

 

Otherwise,  its looking pretty good (other than it not working)  :smileyhappy:

 

Bob

CF51JM version

0 Kudos
1,034 Views
TurboBob
Contributor IV

 

 

the erase in the master is definately killing the vectors,  the debugger caches the flash data so you don't see it when debugging unless the flash area is set up to refresh on halt.

 

changing the end value of the flash block makes it run.

//---------------------------------------------------------------------   #else  const IDENT_STR idents =   {    2,                         // number of reprogrammable memory areas    (int *) 0x00000000,        // start of flash memory area1    (int *) 0x000003FF,        // flash end1    (int *) 0x00000410,        // start of flash memory area2//    (int *) RAM_vector,        // flash end2    (int *) (RAM_vector - 0x200),        // flash end2  TEST TEST    (int *) 0x00000000,        // start of new relocated vector table    NULL,                      // end of interrupt vector table (NULL means no relocation on CFV1)    FLASH_ERASE_PAGE,          // size of erase page    FLASH_WRITE_PAGE           // size of write page   };                     #endif//----------------------------------------------------------------------- 

 

 

also,  the project (when run in CW6.3) appears to not have the PE command files set up.  so when kicking off the debugger it does not know to erase and program the flash array.

 

Thanks!

 

Bob

 

0 Kudos
1,034 Views
TurboBob
Contributor IV

any ideas on Version_0 ?  I like the idea that the bootloader is protected,  so that there is much less chance (should be zero chance) that the unit can be rendered brain-dead when updating the software in the field.

 

 

Bob

0 Kudos