Jump to content
  • 0

MX7 Blink example problem


Zonan

Question

I am trying to load my first program on to my new MX7 chipkit pro.  I'm using the MX7_blink example written by Christian Fatu and Michele Yu.  Using MPLAB X IDE I am getting errors during debugging, undefined reference to 'PORTWrite' and undefined reference to 'PORTSetPinsDigitalOut'.  I am a rookie C coder, do these need to be declared as some type of functions above the main() ?   

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hello,

Indeed, this simple demo is issuing errors related to plb.

Plib used to be a set of peripheral functions that allowed easy access to microcontroller functionality. For example 

PORTWrite (PORT,  BIT);

was a simple way to set to digital 1 a pin of a specific port.

Looks like Microchip has removed Plib from their latest XC32 compilers.

So here some things that we can do:

- if you want to see this code running you should install an older version of MPLAB, like 2.35, available here: http://www.microchip.com/pagehandler/en-us/family/mplabx/

- I will try to find on this matter and let you know when we have more information.

Link to comment
Share on other sites

Cristian.Fatu thanks for this valuable information. I too am going in the plib direction with a code I got from

http://hades.mech.northwestern.edu/index.php/Using_the_LS7366R_SPI_Quadrature_Counter (See bottom of page)

These guys are using plib.h in a library to decode via SPI the infamous LS7366 Quadrature decoder. (no it's not infamous, It's a great chip actually, it's a fantastic chip!)

Except that the code listed include the plib.h file. And since I am implementing this chip for further use, might as well do things correctly and up to date. Furthermore, my beginners ability in C++ is leading me to a brick wall for which I will need help to go over. So here is the question: How can I elegantly implement the code without the outdated plib.h ?

Is there an updated version ? How would you do that ? What is the Microchip new way of replacing plib.h ?

Appreciate your help

Link to comment
Share on other sites

Thank you Tom for posting the link to the porting peripheral libraries to Harmony document. Indeed, Harmony seems to be the Microchip approach for replacing the old plib.

What you can also try to use is the Code Configurator, available in MPLAB X (Tools / Embedded / Code Configurator) http://www.microchip.com/pagehandler/en_us/devtools/code_configurator/home.html

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...