MPLAB X IDE code clean & build

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
I've been working with MPLAB X IDE v5.35 for a while now, and have finally gotten used to its, let's say unusual, environment.

I haven't upgraded it to a more recent version because this was the last version that includes the MPASM assembler. I intend to eventually upgrade to the new assembler in the near future, but that's another story.

Anyway, I have two questions:
  1. What's the difference between "building" a project, and "cleaning and building" it? ... and I mean other than hygienic.
  2. I'm having some trouble debugging a subroutine that is supposed to match a string received through the serial port (and stored in ram) against one received through the UART. Is there a way to simulate the procedure?
 

Ya’akov

Joined Jan 27, 2019
9,068
“Clean“ is like “make clean” when using a makefile. It removes all the output from a previous build so it won’t reuse files that were generated by it.

Sorry to say I can be of no help on your second question.
 

atferrari

Joined Jan 6, 2004
4,764
For each micro you should check what peripheral may be simulated. I never did peripheral simulations.

MCHP insists on doing "simulations" on real hardware situation.
 

nsaspook

Joined Aug 27, 2009
13,079
Make and makefiles are extremely useful in larger software projects with lots of files. I often keep individual function build dates embedded (during the build process that uses 'Make') in the C headers for various device modules used in a project to track software modifications.

C:
// main.c
static const char *build_date = __DATE__, *build_time = __TIME__;

// bmx160.c
static const char *build_date = __DATE__, *build_time = __TIME__;
// code
void bmx160_version(void)
{
    printf("\r--- BMX160 Driver Version  %s %s %s ---\r\n", BMX160_DRIVER, build_date, build_time);
}

// mcp2210.c
static const char *build_date = __DATE__, *build_time = __TIME__;
Each data-time is a static const var that gets set during that source file recompile.

Just Build:
PXL_20220820_021809860.jpg

Build Clean:
PXL_20220820_022007735.jpg
 
Last edited:

MIS42N

Joined Jan 25, 2013
22
Some PIC processors, compile for debugging, program the processor with say a PICkit3, then run the code on the processor in real time with check points, memory maps, etc. I didn't know how to get the right timing for UARTS in the simulator, then I found I could do it live so didn't look further.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I've been working with MPLAB X IDE v5.35 for a while now, and have finally gotten used to its, let's say unusual, environment.
I am faced with the same issue due to V 8.92 not supporting the later pic's,
Did you find any support or instructional that helped in the transition to MPASM X ?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
Did you find any support or instructional that helped in the transition to MPASM X ?
Not sure what you mean. I didn't start working with Microchip's products until about 4 years ago. And during that time they "upgraded" their assembly in such a way that made my code incompatible with their later version. Their changes in syntax and structure are so significant that I've been waiting until proper translation tools (perhaps by a third party?) become available before taking the leap.
 
Last edited:

MaxHeadRoom

Joined Jul 18, 2013
28,617
I still use the original MPLAB IDE 8.92, which was aimed totally for assembly programming. MPASM.
When Microchip went to the X version, they started moving away from ease of assembly and began mainly concentrating on C.
The reason I am having to try and get familiar with using the V5.35 X is that I need to use one of the latest pic's that has a feature previous versions did not have, so IDE 8.92 does not support it.
Anything after X ver 5.35 changed the MPASM approach completely.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
I still use the original MPLAB IDE 8.92, which was aimed totally for assembly programming. MPASM.
When Microchip went to the X version, they started moving away from ease of assembly and began mainly concentrating on C.
The reason I am having to try and get familiar with using the V5.35 X is that I need to use one of the latest pic's that has a feature previous versions did not have, so IDE 8.92 does not support it.
Anything after X ver 5.35 changed the MPASM approach completely.
I have in my to-do list the task of learning Microchip's new assembly format and syntax. And possibly find or write a tool to help translate my old code to the newer version. But that's going to happen only in my next simple project. That way I can get started without compromising my work.
 

Sensacell

Joined Jun 19, 2012
3,432
I still use the original MPLAB IDE 8.92, which was aimed totally for assembly programming. MPASM.
When Microchip went to the X version, they started moving away from ease of assembly and began mainly concentrating on C.
The reason I am having to try and get familiar with using the V5.35 X is that I need to use one of the latest pic's that has a feature previous versions did not have, so IDE 8.92 does not support it.
Anything after X ver 5.35 changed the MPASM approach completely.
Had the same troubles, I feel like Microchip dumped me in a drainage ditch and drove away laughing.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I have in my to-do list the task of learning Microchip's new assembly format and syntax. And possibly find or write a tool to help translate my old code to the newer version. But that's going to happen only in my next simple project. That way I can get started without compromising my work.
Do you have a copy of the MP-MASM 8.92?
If your IC is within the scope of this version I would use this pgm. over any of the others.
 
Top