Generate hex file using existing code in MPLAB X

Thread Starter

roshan7505

Joined Feb 24, 2021
6
Dear All,

I'm trying to do a webcam kind of device using PIC32MZ2048EFM064 and this is the example I'm trying to do. I found the circuit and code in this example but I'm facing one problem that I don't know how to use this code in MPLAB X and make a hex from this. I searched everywhere but didn't find the solution So, finally came here. Please someone help me to figure out this problem and tell me how can I make it work, debug and generate hex from this code.



Thanks & Regards,

Roshan
 

Attachments

LesJones

Joined Jan 8, 2017
3,523
I have not used MPLABX for compiling "C" code (As I find "C" too complicated.) but with assembler you click on the production option on the top line. I normally select the clean build option from the drop down box. I think this will be the same for "C" as when you create a new project you will have told it that you are compiling a "C" source and you will have told it the development board or programming hardware you will be using. When you have compiled the code click on the green right arrow on the next to top line and this should write the .HEX cod to the chip. You should find the documentation for MPLABX in the directory (Folder) where you installed it.

Les.
 

AlbertHall

Joined Jun 4, 2014
11,534
Create a new project for the processor type.
Copy the source files into the project folder.
Add the source files to the project.
Then you can build the project which will produce the hex file.
 

Thread Starter

roshan7505

Joined Feb 24, 2021
6
Create a new project for the processor type.
Copy the source files into the project folder.
Add the source files to the project.
Then you can build the project which will produce the hex file.
I didn't find the "processor type" while creating project
 

LesJones

Joined Jan 8, 2017
3,523
Which version of MPLABX are you using. I tries selecting PIC32MZ2048EFM064 with version 5.30 and received a message "Install PIC32MZ-EF DFP 1.3.58". It did not complain using version 5.40 (On another computer.)

Les.
 

Thread Starter

roshan7505

Joined Feb 24, 2021
6
Create a new project for the processor type.
Copy the source files into the project folder.
Add the source files to the project.
Then you can build the project which will produce the hex file.
While creating project I get several options like harmony, standard, mplab ide etc which have to choose here and continue?forum.PNG
 
Hi, it looks like it's a Harmony project. MPLABx 5.3 uses the v3 framework, which is aimed at programming PIC(pic32xx) and AVR(sam) microcontrollers .
I would try to build an empty (standalone) project and copy the files into the right place. If all is ok, the build (hammer and broom icon) will generate the .hex file.
I tried to open the folder as a mplabx project and the IDE did not recognize it
Personally, I have given up on programming pic32 microcontrollers. I currently work with the STM32 ecosystem, it's friendlier
Regards
 

Thread Starter

roshan7505

Joined Feb 24, 2021
6
Hi, There are thousands of files (including library files) (1) how do put these files, If put direct folders, is there any option to include folders to project.

(2) where should I put these files?, there are 2000+ .h files, around 100 .c files and one .s file. I collected all files, I put all .h files in header files and all .c and .s file in source file. And while building it's shows error that some files are missing.
 
Top