Microchip
直播中

吴思锋

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

如何在我的ASM项目中使用汇编程序源模板

当我创建一个新的ASM项目,然后开始添加源文件,当我右击“Source”文件夹=>;“New”我获得两个选项,“pic_8b_..asm”和“pic_8b_..asm”然而,如果我查看MPLAB X菜单“Tools=>Temp.”并展开“Assembler”文件夹,我可以看到四个模板fi。LES上市。使用这个模板管理器面板,我可以创建和编辑模板。但是我似乎不知道如何从列表中添加模板到我的项目中。此外,我还为每个PIC设备找到了更多的模板文件,比如atC:Program Files(x86)Micro.MPLABXv3.35mpasmxtemplates等等。低是选择这些模板之一,我似乎不能使这项工作。MPLAB X具有所有这些整洁的东西,而且似乎无法从IDE访问。IDE中是否有一些设置允许我指向这些文件夹,然后将这些模板拉到我的项目中?谢谢你的热情

以上来自于百度翻译


      以下为原文

    When I create a new ASM project, and then start adding a source file when I right click the 'Source' folder => 'New' I get two choices, 'pic_8b_general.asm' and 'pic_8b_simple.asm'

However if I look at MPLAB X menu 'Tools=>Templates' and expand the 'Assembler' folder I can see four template files listed.  Using this Template Manager panel I can create and edit templates.  But I can't seem to figure out how to add a template from this list to my project.

Furthermore I found more template files for each PIC device at C:Program Files (x86)MicrochipMPLABXv3.35mpasmxtemplates

So I have been searching around for how to make the IDE either point to these locations or allow be to choose one of these templates and I can't seem to make this work.  MPLAB X has all this neat stuff and it seems to be inaccessible from the IDE.  Is there some setting in the IDE that would allow me to point to these folders and then pull these templates into my projects?

Thanks in advance
David

回帖(2)

tijing忽忽

2019-7-18 12:54:06
当您从“文件”菜单选项中选择“新建文件”时,您将看到要从中选择的模板列表(显示在Tools=>Temp.选项窗口中显示的列表)。要使用未显示的内容,必须(据我所知)打开原始文件,然后保存到项目文件夹中的新文件,然后添加到项目源文件列表中。我不知道有什么更顺畅的办法,也许别人会这么做。

以上来自于百度翻译


      以下为原文

   
When you select "New File" from the File menu option you are presented with the list of templates to choose from (shows the list that is shown in the Tools=>Templates option window). To use something not shown you have to (as far as I know) open the original file and then save to a new file in your project folder then add to your project source file list. I do not know of a smoother way to do this, maybe someone else does.
举报

王境滨

2019-7-18 13:08:48
我使用的每个PIC/dsPIC都有一个ASM模板。当我启动一个新项目时,我将适当的模板复制到为该项目创建的文件夹中。因此,当我右键单击SOURCE选项(在左侧菜单上)时,源文件就在那里。请记住,如果您使用的是ASM30或XC16编译汇编源文件具有.s扩展名。以防万一,请检查dsPIC30F4013 ASM模板的线程:http://www..hip.com/for./m943063.aspx?树= TreIE,在那里你可以找到C语言中的代码和汇编语言中的相同代码。

以上来自于百度翻译


      以下为原文

    I have an ASM template for each PIC/dsPIC I work with.
When I start a new project I copy the appropriate template into the folder created for the project.
So when I right click on the SOURCE option (on the menu at the left) the source file is there.
Remember that if you are using ASM30 or XC16 compilers the assembly source files has the .s extension.
 
Just in case, check this thread for a dsPIC30F4013 ASM template:
 
http://www.microchip.com/forums/m943063.aspx?tree=true
 
There you find a code in C language and the same code in Assembly language.
举报

更多回帖

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