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
84,669 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
32,810 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,129 Views
bigmac
Specialist III

Hello, and welcome to the forum.


xiaolaba wrote:


We are having fresh try this bootloader on QT device, but the S19 file is not included. In order to see S19 file, used HC08 assembler tool by P&E to build but no success.


If your source code has been written to be compatible with CW assembler, you are very likely to get errors when you attempt to assemble using P&E assembler CASM08.  The two assemblers are not source code compatible with each other.

 

Within the CW files for the project, assuming the code assembles without error, search for a file with the extension .SX.  This is the S19 file.

 

Regards,

Mac

 

0 Kudos
1,128 Views
xiaolaba
Contributor I

hi Mac,

this is much helpful, but sadly, looks like no any *.sx around with this AN2295 source code around

perhaps the simple ways is to uses the CW software before hand.

 

thanks.

 

xiaolaba

0 Kudos
1,129 Views
bigmac
Specialist III

Hello xiaolaba,

 

There seems to be some confusion concerning which source code the .S19 file does represent.  I was assuming that you were referring to the application or user program that requires to be downloaded and programmed to flash memory by means of the already resident bootloader program.

 

In this instance, the .S19 or .SX file will be that associated with the application project, and not the bootloader project files.

 

Regards,

Mac

 

0 Kudos
1,129 Views
En
Contributor I

I am trying to use Bootloader in 128QE processor,

I followed this steps and bootloader does not response properly,

1) complied source project of 128qe with SCI 1 selection

2) Downloaded code on board

3) copied program (hc08sprg) into bin folder of the s19 file.

4) exicuted bootloading GUI software

5) selected source, (board is power off)

6) connected through COM1

7) power on board

8)FC command received ,

but after this either it shows no information about MCU

or starts calibration

 

Can anyone point out my mistecks..

 

Thank you

Regards,

 

0 Kudos
1,129 Views
En
Contributor I

 

 

I am able to solve above problem

 

I was loading wrong s19file and looking on wrong SCI port

 

Thank you

Regards,

 

 

0 Kudos
1,129 Views
TurboBob
Contributor IV

anyone heard from Pavel?  The beta has some bugs and I don't want to chase them if he has them fixed.

 

 

Bob

0 Kudos
1,129 Views
RogerSchaefer
Contributor III

Hi

I compiled the bootloader for the JM60-USB then installed the file hc08sprg-jm60-usb.abs.s19 using a USBDM.

 

I them plugged in a USB cable and was expecting that Windows would start the "New Hardware Found" routine but nothing at all happened.

 

What am I missing?

 

Roger Schaefer

0 Kudos
1,129 Views
TurboBob
Contributor IV

which version of the loader?

 

which cpu?  (this is the 8 bit forum,  but there is no AN2295 thread in the 32bit forum...)

 

Bob

0 Kudos
1,129 Views
RogerSchaefer
Contributor III

Hi Bob,

 

I'm using the latest version of AN2295 loader released a couple of months ago in this thread.

 

The cpu is MC9S08JM60

 

Roger

0 Kudos
1,129 Views
TurboBob
Contributor IV

what version/option/target did you compile?

 

Whats your crystal frequency?

 

Have you tried resetting it with the trigger button pressed (or whatever boot input you have set)?

 

B

0 Kudos
1,129 Views
RogerSchaefer
Contributor III

Hi Bob,

 

I compiled it just as it was without any changes.

The target board is a Firebird32 (9S08JM60 version)

http://www.firebird32.com/

 

I think that is a 12 MHz crystal giving a 24 MHz bus clock

 

Roger

0 Kudos
1,129 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Roger,

 

For the correct function of the USB bootloader on the JM60 is important push the button (native is set on the pin  PTGD3) before you connect the usb cable. When the button is pushed the firmware can enter to the bootloader mode and the device should be visible in PC.

If you need to change this pin due board compatibility is it possible in the source code.

 

Best regard,

Pavel

 

0 Kudos
1,129 Views
RogerSchaefer
Contributor III

Hi Pavel,

 

Thanks for reply.

 

I am using Firebird32 JM60 so there is no button but I put a jumper between PTG3 and GND and then connected the USB.  This time Windows found the new hardware and I installed the drivers (took a while to find them).

 

Then I ran your program and everything SEEMED to be all right but my program would not run after being loadied with win_hc08sprg.exe.  I went back to my USBDM and loaded the same program which worked fine.

 

Roger

 

 

0 Kudos
1,129 Views
TurboBob
Contributor IV
which target did you build in the bootloader? Bob
0 Kudos
1,129 Views
RogerSchaefer
Contributor III

I'm not sure I understand your question, Bob

 

There was a pull down box where I selected the 9S08JM family.

 

Roger

0 Kudos
1,129 Views
pavel_krenek
NXP Employee
NXP Employee

If you reconect the usb cable after bootloading procedure the program still is not running (without pushed button)?

0 Kudos
1,129 Views
RogerSchaefer
Contributor III

That is right.  My application program does not run after loading with the bootloader.

The application program is good; runs fine if loaded with BDM.

Below is copy of log that bootloader makes after S19 file is loaded:

 

Bootloader protocol version: 0x02 (S08, read command supported)
CRC protocol NOT supported)
Bootloader version string:
System device ID: 0x016 [MC9S08JM(16-60)] rev. 1
Number of memory blocks: 2
Memory block #1: 0x10B0-0x17FE
Memory block #2: 0x1960-0xE5BF
Erase block size: 512 bytes
Write block size:  64 bytes
Original vector table: 0xFFC0-0xFFFF
New vector table:      0xE5C0-0xE5FF

S19 Image Control.
Parsed S-record lines: 549  Bytes total: 17424
Source address range: 0x1960-0xFFFF


WARNING! S19 image will not fit into available memory (at address 0xFFBD)!

 

Roger

0 Kudos
1,129 Views
TurboBob
Contributor IV
it looks like your program is too large. Its not leaving space for the bootloader. The documentation for the AN2295 has some details regarding this. Memory space is the only restriction for AN2295, unlike some of the other bootloaders. Bob
0 Kudos
1,129 Views
RogerSchaefer
Contributor III

The MC9S08JM60 has 60K of flash memory;  my application is only 17K

Roger

 

 

0 Kudos
1,129 Views
TurboBob
Contributor IV

I can take a look at some of the files.

 

can you post your MAP file here,  or email it to bob(at)bailey-eng(dot)c0m ?  (pardon the obfuscation)

The file is in the bin folder I believe.

 

as far as which version did you build,  there is a targets tab in the project window,  you select the target based on the chip memory size and which 'version' of the loader you want to use.  I am using Version1 with some success,  but it needed some fixing.

 

I have not used the S08JM USB version,  but do have the CF51 version working.

 

Bob

 

 

0 Kudos
1,129 Views
TurboBob
Contributor IV

do you have a button on the boot input?

 

0 Kudos