Hi,
I have an old Chinese JB16 I bought years ago and never got around to using, however I tried it recently again and had some trouble - if I try and connect to a target with UsbdmScript.exe I get "No BDM Tx routine was found".
It reports firmware 4.10.2 so I thought I would upgrade it, however when I run FirmwareChanger.exe it does not like the USBDM_JB16.s19 file, nor any of the .s19 files in that directory.
The error is "Flash image is invalid. File is incorrect or corrupt?". I traced this through the code but unfortunately extra information is hidden behind a logging #ifdef which I don't believe is on and I don't know how to rebuild the code.
It does load any other firmware file, although I note those are .sx rather than .s19, obviously I can't flash those on a JB16 though
I tried a wild stab in the dark copying USBDM_JB16.s19 to USBDM_JB16.sx but it wstill rejected it.
FWIW I have tested my setup with a newer JS16 unit and it works so if it's a write off it's no big deal but if possible I would like to fix it as a spare.
Thanks.
已解决! 转到解答。
Hi,
I was able to find an old witztronics (sp?) JB16 BDM.
This worked fine under Linux with a HCS12 target (programmer+memory dump). I was also able to update the firmware without any problems (to V4.10.0).
Under a Windows VM I was able to use the BDM with the HCS programmer and Memory Dump but the JB16_Boot-loader failed when doing the ICP reboot - the device failed to detect as a USB device. This was expected as described earlier.
So it doesn't look like you can upgrade under Windows.
I do not have an explanation for the JB_16 boot-loader problems with opening the firmware file. The auto-detect work OK for me and I was able to explicitly open a suitable firmware file from the JB16 firmware directory under both windows and Linux.
The above was with the current USBDM version.
bye
Hi,
I built the code under Linux and used JB16_Bootloader to flash it to both 4.10.0 and 4.10.2 but I get "Target BDM Enable failed" so I guess either the programmer is busted or incompatible.
My earlier comment about FirmwareChanger was wrong - I was confused by the error message and didn't realise it doesn't support JB16s (realised it after debugging how the s19 load process works..)
Thanks for your prompt and comprehensive reply, it has been very helpful, and thanks for maintaining the software!
Hi,
I was able to find an old witztronics (sp?) JB16 BDM.
This worked fine under Linux with a HCS12 target (programmer+memory dump). I was also able to update the firmware without any problems (to V4.10.0).
Under a Windows VM I was able to use the BDM with the HCS programmer and Memory Dump but the JB16_Boot-loader failed when doing the ICP reboot - the device failed to detect as a USB device. This was expected as described earlier.
So it doesn't look like you can upgrade under Windows.
I do not have an explanation for the JB_16 boot-loader problems with opening the firmware file. The auto-detect work OK for me and I was able to explicitly open a suitable firmware file from the JB16 firmware directory under both windows and Linux.
The above was with the current USBDM version.
bye
Hi, The first issue was that FirmwareUpdater.exe wouldn't load the .s19 file - it didn't even get to switching to ICP mode. I was trying it under a Windows VM (on OSX) but I'll try Linux VM and see but if I can't then in the bin it goes
Hi,
I'm sorry the JB16 version has been unsupported for a long while.
See comments here:
http://usbdm.sourceforge.net/USBDM_V4.12/html/index.html
Basically the bootloader that is built in to the chip doesn't meet the USB standards properly and doesn't work with Windows 7 onwards. Mind you I haven't tried it since then.
If I can find a JB16 BDM I will check this.
bye
Hello,
I also love TBDML because I started learning from MC9S12XD256. A while ago, I suddenly wanted to try making a TBDML, so I used TBDML_JB16-SOIC28 [Minimal]. pdf to complete the hardware. But I tested all the firmware and couldn't correctly install the drivers inside the sub folder of the USBDM_JB16-Distribution folder. I was planning to modify the VID&PID (modification date 12062008) corresponding to the driver in TBDML_JB16.abs.19, but I foolishly used ICP mode to upgrade USBDL_CF_JMxx ABS S19, from now on, JB16-PIN27 grounding can no longer activate ICP mode. I think it was based on MCU's s19 file that different ICP rewritten ICP's own Flash code space code? Can't ICP protect its own code space? This is a very magical process, and I am preparing to replace a JB16 to verify again. At the same time, I also want to know which driver (winXP) or win7 environment was used in the original TBDML. I am really confused! Thank you for maintaining these massive codes!
Thank you again!
Best Regards!
I have not used a JB16 for a very long time and remember little directly.
I have checked the reference manual and found that for the ROM monitor to be entered there are two possible methods:
1. If IRQ = VTST:
– External clock on OSC1 is 12MHz
– PTA3 = high
– PTE3 = high
2. If $FFFE & $FFFF is blank (contains $FF):
– External clock on OSC1 is 12MHz
– IRQ = VDD
– PTE3 = high
For the usual USB in-circuit-programming of the MC908JB16 option 2 is usual so it is necessary that the reset vector be erased (0xFFFF) so that the on-chip ROM monitor is active.
Since you have programmed the chip this will not be the case and ICP is not available.
Please refer to the reference manual:
Section: 9.4.1 Entering Monitor Mode
bye
Dear pgo,
I am trying to rebuild USBDM_JB16source in CW6.3 so that it can be used on USB3.0. I have released the line # include "TBDML_JB16. h"//TBDML - Minimum JB16 version - see TBDML_JB16_SOIC28.pdf in the Configure. h file.
Without any other changes occurring, make encountered the following situation:
Error : C20085: Not a valid constant
bdm.c line 2414
Error : C18101: Object is not a field
bdm.c line 2422
Error : C18110: Comma expected
bdm.c line 2422
Error : C18123: end of line expected
bdm.c line 2422
Error : C18101: Object is not a field
bdm.c line 2428
Error : C18110: Comma expected
bdm.c line 2428
Error : C18123: end of line expected
bdm.c line 2428
Error : C18101: Object is not a field
bdm.c line 2434
Error : C18110: Comma expected
bdm.c line 2434
Error : C18123: end of line expected
bdm.c line 2434
Error : C18101: Object is not a field
bdm.c line 2440
Error : C18110: Comma expected
bdm.c line 2440
Error : C18123: end of line expected
bdm.c line 2440
Error : C18101: Object is not a field
bdm.c line 2446
Error : C18110: Comma expected
bdm.c line 2446
Error : C18123: end of line expected
bdm.c line 2446
Error : C18101: Object is not a field
bdm.c line 2452
Error : C18110: Comma expected
bdm.c line 2452
Error : C18123: end of line expected
bdm.c line 2452
Error : C18101: Object is not a field
bdm.c line 2458
Error : C18110: Comma expected
bdm.c line 2458
Error : C18123: end of line expected
bdm.c line 2458
Error : C18000: Label not set
bdm.c line 2422
Error : Compile failed
Is it CW6.3 version incorrect? I want to know in which CW environment was this source program created? I tried to include some header files again, but this error is still pure! I am lost in myself!
Best regards!
//====================================
// Configure.h
//====================================
//=================================================================================
// Debugging options
//
#define DEBUG_COMMANDS (1<<0) // Debugging command interface
#define STACK_DEBUG (1<<1) // Measurement of stack size
#define ACK_DEBUG (1<<2) // Debug pin active during ACK code
#define SYNC_DEBUG (1<<3) // Debug pin active during SYNC code
#define RESET_DEBUG (1<<4) // Debug pin active during Reset sequence
#define CYCLE_DEBUG (1<<5) // Debug pin active during Vdd cycling
#define COMMAND_DEBUG (1<<6) // Use debug version of commandExec
#define DEBUG (DEBUG_COMMANDS|ACK_DEBUG|SYNC_DEBUG|RESET_DEBUG|COMMAND_DEBUG) // Change to enable some debugging code
//=====================================================================================
// Uncomment one of the following lines to choose a configuration
//
// If creating a new configuration copy one of the existing configurations (USBDM) to
// a new file and add below
//=====================================================================================
//#include "USBDM_JB16.h" // USBDM - Universal TBDML/OSBDM - see USBDM_JB16_SOIC.pdf
#include "TBDML_JB16.h" // TBDML - Minimal JB16 version - see TBDML_JB16_SOIC28.pdf
//#include "OSBDM_JB16.h" // OSBDM - Basic OSBDM hardware - see OSBDM.pdf schematic, 21/12/2005
//#include "WTBDM_JB16.h" // WTBDM08 - Wiztronics BDMS08 - see WTBDMS08.pdf schematic 27/6/2007
//#include "OSBDME_JB16.h" // OSBDM+E - OSBDM+Flash supply - see OSBDM08+e.pdf schematic, 30/12/2006
//#include "USBDM_JM60.h" // USBDM - Universal TBDML/OSBDM - see schematic provided
Dear pgo,
Thank you for your support! I have replaced the MCU and plan to test it again in the future (1 If IRQ=VTST: - External clock on OSC1 is 12MHz - PTA3=high - PTE3=high. I have found and tested the Winxp driver for TBDML_JB16. abs. s19&TBDML_JB16-SOIC28 [Minimum]. pdf, which can be downloaded using CW5.1 connection to XD256, and can also be used by WIN7. I am very happy! But it cannot be used on USB3.0 WIN7 and WIN10 systems. I tested the TBDML_. s19 generated by USBDM_JB16_V4_10 and downloaded it to TBDML_JB16_SOIC28 [Minimum]. pdf hardware. In the WIN7 environment, CW displayed the discovery of a bdm device, but CW5.1 indicated that it was not connected to the target board. I think maybe I didn't define the successful bdm signal pin or BDM * * * DLL version mismatch or other issues. I will continue to work hard to test with your support, and I believe I will succeed!
Best regards!