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,617 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,758 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,428 Views
RogerSchaefer
Contributor III

There is a reset button on the board.

Makes no difference.

 

Roger

0 Kudos
1,427 Views
TurboBob
Contributor IV

the bootloader requires an input to make it run.  The input needs to be grounded when the unit is reset.

 

also,  the current version has several "targets"  so you need to look to see which is selected.

 

The current version does not flash in when I use the debug button,  I think its an issue with the Codewarrior project files.

 

Run the software in the debugger,  reset it and see where its executing,  and also make sure its really loaded into the cpu.

 

(I use the P&E Multilink,  not the OSBDM,  so I can't help you with its details)

 

B

0 Kudos
1,426 Views
Contrebrak
Contributor I

Hello,

 

I would like to report an error in the datasheet concerning the vector redirection on MC9S08QE16 and MC9S08QE32 micros:

the NVOPT.FNORED bit allows redirection when '0' according to the datasheet (that bit doesn't exist for the MC9S08QE64->128 micros, redirection is always allowed)

 

The AN2295 applies to the MC9S08QE64, MC9S08QE96 and MC9S08QE128 micros but I have adapted the source code for the MC9S08QE32. And the vector redirection works only when I program NVOPT.FNORED = 1.

 

Processor Expert for the user application code is harmonised with the datasheet, so the Vector redirection option must also be set to No for the redirection to be activated.

 

Another point: I have noticed that the redirection is performed by the hc08sprg.exe: he detects the 0xFFC0 address in the S19 file and transforms it to 0xFBA0 ( if 1 kB protected for example) when downloading the user code. That means that the Interrupt vector table address must be left at 0xFFC0 in Processor Expert (user code in general). I am a novice at Bootloader so it is maybe obvious but I don't find it intuitive, I think it should be mentionned in the Application Note (possible I haven't read properly).

 

Best regards,

 

Jeremy

0 Kudos
1,428 Views
ok2ucx
Contributor IV

Yes, there's a difference:

  • sub 64kB (non-paged) QE devices do have vector relocation (FNORED bit in FOPT/NVOPT is set to zero)
  • while paged ones do not have this feature. There's no redirection of that kind. AN2295 bootloader uses the same technique as with older HC08 devices - a new separate jump table is created on the top of unprotected Flash memory - it is also being discussed in https://community.freescale.com/thread/37575.

[where's the documentation bug? QE32 reference manual describes FNORED, QE128 does not]

 

Actually - QE32 bootloader is already available thru latest 9.2.1 update patch: http://www.freescale.com/files/community_files/8BITCOMM/hc08sprg-update-9.2.1.exe.zip (listed also few pages back), no need to make modifications yourself.

 

In any case, AN2295 finally goes to release 10 (will include Kinetis, ColdFire V1 and some more Windows based applications) - document is aleady updated, final package is being tested these days and will be placed on the official web pages soon.

 

Just wondering if we shoudl use this forums for some beta testing of the whole package. Anyone interested??

 

Pavel

 

P.S. Regarding the vector redirection vs. Processor Expert. Your observations are right - you need to leave interrupt vectors at their original positions (typically between 0xFFC0 and 0xFFFF). hc08sprg PC application handles them according to the values reported by embedded an2295 bootloader and then relocates them (in run-time) to a new interrupt vector table location and using appropriate method (it is tied to "protocol version"). It either just moves all vectors (is they really need to be relocated) or remakes them into a jump-table - 3 bytes for each int. vector (8-bit) or 4 bytes for CFV1.

 

0 Kudos
1,428 Views
Contrebrak
Contributor I

Thanks for your quick reply.

 

It's funny had had adapted the QE128 source code for my QE32 and I needed to invert FNORED bit to '1' for my application interrupts to run correctly. That's why I thought there was a bug in the documentation

I have tried this new version for QE32 and I don't have any issue with the FNORED bit anymore. I don't know what I didn't deal correctly. Anyway.

 

 

Thanks a lot

 

0 Kudos
1,428 Views
TurboBob
Contributor IV

ok2ucx wrote:

 

Just wondering if we shoudl use this forums for some beta testing of the whole package. Anyone interested??

 

Pavel


 


 

 

 

 

yes

0 Kudos
1,428 Views
ok2ucx
Contributor IV

Okay, will do so :robotvery-happy:

 

Pavel

0 Kudos
1,428 Views
TurboBob
Contributor IV

Would like to look at the beta version.

 

Is it posted?

 

Bob

0 Kudos
1,428 Views
pavel_krenek
NXP Employee
NXP Employee
Developer’s Serial Bootloader for M68HC08, HCS08, ColdFire and Kinetis MCUs - CF and KINETIS support added 

 

Dears,

software and documentation for Application note AN2295 (Developer’s Serial Bootloader for M68HC08, HCS08, ColdFire, and Kinetis MCUs) has been updated recently. Since the last rev. 9.2 (Aug-2009) several additions and enhancements has been done:

  • ColdFire V1 family added
  • Kinetis family added
  • S08AC family added
  • MC1323x family added
  • S08SV16 family added
  • hc08sprg.exe master updated
  • new Windows GUI application added win_hc08sprg.exe
  • new Universal S19 file merge tool added (updating of application S19 files) win_blsrconv.exe
  • all projects updated for CodeWarrior 6.3
  • all projects for KINETIS updated for IAR 6.21
  • Kinetis support checksum feature

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: AC, AW, DZ, EL/SL, GB/GT(A), JM, JM(USB), LC, LH, LL, QD, QE, QG, RC/RD/RE/RG, SC, SE, SH, SV, SR, MC13233

 

ColdFire V1 families supported: AC, CN, EM, JM, JM(USB), QE

 

KINETIS families supported: K60, K53, K50, K40, K30, K20, K10

 

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

Direct download link is here:

 

Updated software pack:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN2295SW_BETA.exe

 

Updated documentation:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN2295_BETA.pdf

 

 

 



Best regards,

 

Pavel Krenek & Petr Gargulak,
Freescale Czech Republic
AN2295 Developers

0 Kudos
1,428 Views
Ruds
Contributor I

Dear Sir,

I am using cortex m4(k60) for downloading program to flash from your universal bootloader.

When I connect my board from universal bootloader software it is detecting and showing all informations as shown below

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

Kinetis Package: 144-pin .
Number of memory blocks: 1
Memory block #1: 0x00004400-0x0007FFFF
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: 19 Bytes total: 3708
Source address range: 0x0000-0x149B


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

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

 

but my problem is because of warning I got I am not able to download code to my target.

Please tell anyone tell me why S19 image will not fit for my target board , as it has more space?

Please tell me how I can go ahead with it......

 

Thankyou so much for your help.....

 

0 Kudos
1,428 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Ruds,

 

First of all, you must modify start address of your project. I mean update your project which you would like to bootload using S19 file. Main reason of this modification is presence of the bootloader between address (roughly 0x0000000 - > 0x00001000) and also flash protection of this block of memory (bootloader).

 

- move ROM start address to minimal address value 0x00004000

 

example in LCF file:

define symbol _ICFEDIT_region_ROM_start__ = 0x00004000;

 

- rebuilt and generate new s19 file (with moved address)

 

0 Kudos
1,428 Views
david_g
Contributor I

Hi,

I'm trying to use this bootloader with Kinetis K60 tower Kit. Could you  tell me how to change LCF (in codewarrior 10.2)? I tried to modified this way:

 

MEMORY {
interrupts (RX) : ORIGIN = 0x00004000, LENGTH = 0x000001E0
code (RX) : ORIGIN = 0x00004400, LENGTH = 0x0007FFFF
data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
# cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}

 

but it doesn't work. I would appreciate any help. Thank you very much.

 

David

0 Kudos
1,428 Views
Klayton
Contributor III

David,

I am trying to use the bootloader with an Kinetis K10 on one of my boards and have run into trouble compiling it in Codewarrior.  I am fairly new at this and the compiler breaks on some of the IAR specific keywords such as __no_init and __root.  Was there a trick you used to get past this?  I can't find equivalent keywords for the Kinetis processor that do what those do.  I have looked throught the pragmas and have come up empty.  I am by no means a code guy so forgive my ignorance. I feel like if I can get this ported over and compiled in code warrior I will have won.  Any help is greatly appreciated.

 

Thanks!

 

Klayton

0 Kudos
1,428 Views
pavel_krenek
NXP Employee
NXP Employee

Developer’s Serial Bootloader for M68HC08, HCS08, ColdFire and 
Kinetis MCUs - KINETIS support updated 

 

Dears,

software and documentation for Application note AN2295 (Developer’s Serial Bootloader for M68HC08, HCS08, ColdFire, and Kinetis MCUs) has been updated on the Freescale web pages.

 

New update of AN2295 rev.11 includes:


  • Master application hc08sprg.exe 
  • Windows GUI application win_hc08sprg.exe
  • Universal S19 file merge tool (updating of application S19 files) win_blsrconv.exe

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: AC, AW, DZ, EL/SL, GB/GT(A), JM, JM(USB), LC, LH, LL, QD, QE, QG, RC/RD/RE/RG, SC, SE, SH, SV, SR, MC13233, PT

 

ColdFire V1 families supported: AC, CN, EM, JM, JM(USB), QE

 

KINETIS families supported: K70, K60, K53, K50, K40, K30, K20, K10

 

Any comments, reports, suggestions or wishes are more than welcome. 

 

Updated software pack & updated documentation is available on Freescale web pages (www.freescale.com).

 

 



Best regards,

 

Freescale Czech Republic
AN2295 Developers

0 Kudos
1,428 Views
xiaolaba
Contributor I

hello sir,

we are using these update with QT devices, it is working good.

further looking that possibility of porting JW32-USB to use with JB8 device.

0 Kudos
1,428 Views
pavel_krenek
NXP Employee
NXP Employee

Hi,

 

I think the issue should be only with the size of the USB stack. This will be limitation with the using of the bootloader on the JB8. What is the typical size of the source code what you are using?

 

 

Best regards,

Pavel

 

0 Kudos
1,428 Views
xiaolaba
Contributor I

Hello Pavel,

thanks for teply.

the JB8 device and used memory of existing project is about 1.5K, no big deal but a headache when remote upgrade is required.

anyway, there has problem but off topic to this thread but reading or linking to.

this forum has totally changed outline. when we try to see email notice & direct link to this thread, it is blocked by authentication. however, serach this thread via google, it is ok and login success. Anyone experienced this issue or just my login problem?

authentication.PNG

best regards,

xiaolaba

0 Kudos
1,428 Views
mancbs06
Contributor I

Hi, anybody has tested AN2295_Rev.11 with MCF51AC256B ?
I compiled it with CW 6.3 selecting Target= MCF51AC256B SCI1, so if it's correct the speed is 9600baud on serial line 1.
Now if I connect the MCU with win_hc08sprg (v.10.0.9.0$) at 9600 it's says: ...received 0xfe (off-key).Wrong calibrate response (0xfe, must be 0xfc). Target is not calibrated.
If I try with 14400baud it's says:smileyhappy:...received 0xfc (good). ERROR! Unknown protocol version: [0x09]! Check AN2295SW for update! Can't read MCU info. Could be protocol error.

Where is the problem?

Thanks in advance.
Manuel.

0 Kudos
1,428 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Manuel,

It looks like a bad trim value in register MCGTRM, maybe it depends on the version of silicon. Could you check it?

0 Kudos
1,428 Views
David_g1
Contributor I

Hi,

I have tested it with a simple flash led application and It works fine!

But I have a question. I have also tested it with an application where I have ot use the same uart that bootlader use to get new firmware. It doesn't work. 

 

New firmware works fine if I execute ii directly on my tower K60. DFU seems to be ok too, because my application blinks a led on startup, as it must do. But there are no characters TX or RX.

 

Any idea? I think bootloader leaves the MCU with a configuration that prevents my application to use UART3

 

just for information, I'm using processor expert. and codewarrior 10.2

 

Thank you very much.

 

David.

0 Kudos
1,428 Views
David_g1
Contributor I

Well, I have solve this issue by changing LCF file like this:

 

MEMORY {
interrupts (RX) : ORIGIN = 0x00004000, LENGTH = 0x000001E0
code (RX) : ORIGIN = 0x00004400, LENGTH = 0x0007FBF0
data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}

 

(with processor expert and CW10.2)

 

instead of 

 

MEMORY {
interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E0
code (RX) : ORIGIN = 0x00004400, LENGTH = 0x0007FBF0
data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}

 

win_hc08sprg shows this message: "The S19 image also contains redirected vectors. The automatic redirection is skipped now." and everything works fine.

 

I don't know if this issue was my fault or there is a bug in the automatic redirection of vectors.

 

Thanks, regards

 

David

 

 

 

0 Kudos