spel-uchile / SUCHAI

SUCHAI Cubesat flight software
GNU Lesser General Public License v3.0
20 stars 5 forks source link

Build SUCHAI project #25

Closed osqzss closed 7 years ago

osqzss commented 7 years ago

Which versions of the MPLAB X IDE and XC16 compiler are required to build the SUCHAI project with the FreeRTOS and legacy PIC24 peripheral library?

joseogalde commented 7 years ago

I recently build the project with MPLAB X IDE v3.30, XC16 v1.24 and programed to a PIC24FJ256GA110. The version 1.26 of the XC16 compiler didn't work for me.

osqzss commented 7 years ago

The project has been built successfully with the tools that you mentioned. Thank you. Another quick question. I'm wondering which peripheral device is used for "printf" function and where it is specified.

carlgonz commented 7 years ago

We're using the UART1 module. For the PIC24 I defined the mon_putc function in main.c line 143. At the end, printf internally call mon_putc. See: https://github.com/spel-uchile/SUCHAI/blob/3d88d9bd2087b6a5a49a2679c8ac0b97544706cd/main.c#L143

osqzss commented 7 years ago

Thanks for the tip. Now I can understand that you override the write() function in libc. That's a neat hack.

carlgonz commented 7 years ago

You're welcome!