Enabling Debug Printf on Template Project

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Enabling Debug Printf on Template Project

1,749件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Fri Jun 03 04:47:59 MST 2011
Hi, I'm using lpcxpresso1114

I'm trying to create template project with using smart import wizard. However, when I marked the debug printf option I get this error;

Dependent project lib_small_printf_m0 not found

lib_small_printf_m0 can be found in examples bundle on the LPC11 family.

I checked for file "lib_small_printf_m0" in the workspace but it was already there.

What can cause this problem?
0 件の賞賛
返信
7 返答(返信)

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Jun 04 22:06:33 MST 2011
Next time scroll a bit down when creating a message.
There is a button "manage attachments" and clicking that button allows you to add a .txt file of 19 kB or even a 1 MB .zip file.

In that way there will be no conversion problems copy/pasting and your message stays readable.

Rob
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Fri Jun 03 23:30:59 MST 2011

Quote: CodeRedSupport
Sorry splitting the xml up like that makes it unusable (you could have just ZIPed it up and attached it to your post instead).

However I just tried importing the examples in[FONT=Courier New][SIZE=1] NXP_LPCXpresso1114-301_2011-01-27.zip[/SIZE][/FONT] into LPCXpresso 3.6.3, and then using the Smart Import Wizard to create a new project that uses the debug_printf library that NXP provide in those examples. I encounter no problems in doing this

I suggest that in first place, you ensure that you are using the latest version of LPCXpresso and also of NXP's example bundle.

Regards,
CodeRedSupport



Ok, after a few trial I found the problem is me :S I realize that to use smart import examlpe projects of what we will use in project must have been imported before. Thanks CodeRedSupport for helping.

P.S.: And sorry for splitting the xml =)
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jun 03 10:15:01 MST 2011

Quote: furkan.yuksel
I did not modify the xml file which came with "lpcxpresso.examples.lpc1114.301.zip".

Here is the code in xml file(I could not send all of it in one message):


Sorry splitting the xml up like that makes it unusable (you could have just ZIPed it up and attached it to your post instead).

However I just tried importing the examples in[FONT=Courier New][SIZE=1] NXP_LPCXpresso1114-301_2011-01-27.zip[/SIZE][/FONT] into LPCXpresso 3.6.3, and then using the Smart Import Wizard to create a new project that uses the debug_printf library that NXP provide in those examples. I encounter no problems in doing this

I suggest that in first place, you ensure that you are using the latest version of LPCXpresso and also of NXP's example bundle.

Regards,
CodeRedSupport
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Fri Jun 03 05:52:20 MST 2011
<import src="[B]../common/[/B]"  dest="[B]driver[/B]">     <include>{type.h}</include>

   </import>

  - <if test="[B]${enaCRP}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{crp.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaADC}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{adc.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaCAN}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{can.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaClkConfig}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{clkconfig.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaDebugPrintf}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{debug_printf.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaGPIO}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{gpio.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaI2C}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{i2c.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaI2CSlave}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{i2cslave.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaSWU}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{lpc_swu.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaROMCAN}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{rom_drivers.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaROMCAN}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{rom_driver_CAN.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaRS485}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{rs485.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaSGPIO}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{small_gpio.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaSSP}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{ssp.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaT16}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{timer16.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaT32}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{timer32.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaUART}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{uart.(c|s|h)}</include>

   </import>


   </if>


  - <if test="[B]${enaWDT}=true[/B]">
   - <import src="[B]../common/driver[/B]"  dest="[B]driver[/B]">
     <include>{wdt.(c|s|h)}</include>

   </import>


   </if>


    <import src="[B]../common/linker[/B]"  dest="[B]linker[/B]" />

    <import src="[B]src[/B]" dest="[B]src[/B]" /> 

  - <import src="[B]../common/cmsis[/B]"  dest="[B]cmsis[/B]">
   <!-- <setting id="compiler.opt" buildType="Debug" path="startup"> <value>-O2</value> <value>-OS</value> </setting>   -->  
   </import>


  - <settings>
   - <setting id="[B]compiler.inc[/B]">
     <value>${MacroStart}workspace_loc:/${PARAM_project}/cmsis${MacroEnd}</value> 

    <value>${MacroStart}workspace_loc:/${PARAM_project}/config${MacroEnd}</value> 

    <value>${MacroStart}workspace_loc:/${PARAM_project}/startup${MacroEnd}</value> 

    <value>${MacroStart}workspace_loc:/${PARAM_project}/driver${MacroEnd}</value> 

   </setting>


  - <if test="[B]${enaDebugPrintf}=true[/B]">
   - <setting id="[B]compiler.inc[/B]">
     <value>${MacroStart}workspace_loc:/lib_small_printf_m0/inc${MacroEnd}</value> 

   </setting>


  - <setting id="[B]linker.libs[/B]">
     <value>lib_small_printf_m0</value>

   </setting>


  - <setting id="[B]linker.paths[/B]">
     <value>${MacroStart}workspace_loc:/lib_small_printf_m0/Lib${MacroEnd}</value> 

   </setting>


   </if>


  - <setting id="[B]compiler.def[/B]">
     <value>TARGET_SHORTCHIP=${shortChip}</value>

    <value>TARGET_CHIP=${PARAM_chip}</value>

    <value>__USE_CMSIS=1</value>

   </setting>


  - <setting id="[B]assembler.c.header[/B]">
     <value>Redlib</value>

   </setting>


  - <setting id="[B]compiler.c.header[/B]">
     <value>Redlib</value>

   </setting>


  - <setting id="[B]compiler.opt[/B]"  buildType="[B]Debug[/B]">
     <value>-O0</value>

   </setting>


  - <setting id="[B]compiler.opt[/B]"  buildType="[B]Release[/B]">
     <value>-O2</value>

    <value>-OS</value>

   </setting>


  - <setting id="[B]linker.library.type[/B]">
     <value>Redlib (semihost)</value>

   </setting>


   </settings>


   </script>
   </project>
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Fri Jun 03 05:49:38 MST 2011
<!-- <settings> <setting id="compiler.opt" buildType="Debug" path="startup"> <value>-O2</value> <value>-OS</value> </setting> </settings>   -->  
   </import>


  - <import src="[B]config[/B]"  dest="[B]config[/B]">
     <include>{driver_config.h}</include>

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_CRP\s+)\d+[/B]" replace="[B]$1${enaCRP?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_ADC\s+)\d+[/B]" replace="[B]$1${enaADC?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_CAN\s+)\d+[/B]" replace="[B]$1${enaCAN?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_CLKCONFIG\s+)\d+[/B]" replace="[B]$1${enaClkConfig?1:0}[/B]" />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_PRINTF\s+)\d+[/B]" replace="[B]$1${enaDebugPrintf?1:0}[/B]" />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_GPIO\s+)\d+[/B]" replace="[B]$1${enaGPIO?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_I2C\s+)\d+[/B]" replace="[B]$1${enaI2C?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_I2CSLAVE\s+)\d+[/B]" replace="[B]$1${enaI2CSlave?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_SWUART\s+)\d+[/B]" replace="[B]$1${enaSWU?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_ROMCAN\s+)\d+[/B]" replace="[B]$1${enaROMCAN?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_RS485\s+)\d+[/B]" replace="[B]$1${enaRS485?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_SMALLGPIO\s+)\d+[/B]" replace="[B]$1${enaSGPIO?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_SSP\s+)\d+[/B]" replace="[B]$1${enaSSP?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_TIMER16\s+)\d+[/B]" replace="[B]$1${enaT16?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_TIMER32\s+)\d+[/B]" replace="[B]$1${enaT32?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_UART\s+)\d+[/B]" replace="[B]$1${enaUART?1:0}[/B]"  />

    <grep pattern="[B](CONFIG_ENABLE_DRIVER_WDT\s+)\d+[/B]" replace="[B]$1${enaWDT?1:0}[/B]"  />

    <include>{target_config.h}</include>

   </import>


  - <import src="[B]config[/B]"  dest="[B]config[/B]">
     <include>{system_LPC11xx.h}</include>

    <grep pattern="[B](SYSPLLCLKSEL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$1${useCrystal?0x00000001:0x00000000}[/B]" />

  - <if test="[B]${pllSetting}=Off[/B]">
     <grep pattern="[B](MAINCLKSEL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$10x00000001[/B]"  />

   </if>


  - <if test="[B]${pllSetting}=1[/B]">
     <grep pattern="[B](SYSPLLCTRL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$10x00000060[/B]"  />

   </if>


  - <if test="[B]${pllSetting}=2[/B]">
     <grep pattern="[B](SYSPLLCTRL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$10x00000041[/B]"  />

   </if>


  - <if test="[B]${pllSetting}=3[/B]">
     <grep pattern="[B](SYSPLLCTRL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$10x00000042[/B]"  />

   </if>


  - <if test="[B]${pllSetting}=4[/B]">
     <grep pattern="[B](SYSPLLCTRL_Val\s+)[0-9a-fA-Fx]+[/B]" replace="[B]$10x00000023[/B]"  />

   </if>


   </import>


  -
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Fri Jun 03 05:45:32 MST 2011
I did not modify the xml file which came with "lpcxpresso.examples.lpc1114.301.zip".

Here is the code in xml file(I could not send all of it in one message):

- <project xmlns:xi="[B]http://www.w3.org/2001/XInclude[/B]"  type="[B]Basic C project[/B]" name="[B]${PARAM_project}[/B]"  chip="[B]${PARAM_chip}[/B]" vendor="[B]${PARAM_vendor}[/B]">
  - <!--  define the default chip and vendor    -->  
    <parameter name="[B]PARAM_default_vendor[/B]"  value="[B]NXP[/B]" mode="[B]hidden[/B]" />

    <parameter name="[B]PARAM_default_chip[/B]"  value="[B]LPC1114/301[/B]" mode="[B]hidden[/B]" />

    <parameter name="[B]useCMSIS[/B]"  value="[B]true[/B]" mode="[B]hidden[/B]" />

    <parameter name="[B]userSource[/B]"  value="[B]src[/B]" mode="[B]hidden[/B]" />

- <!--  Standard parameters visible to the user   -->  
    <parameter description="[B]Select options for this  project[/B]" type="[B]Title[/B]" /> 

    <parameter name="[B]useCrystal[/B]"  description="[B]Enable crystal oscillator[/B]" tip="[B]An external  crystal must be present for the part to start. Timing will be more  precise[/B]" type="[B]Checkbox[/B]"  value="[B]true[/B]" />

    <parameter name="[B]pllSetting[/B]"  description="[B]PLL Multiplier:[/B]" value="[B]4,1,2,3,Off[/B]"  type="[B]combo[/B]" tip="[B]Double-check settings. Invalid  settings can disable reprogramming except via ISP[/B]" />

    <parameter description="[B]Drivers, page 1[/B]" type="[B]page[/B]" /> 

    <parameter name="[B]enaCRP[/B]"  description="[B]Enable CRP setup[/B]" type="[B]Checkbox[/B]"  value="[B]true[/B]" tip="[B]CRP settings can be changed in  config/driver_config.h[/B]" /> 

    <parameter name="[B]enaADC[/B]"  description="[B]Enable ADC driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes ADC driver in your new  project[/B]" />

    <parameter name="[B]enaCAN[/B]"  description="[B]Enable CAN driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes CAN driver in your new  project[/B]" />

    <parameter name="[B]enaClkConfig[/B]"  description="[B]Enable ClkConfig driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes Clock Configuration driver  in your new project.[/B]" /> 

    <parameter name="[B]enaDebugPrintf[/B]"  description="[B]Enable debug printf[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes debug printf in your new  project. You need lib_small_printf_m0 in your project.[/B]" />

    <parameter name="[B]enaGPIO[/B]"  description="[B]Enable GPIO driver[/B]" type="[B]Checkbox[/B]"  value="[B]true[/B]" tip="[B]Includes GPIO driver in your new  project.[/B]" />

    <parameter name="[B]enaI2C[/B]"  description="[B]Enable I2C master driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes I2C Master driver in your  new project.[/B]" />

    <parameter name="[B]enaI2CSlave[/B]"  description="[B]Enable I2C slave driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes I2C Slave driver in your  new project.[/B]" />

    <parameter type="[B]endPage[/B]" /> 

    <parameter description="[B]Drivers, page 2[/B]" type="[B]page[/B]" /> 

    <parameter name="[B]enaSWU[/B]"  description="[B]Enable software UART driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes Software UART driver in  your new project.[/B]" /> 

    <parameter name="[B]enaROMCAN[/B]"  description="[B]Enable on-chip CAN driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes hooks to ROM CAN driver in  your new project.[/B]" /> 

    <parameter name="[B]enaRS485[/B]"  description="[B]Enable RS485 driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes RS485 driver in your new  project.[/B]" />

    <parameter name="[B]enaSGPIO[/B]"  description="[B]Enable small GPIO driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes an alternate small GPIO  driver in your new project.[/B]" /> 

    <parameter name="[B]enaSSP[/B]"  description="[B]Enable SSP/SPI driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes an SSP driver in your new  project.[/B]" />

    <parameter name="[B]enaT16[/B]"  description="[B]Enable 16-bit timer driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes a 16-bit Timer driver in  your new project.[/B]" /> 

    <parameter name="[B]enaT32[/B]"  description="[B]Enable 32-bit timer driver[/B]" type="[B]Checkbox[/B]"  value="[B]true[/B]" tip="[B]Includes a 32-bit Timer driver in  your new project.[/B]" /> 

    <parameter name="[B]enaUART[/B]"  description="[B]Enable UART driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes a UART driver in your new  project.[/B]" />

    <parameter name="[B]enaWDT[/B]"  description="[B]Enable watchdog timer  driver[/B]" type="[B]Checkbox[/B]"  value="[B]false[/B]" tip="[B]Includes a Watchdog Timer driver in  your new project.[/B]" /> 

    <parameter type="[B]endPage[/B]" /> 

- <!--  Constant parameters (not displayed to user)   -->  
- <!--  shorthand for chipname (1st 5 characters, converted to lowercase)   -->  
    <parameter name="[B]shortChip[/B]"  value="[B]${PARAM_chip@0,5,tolower}[/B]" mode="[B]hidden[/B]" /> 

    <parameter name="[B]startup[/B]"  value="[B]${PARAM_chip@0,5,tolower}[/B]" mode="[B]hidden[/B]" /> 

    <parameter name="[B]CMSIS_Version[/B]"  value="[B]CMSISv1p30_LPC11xx[/B]" mode="[B]hidden[/B]" /> 

  - <script>
   - <if test="[B]${enaDebugPrintf}=true[/B]">
   - <requires msg="[B]lib_small_printf_m0 can be found in the examples bundle for  the ${shortChip} family[/B]">
     <value>lib_small_printf_m0</value>

   </requires>


   </if>


  - <import src="[B]${WIZARD_HOME}/System/NXP/lpc11/Common[/B]" dest="[B]startup[/B]">
     <include>{cr_startup_${startup}.(c|s|h)}</include>
0 件の賞賛
返信

1,717件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jun 03 05:25:32 MST 2011
Hard to say without seeing your actual xml script. Are you modifying the [FONT=Courier New][SIZE=1]lpc11xx_template.xml[/SIZE][/FONT] that NXP provide in their LPC11xx examples?

Anyway, I suggest that you post the xml script that you are importing via the smart import wizard for us to take a look at.

Regards,
CodeRedSupport
0 件の賞賛
返信