已解决! 转到解答。
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
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
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
Yes, there's a difference:
[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.
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
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:
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
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.....
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)
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
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
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:
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
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
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?
best regards,
xiaolaba
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...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.
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.
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