简体   繁体   English

MPLAB中的文件类型mainp24f.c在哪里?

[英]Where is file type mainp24f.c in MPLAB?

I have just started (again!) Programming 16-bit Microcontrollers in C, Learning to Fly the PIC24 我刚刚(再次!)开始用C编程16位微控制器,学习如何使用PIC24

MPLAB has changed a bit since I last used it! 自上次使用以来,MPLAB发生了一些变化!

One of the first things I am meant to do is install the C30 or XC16 compiler. 我要做的第一件事就是安装C30或XC16编译器。 I installed the XC16 compiler and shortly later I am instructed as follows: 我安装了XC16编译器,不久后,我被指示如下:

From the MPLAB X main menu, select: File> NewFile... 从MPLAB X主菜单中,选择:File> NewFile...。

  1. Choose File Type: in the categories panel, expand the Microchip Embedded folder and click on the C30 compiler. 选择文件类型:在类别面板中,展开Microchip Embedded文件夹,然后单击C30编译器。 In the file types panel select the mainp24f.c type. 在文件类型面板中,选择mainp24f.c类型。

The only option is main.c 唯一的选择是main.c

I installed the C30 compiler from here ( https://www.microchip.com/development-tools/downloads-archive ) but still only see the main.c option. 我从此处( https://www.microchip.com/development-tools/downloads-archive )安装了C30编译器,但仍然只看到main.c选项。

What am I doing wrong? 我究竟做错了什么?

The book you linked is 6 years old, so it's very likely those instructions could be rendered out of date by new versions of the toolchains/IDE. 您链接的书已有6年的历史了,因此很可能新版本的工具链/ IDE会使这些说明过时。

It doesn't actually matter what your .c file is called. .c文件叫什么实际上并不重要。 As long as you have a main() function to enter. 只要您具有main()函数即可输入。 Using the "main.c" it gives you should be fine. 使用“ main.c”可以让您满意。

I would also recommend using XC16 if possible. 如果可能,我还建议使用XC16。 C30 is no longer updated and is now considered legacy C30不再更新,现在被认为是旧版

Use these code examples and user guides to get started with the 16-bit PIC devices. 使用这些代码示例和用户指南可以开始使用16位PIC器件。

MPLAB® XC16 User's Guide for Embedded Engineers: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en584558 《MPLAB®XC16嵌入式工程师用户指南》: http : //www.microchip.com/mymicrochip/filehandler.aspx? ddocname=en584558

MPLAB® XC16 User's Guide for Embedded Engineers Code Example: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en584564 《MPLAB®XC16嵌入式工程师用户指南》代码示例: http : //www.microchip.com/mymicrochip/filehandler.aspx? ddocname=en584564

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM