Report as Inappropriate

You are reporting a comment on Filament Width Sensor Prototype Version 3 as a violation of the Thingiverse Terms of Service. Thank you for taking the time to bring this matter to our attention. To help our team best respond to this issue please take a few moments to describe what brought this matter to your attention.

Dec 22, 2016 - Modified Dec 22, 2016

I've built the device and am trying to flash it but I keep getting errors when trying to flash.
I am using CodeWarrior for MCU, Version: 10.7 Build Id:160721.
I am doing the following steps:
1) Select Flash File to Target
2) Create New Connection profile
a) Name "USBDM"
b) Template - None
c) Target - New
d) Create new connection
d.1) Name - Filament_Sensor_Board
d.2) Template - None
d.3) Target Type - MC9S08GB32
e) Preferred BDM - USBDM JB16-0001 v 4.10.2
f) Target Vdd Supply - Off
g) Connection Control - Automatically reconnect
h) Internal Clock Trim - Disabled
I) Security Options - Default unsecured configuration
J) Erase Options - No erase done

I then initiate the flash and the console log is as follows:
/=== CodeWarrior GDI protocol log ===
GDI DLL: C:\Freescale\CW MCU v10.7\MCU\bin\Plugins\Debugger\protocols....\support\hc08\gdi\usbdm-gdi-hcs08.4.dll
CPU: MC9S08GB32

GDI: DiGdiOpen()
GDI: => DI_OK
GDI: DiGdiGetFeatures()
GDI: => DI_OK
GDI: Identification: USBDM HCS08, Version: 1.2.6, MeeAvailable: false, NrCpusAvailable: 1
GDI: DiGdiAddCallBack(cb_type = 0x4000)
GDI: => DI_OK
GDI: DiGdiInitIO()

/=============================================
USBDM GDI Version 4.12.1.130
/=============================================
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.setTargetVdd, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.cycleTargetVddOnReset, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.cycleTargetVddOnConnect, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.leaveTargetPowered, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.maskInterrupt, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.automaticReconnect, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.useResetSignal, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.usePSTSignals, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.useAltBDMClock, Value : 255, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.connectionSpeed, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.powerOffDuration, Value : 1000, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.powerOnRecoveryInterval, Value : 1000, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.resetDuration, Value : 500, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.resetReleaseInterval, Value : 500, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.resetRecoveryInterval, Value : 500, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.defaultBdmSerialNumber, Value : USBDM JB16-0001, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : com.freescale.cdt.debug.cw.CW_SHADOWED_PREF.HC08 Debugger.processor, Value : MC9S08GB32, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.trimTargetClock, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.eraseMethod, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : net.sourceforge.usbdm.connections.usbdm.securityOption, Value : 2, R) => DI_OK

I then get a message box stating:

/---------------------------
USBDM - Target Connection Failure
/---------------------------
Enabling BDM interface on target failed.
The target may be secured.
(Use stand-alone programmer to mass erase if necessary)

Please cycle power to the target.

Retry connection?
/---------------------------
Yes No
/---------------------------

I power cycle the board and click continue after which the log shows:
targetConnect(): Target is secured

And a message box appears stating:

Device appears to be secure and may only be programmed after a mass erase which completely erases the device.
Mass erase device?

I select Yes and the console displays:

Performing target initialization ...
Device MC9S08GB32_FLASH
Erasing .............
Erase Command Succeeded.
Device MC9S08GB32_FLASH
cmdwin::fl::write
/-------------------------
Flash Operation. ...
Auto-detection is successful.
File is of type Elf Format.

Device MC9S08GB32_FLASH
Programming ....

And then another dialog box:
/---------------------------
USBDM - Target Connection Failure
/---------------------------
Enabling BDM interface on target failed.
The target may be secured.
(Use stand-alone programmer to mass erase if necessary)

Please cycle power to the target.

Retry connection?
/---------------------------
Yes No
/---------------------------

Again I power cycle the board and click Yes at which the console displays:

Error: Program Command Failed. Operation timeout. Security area should not be programmed with a value that leads to irreversible secure
. Protect violation error. Error in command sequence.

What am I doing wrong? I am pretty proficient with Arduino flashing but I have no experience with these boards.

Thanks for reading.