Microchip
直播中

李婷婷

7年用户 216经验值
私信 关注
[问答]

* .hconfig中的文件是做什么的?

在*.HCOFIG文件中,下面有“file”命令,例如“C:Microchip HyrnV2Y03BFrasegfxCONFIGGFX.HCOFIGG”“文件”是什么意思?“文件”命令具体做什么?“文件”命令的作用和作用?只有“file”命令将一个文件添加到项目中。这是对的吗?任何劝告使我高兴

以上来自于百度翻译


      以下为原文

     
In *.hconfig file  there is "file" command below for example ,"C:microchiphARMonyv2_03bframeworkgfxconfiggfx.hconfig"

...
...

ifblock USE_GFX_STACK
add "<#include "/framework/gfx/config/gfx_init.c.ftl">" to list SYSTEM_INIT_C_SYS_INItiALIZE_DRIVERS
add "<#include "/framework/gfx/config/gfx_tasks.c.ftl">" to list SYSTEM_TASKS_C_CALL_DRIVER_TASKS

file GFX_H "$HARMONY_VERSION_PATH/framework/gfx/hal/gfx.h" to "$PROJECT_HEADER_FILES/framework/gfx/hal/gfx.h"
file GFX_COLOR_H "$HARMONY_VERSION_PATH/framework/gfx/hal/inc/gfx_color.h" to "$PROJECT_HEADER_FILES/framework/gfx/hal/gfx_color.h"
file GFX_COMMON_H "$HARMONY_VERSION_PATH/framework/gfx/hal/inc/gfx_common.h" to "$PROJECT_HEADER_FILES/framework/gfx/hal/gfx_common.h"
file GFX_CONTEXT_H "$HARMONY_VERSION_PATH/framework/gfx/hal/inc/gfx_context.h" to "$PROJECT_HEADER_FILES/framework/gfx/hal/gfx_context.h"

...
...


What do you mean "file" ?
What "file" command do concretely ?
What role and function of " file" command ?

Only "file" command add a file to the project.   Is this right ?


Any advise make me pleased


ysaito

回帖(3)

于帅

2019-2-20 16:09:27
HI,文件命令基本上用来创建一个逻辑入口(符号链接)到目的目录。你可以看看。http://www. Microchip .com/DeiceOC/MPLAB %20Orger-%20配置器%20开发人员%20GuIDIDEV111 .PDFScript:“文件”& lt;文件名& gt;& lt;文件路径& gt;(to & lt;项目逻辑路径& gt;)[ [如果] & Ext&gt;]文件条目指定要添加到项目ST中的文件名。结构。文件的路径通常被添加到项目源搜索路径中。但是,如果指定了[ to & lt;Project文件路径& gt;],该文件被物理复制到项目逻辑路径结构中。TyHead文件/框架/驱动程序/UART/DRVUASUAR.H

以上来自于百度翻译


      以下为原文

    Hi,
file command is basically used to create a logical entry(symbolic link) to the destination directory.
 
Found the below MHC guide on net. you can have a look.
http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB%20Harmony%20Configurator%20Developers%20Guide_v111.pdf
 
Syntax:
"file" [to ] ["if" ]
The file entry specifies a file name to be added into the project structure. The path to the file is normally added to the project source search paths.
However, if the [to ] is specified, the file is physically copied into the project logical path structure.
Example:
file DRV_USART_H "$HARMONY_VERSION_PATH/framework/driver/usart/drv_usart.h" to
"$PROJECT_HEADER_FILES/framework/driver/usart/drv_usart.h
举报

张虎豹

2019-2-20 16:18:33
“添加”:在一个列表中添加内容,在需要向任何文件添加一些内容时最需要。“文件”:向项目添加逻辑链接,它不会复制或生成相应的文件到项目。“模板”:从模板(*.ftl)文件生成文件,并将该文件添加到项目位置。

以上来自于百度翻译


      以下为原文

    "add"  : Adds content to a list, mostly needed when you need to add some content to any file.
"file"   : Adds logical link to project, it will not copy or generate corresponding file to the project.
"template" : Generates file from a template(*.ftl) file and adds that file to the project location.
 
举报

王静

2019-2-20 16:26:46
亲爱的OpthuSukes和图腾非常感谢你的快速和极好的建议。我理解“file”命令。& & & gt;“Add”:将内容添加到一个列表中,在需要向任何文件添加一些内容时,大部分都是需要的。我有一个关于“Add”命令的问题。我在“C:Microchip HealthV2Y03BFrasegfxCONFIGGFX.HCOFIGG”中遇到了Bel-Add命令。Nb除以“/Frrase/GFx/COFIG/GFXII..C.FTL ”;“//初始化GFX硬件抽象层GFXIIALLIALIZE();在下面的GFXIIN .C.FTL中。但是我不能很清楚地找到“ClaseStimeSuthOnITyCySysSimulalIZEIZION驱动程序”。芯片和声 V2Y03B实用程序 MHC模板AppStaseSCOFIGStReSy.In.C.FTL“如果ListSyStaseSuthIntCySysSimialIsIZEL驱动程序是什么?”HasyClult& Gt&L.@ MHCLExpand清单列表= ListSythSooSynIncCySysIrimalIZIZEL驱动程序/GT;“list SythOnthInthCySysIrasialZeIsAuthJuffic”是上面的意思。还是其他地方存在一个列表?下面是SysLo.I.C.FTL。任何建议都会让人满意。

以上来自于百度翻译


      以下为原文

    Dear optimus_jack and Totem

 Thank you very much for quick and excellent advise.  I understand "file" command well.


>>"add"  : Adds content to a list, mostly needed when you need to add some content to any file.
I have one questions concerning "add" command.

I encountered bellow add command in  "C:microchipharmonyv2_03bframeworkgfxconfiggfx.hconfig".

...
...

ifblock USE_GFX_STACK
add "<#include "/framework/gfx/config/gfx_init.c.ftl">" to list SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS

...
...

It seems that  "<#include "/framework/gfx/config/gfx_init.c.ftl">" means
  // initialize the GFX hardware abstraction layer
    GFX_Initialize();
  in below gfx_init.c.ftl.

<#--
/*******************************************************************************
  GFX HGC Initialization File

  File Name:
    gfx_hgc_init.c

  Summary:
    This file contains source code necessary to initialize the system.

  Description:
    This file contains source code necessary to initialize the system. It
    implements the "SYS_Initialize" function, configuration bits, and allocates
    any necessary global system resources, such as the systemObjects structure
    that contains the object handles to all the MPLAB Harmony module objects in
    the system.
 *******************************************************************************/

/*******************************************************************************
Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).

You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
 *******************************************************************************/
 -->
 
    // initialize the GFX hardware abstraction layer
    GFX_Initialize();

<#--
/*******************************************************************************
 End of File
*/
-->


But I cannot find clearly "list SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS".
I found something like "list SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS" in
"C:microchipharmonyv2_03butilitiesmhctemplatesappsystem_configsystem_init.c.ftl"

Something is

<#if LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS/>

"list SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS"  means above.
Is this right ?
Or a list exists elsewhere ?

Below is system_init.c.ftl.
/*******************************************************************************
  System Initialization File

  File Name:
    system_init.c

  Summary:
    This file contains source code necessary to initialize the system.

  Description:
    This file contains source code necessary to initialize the system. It
    implements the "SYS_Initialize" function, defines the configuration bits,
    and allocates any necessary global system resources, such as the
    sysObj structure that contains the object handles to all the MPLAB Harmony
    module objects in the system.
 *******************************************************************************/

// DOM-IGNORE-BEGIN
/*******************************************************************************
Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).

You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
 *******************************************************************************/
// DOM-IGNORE-END

<#include "/utilities/mhc/templates/freemarker_functions.ftl">
// *****************************************************************************
// *****************************************************************************
// Section: Included Files
// *****************************************************************************
// *****************************************************************************

#include "system_config.h"
#include "system_definitions.h"


// ****************************************************************************
// ****************************************************************************
// Section: Configuration Bits
// ****************************************************************************
// ****************************************************************************
<#if LIST_SYSTEM_INIT_C_CONFIG_BITS_INITIALIZATION?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_CONFIG_BITS_INITIALIZATION/>

//

/*** DEVCFG0 ***/

<#if CONFIG_DEBUG?has_content>
#pragma config DEBUG = ${CONFIG_DEBUG}

<#if CONFIG_JTAGEN?has_content>
#pragma config JTAGEN = ${CONFIG_JTAGEN}

<#if CONFIG_ICESEL?has_content>
#pragma config ICESEL = ${CONFIG_ICESEL}

<#if CONFIG_TRCEN?has_content>
#pragma config TRCEN = ${CONFIG_TRCEN}

...
...
...
...

    /* Initialize Drivers */
<#if LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DEPENDENT_DRIVERS?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DEPENDENT_DRIVERS/>

 
 
 

<#if LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS?has_content> // <----------- Here !!
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_SYS_INITIALIZE_DRIVERS/> // <----------- Here !!
 
 
 


    /* Initialize System Services */
<#if LIST_SYSTEM_INIT_C_INITIALIZE_SYSTEM_SERVICES?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_INITIALIZE_SYSTEM_SERVICES/>


    /* Initialize Middleware */
<#if LIST_SYSTEM_INIT_C_INITIALIZE_MIDDLEWARE?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_INITIALIZE_MIDDLEWARE/>

<#if CONFIG_USE_SYS_INT == true && !CONFIG_USE_3RDPARTY_RTOS>

    /* Enable Global Interrupts */
    SYS_INT_Enable();


    /* Initialize the Application */
<#if LIST_SYSTEM_INIT_C_SYS_INITIALIZE_APP?has_content>
<@mhc_expand_list list=LIST_SYSTEM_INIT_C_SYS_INITIALIZE_APP/>

  <#if CONFIG_APP_IDX_0?has_content>
    ${CONFIG_APP_NAME_0?upper_case}_Initialize();
  <#else>
    App_Initialize();
  
  <#if CONFIG_APP_IDX_1?has_content>
  <#if CONFIG_APP_IDX_1 == true>
    ${CONFIG_APP_NAME_1?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_2 == true>
    ${CONFIG_APP_NAME_2?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_3 == true>
    ${CONFIG_APP_NAME_3?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_4 == true>
    ${CONFIG_APP_NAME_4?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_5 == true>
    ${CONFIG_APP_NAME_5?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_6 == true>
    ${CONFIG_APP_NAME_6?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_7 == true>
    ${CONFIG_APP_NAME_7?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_8 == true>
    ${CONFIG_APP_NAME_8?upper_case}_Initialize();
  
  <#if CONFIG_APP_IDX_9 == true>
    ${CONFIG_APP_NAME_9?upper_case}_Initialize();
  
  
  <#if CONFIG_USE_TEST_HARNESS == true>
    <#include "/framework/test/templates/system_init.c.call.ftl">
  
}


/*******************************************************************************
 End of File
*/




Any advice make pleased pleased.

ysaito
举报

更多回帖

发帖
×
20
完善资料,
赚取积分