SAX Error - bloc - prog_flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SAX Error - bloc - prog_flash

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 06:02:23 MST 2010
I am using the LPC-Link to an EM-LPC1700 board.  I am using all the defaults but did include new files. I can compile fine.  I can download and debug the first time without any error messages and I can see the peripherals tab with info in it. However, from then on (until I exit and re-enter the IDE) I will get the following message boxes and the peripherals tab is empty.  The code seems to download and run correctly.

Does anyone know what the problem is or how to work around it?

--------------------------------------------------------------------------

The first message box

SAX Error:Attribute name "bloc" associated with an element type "prog_flash" must be followed by the '=' character. at Line:26, col1 in stream

along with a second message box with an error in "com.crt.utils" saying:


Attribute name "bloc" associated with an element type "prog_flash" must be followed by the ' = ' character.
Attribute name "bloc" associated with an element type "prog_flash" must be followed by the ' = ' character.
    <peripheralInstance id="WDT" derived_from="LPC1x_WDT" determined="infoFile"
     location="0x40000000">Watchdog Timer</peripheralInstance>
    <peripheralInstance id="UART1" derived_from="LPC1xxx_UART_MODEM" enable="SYSCTL.PCONP.PCUART1&amp;0x1" determined="infoFile"
     location="0x40010000">UART</peripheralInstance>
    <peripheralInstance id="UART3" derived_from="LPC1xxx_UART" enable="SYSCTL.PCONP.PCAURT3&amp;0x1" determined="infoFile"
     location="0x4009C000">UART</peripheralInstance>
    <peripheralInstance id="UART2" derived_from="LPC1xxx_UART" enable="SYSCTL.PCONP.PCUART2&amp;0x1" determined="infoFile"
     location="0x40098000">UART</peripheralInstance>
    <peripheralInstance id="UART0" derived_from="LPC1xxx_UART" enable="SYSCTL.PCONP.PCUART0&amp;0x1" determined="infoFile"
     location="0x4000C000">UART</peripheralInstance>
    <peripheralInstance id="USBCLKCTL" derived_from="LPC17_USB_CLK_CTL" determined="infoFile"
     location="0x5000CFF4">USB Clock Control (you need to have set PCONP.PCUSB to write these registers)</peripheralInstance>
    <peripheralInstance id="USBINTSTAT" derived_from="LPC17_USBINTST" enable="USBCLKCTL.USBClkCtrl&amp;0x12" determined="infoFile"
     location="0x400FC1C0">USB Interrupt Status  (You need to set PCONP.PCUSB and the USBCLKCTL bits to access this)</peripheralInstance>
    <peripheralInstance id="FLASHACCEL" derived_from="LPC17_FLASHCFG" determined="infoFile"
     location="0x400FC000">Flash Accelerator Configuration register</peripheralInstance>
    <peripheralInstance id="GPIOINTMAP" derived_from="GPIO_INT" determined="infoFile"
     location="0x40028080">GPIO Interrupt Register Map</peripheralInstance>
   </chip>
   <link href="file:///C:/nxp/lpcxpresso_3.5/bin/nxp_lpcxxxx_peripheral.xme" type="simple" show="embed" />
   <processor determined="detected">
    <name rev="r0p0" ID="410FC200" gcc_name="cortex-m3">CM3</name>
    <family>Cortex-M</family>
  <regFormat id="xPSR" gdb_name="cpsr" special="PSR" description="xPSR contains the 3 main status register for the core: APSR, IPSR, and EPSR">
   <fieldFormat id="N_flag" type="toggle" offset="[31]" on="N" off="n" description="The N flag is for negative or less-than"/>
   <fieldFormat id="Z_flag" type="toggle" offset="[30]" on="Z" off="z" description="The Z flag is for zero result"/>
   <fieldFormat id="C_flag" type="toggle" offset="[29]" on="C" off="c" description="The C flag is for carry or borrow"/>
   <fieldFormat id="V_flag" type="toggle" offset="[28]" on="V" off="v" description="The V flag is for overflow"/>
   <fieldFormat id="Q_flag" type="toggle" offset="[27]" on="Q" off="q" description="The Q flag is sticky from SSAT/USAT on saturation"/>
   <fieldFormat id="Thumb_bit" type="toggle" offset="[24]" on="Thumb" off="invalid" description="The Thumb bit must always be set. If 0, it is an invalid state and will fault."/>
   <fieldFormat id="IPSR" type="mixed" offset="[8:0]" enum="Base,,NMI,HardFault,MemManage,BusFault,UsageFault,,,,SVCall,Debug,,PendSV,SysTick" description="The IPSR field contains the current ISR for fault or IRQ, or 0 if at Base (no interrupt)"/>
   <fieldFormat id="ICI_IT_high" type="value" offset="[26:25]" description="The ICI_IT field contains the current/saved state of an IT or interrupted LDM/STM"/>
   <fieldFormat id="ICI_IT_low" type="value" offset="[15:10]" description="The ICI_IT field contains the current/saved state of an IT or interrupted LDM/STM"/>
  </regFormat>
  <regFormat name="Flags" special="PSR_TEXT" description="The Flags text line shows the APSR flag bits along with the T bit if not set"/>
  <regFormat name="EPSR" special="PSR_TEXT" description="The EPSR register contains the current/saved state of an IT or interrupted LDM/STM"/>
  <regFormat name="IPSR" special="PSR_TEXT" description="The IPSR register contains the current ISR for fault or IRQ, or 0 if at Base (no interrupt)"/>
  <regFormat id="PSP" name="PSP" description="PSP (process stack) is currently selected as SP when IPSR=0."/>
  <regFormat id="MSP" name="MSP" description="MSP (main stack, used for interrupts) is currently selected as SP when IPSR=0."/>
  <regFormat id="CONTROL" name="CONTROL" description="CONTROL bits only apply when at base level (IPSR=0) indicates privilege level and which stack is used.">
   <fieldFormat id="Privilege" type="toggle" offset="[0]" off="Privileged" on="User" description="Privilege level for a thread is either privileged (all) or user (limited)"/>
   <fieldFormat id="Stack" type="toggle" offset="[1]" on="PSP" off="MSP" description="Stack indicates which is being used by SP (PSP or MSP)"/>
  </regFormat>
  <regFormat id="BASEPRI" name="BasePri" description="BASEPRI is a mask of interrupts by priority when not 0. No interrupt with a larger or equal priority will activate">
   <fieldFormat id="basepri" type="value" offset="[7:0]" description="BASEPRI is a mask of interrupts by priority when not 0. No interrupt with a larger or equal priority will activate"/>
  </regFormat>
  <regFormat id="PRIMASK" name="PriMask" description="PRIMASK disables all normal interrupts and faults if true">
   <fieldFormat id="primask" type="toggle" offset="[0]" on="enabled" off="disabled" description="PRIMASK disables all normal interrupts and faults if true" />
  </regFormat>
  <regFormat id="FAULTMASK" name="FaultMsk" description="FAULTMASK disables all interrupts and HardFault if true (only NMI and Reset are possible)">
   <fieldFormat id="faultmask" type="toggle" offset="[0]" on="enabled" off="disabled" description="FAULTMASK disables all interrupts and HardFault if true (only NMI and Reset are possible)" />
  </regFormat>
  <regFormat id="CYCLE" name="Cycle" special="CYCLE" description="CYCLE indicates the number of cycles executed since reset"/>
  <regFormat id="CYCLEDELTA" name="CycleDelta" special="CYCLEDELTA" description="CYCLEDELTA indicates the number of cycles executed since the last start"/>
  <regFormat name="CFSR" special="FAULT" description="CFSR is the set of fault bits from the last fault (setting 1 clears)"/>
  <regFormat name="Faults" special="FAULT_TEXT" description="Faults is a list of faults by name (from the CFSR)"/>
  <regFormat name="BFAR" special="FAULT" description="BFAR is the Bus fault precise address, if a precise data bus fault has occurred"/>
  <regFormat name="MFAR" special="FAULT" description="MFAR is the MPU fault address, if an MPU data fault has occurred"/>
  <regFormat name="VECTPC" special="FAULT" description="VECTPC is the PC pre-empted by an event caught by vector-catch"/>
   </processor>
   <emulator type="SWD">
    <vendor>Other</vendor>
    <name>Code Red WinUSB emulator support for Cortex-M3</name>
    <instance index="0">T1S6RGRIA</instance>
    <speed fastestKHz="6000" slowestKHz="50" step="12000/(speed*2)" speed="1" delay="0" determined="test">3000KHz</speed>
   </emulator>
  </info>
  </infoList>


The product info shows:

Product: LPCXpresso
Version: v3.5.0 (201009010753)
Operating system: Windows XP
VM: Java HotSpot(TM) Client VM (32 bit)

License type: FULL

Plugins and versions:
- com.crt.advproject (3.5.0.201009010753)
- com.crt.config (3.5.0.201009010753)
- com.crt.ctrlcenter (3.5.0.201009010753)
- com.crt.debugmgr (3.5.0.201009010753)
- com.crt.docs (3.0.10.201009010753)
- com.crt.lite (3.5.0.201009010753)
- com.crt.lite.brand (3.5.0.201009010753)
- com.crt.quickstart (3.5.0.201009010753)
- com.crt.redtracepreview (3.5.0.201009010753)
- com.crt.trueview (3.5.0.201009010753)
- com.crt.utils (3.5.0.201009010753)
- com.crt.vendor.nxp.a7 (3.5.0.201009010753)
- com.crt.vendor.nxp.lpc11 (3.5.0.201009010753)
- com.crt.vendor.nxp.lpc13 (3.5.0.201009010753)
- com.crt.vendor.nxp.lpc17 (3.5.0.201009010753)
- com.crt.vendor.nxp.lpc29 (3.5.0.201009010753)
- com.crt.vendor.nxp.lpc31 (3.5.0.201009010753)

Product: LPCXpresso
Version: v3.5.0 (201009010753)
Operating system: Windows XP
VM: Java HotSpot(TM) Client VM (32 bit)
About: LPCXpresso:
Version: {0}
Check versions at: http://support.code-red-tech.com/CodeRedWiki/VersionInfo
0 Kudos
15 Replies

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Thu Oct 07 03:45:48 MST 2010
To clarify:
Open the IDE.
First time debug works without any SAX errors, flash loads ok and debugs fine (stepping, register window, watch window, and peripheral window all work).
Second, third, etc. time debug will always cause SAX errors, flash seems to load ok, and debug (stepping, register window and watch window) works but Peripheral tab is empty (closing it and reopening it does not cause anything to appear.
This happens with the example projects and with my own project.
As well, there is an 'lpcxpresso.exe' task left running sometimes but I can't get a correlation on when.

I will email support as you requested.

Thanks for the help so far.
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Oct 07 00:27:49 MST 2010
Just to clarify:

Are you saying that sometimes you can debug successfully and sometimes you get these SAX errors? If so, is there any pattern to when it works vs when it doesn't?

As you can probably tell, we are struggling to understand this issue, and it hasn't been reported before.

I suggest you contact our support group directly and we can then try to progress this more quickly. Use the "email:support" link on this page:
http://www.code-red-tech.com/contact.php

Thanks
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 14:40:53 MST 2010
I received the same SAX errors about 'bloc' and 'prog_flash'.  In the debug file the last one is the one that has the error.  I noticed it looks cut off.
I have not changed any of the network settings or packet sizes.
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 14:20:04 MST 2010
Can you say exactly what errors you got with these runs?

Also, this might seem like a strange question, but have you modified any registry entries to do with networking, winsock, and/or packet sizes?
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 13:08:15 MST 2010
Attached is the debug file produced on a good and bad run after rebooting.

One thing I noticed is that after I exited eclipse there were a number (8) of the lpcxpresso.exe tasks running in the task list. I killed all of them and then I received a "program too large for license" error so I rebooted and ran the tests again but got the same result which is in the attached debug.zip file.
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 10:01:54 MST 2010
Hi,

Sorry, that hasn't helped identify the issue.

So, could you try this for me.

Exit LPCXpresso
Open a command window and run the following commands:
cd <lpcxpresso_install_dir>/eclipse
set MICommandData=debug.log
lpcxpresso
This will start the IDE and will create a log of some activities.
Now start a debug session, to recreate the problem you have reported.
After the error has occured. exit LPCXPresso and post the debug.log file that has been created.

Thanks
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 08:27:19 MST 2010
I finally managed to get it to connect after a number of failures. I had to get in and out of the IDE and catch it at just the right time.  I attached the output in a zip file.
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 08:10:08 MST 2010
Sorry, we'll get there eventually... You need to ensure that LPC-Link is connected and booted, and then use these commands instead:
target extended-remote | crt_emu_cm3_nxp -mi -2 -pLPC1768 -wire=hid
mon info,all
quit


Note the addition of "-wire=hid" to the first command. If that doesn't work, try "-wire=winusb" instead.
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 08:06:24 MST 2010
I added the Drivers\RedCode+\i386 to the LPCXpresso.cmd file to get the dll.

I ran two cmd prompts one with
crt_emu_lpc11_13_nxp.exe -mi -2 -pLPC1768 -server=:8001

and the other with
arm-none-eabi-gdb
>target extended-remote :8001

I get the following output on the crt_emu_lpc11_13 window:
C:\nxp\lpcxpresso_3.5>crt_emu_lpc11_13_nxp.exe -mi -2 -pLPC1768 -server=:8001
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1768.xml
Nc: Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_direct
ory.xml
Nc: Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.
xml
Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device

however, the LPC-link is not in use (I am not running the IDE and I unplugged and replugged the USB cable)
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 07:50:50 MST 2010
I am getting the following error.  I tried it both with and without the IDE running.

C:\nxp\lpcxpresso_3.5>arm-none-eabi-gdb
GNU gdb (Red Suite 2010Q1 by Code Red) 7.0.50.20100218-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-mingw32 --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.code-red-tech.com/support/bugs.html>.
(gdb) target remote | crt_emu_cm3_nxp -mi -2 -pLPC1768
Remote debugging using | crt_emu_cm3_nxp -mi -2 -pLPC1768
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:37:18)
Et: Failed emulator initialization: E(xx). FTDI driver load/install error: ftd2x
x.dll
Remote communication error: No error.
(gdb)


I did try and catch the initial console output but was not successful at getting the last part (it keeps clearing the console and I can't find where to stop that).

LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:37:18)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1768.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
XML Warning from file C:/nxp/lpcxpresso_3.5/bin/nxp_lpc17xx.xme: Unknown attribute package
NXP: LPC1768  Part ID: 0x26013F37
Connected: was_reset=false. was_stopped=true
v Registered license, download limit of 128K
Writing 16964 bytes to 0000 in Flash (assumed clock: 72.0MHz)
(more but I can't tell what it is)
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 07:31:06 MST 2010
Sorry, I gave the instructions for Red Suite instead of LPCXpresso - but you seem to have sussed that!

The first command you enter into gdb should be exactly as I typed it. To repeat:
target extended-remote | crt_emu_cm3_nxp -mi -2 -pLPC1768
mon info,all
quit
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 07:24:24 MST 2010
I don't have a c:\code_red directory.  I do have a c:\nxp\lpcxpresso_3.5 directory.

I can't find a RedSuite3Path.cmd but did find an LPCXpressoPath.cmd to run.
I did try the commands in a prompt, assuming the ones after the arm-none-eabi-gdb were gdb commands, but the target extended-remote needed a serial device and I don't know what port LPC-Link would be.

I am using XP Pro SP 3
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 07:04:11 MST 2010
To help us understand this issue, can you run the following commands from the command line and cut and paste ALL of the output into a text file and attach it to your reply?

c:\code_red\RedSuite3_3.5\RedSuite3Path.cmd
arm-none-eabi-gdb
target extended-remote | crt_emu_cm3_nxp -mi -2 -pLPC1768
mon info,all
quit

Also, which version of XP are you running?

Thanks
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jd7 on Wed Oct 06 06:41:02 MST 2010
Hi,
I am using an LPC1768FBD100.  I do see the "LPC1768" on the bottom right of the IDE.
Thanks
0 Kudos

735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Oct 06 06:28:19 MST 2010
Hi,

Can you tell us which LPC part you are using?

Thanks
0 Kudos