With the following inlcudes (and files located accordingly), I can do a full clean build and a fuull debug clean build without a problem:
- Code: Select all
#include "libs/TCPIP.h"
#include "max32/max32compiler.h"
#include "src/i2c_eeprom.h"
#include "src/stepper.h"
#include "src/i2c_memmap.h"
#include "commands.h"
#include <plib.h>
But.... if I change #include "commands.h" to #include "src/commands.h" as shown if will clean build but it fails doing a clean debug build (I moved the .c and .h files to src/ and changed the includes in the affected files themselves):
- Code: Select all
#include "libs/TCPIP.h"
#include "max32/max32compiler.h"
#include "src/i2c_eeprom.h"
#include "src/stepper.h"
#include "src/i2c_memmap.h"
#include "src/commands.h"
#include <plib.h>
Here is the error output from the clean and build for dugging the main project:
"/opt/microchip/xc32/v1.32/bin/xc32-gcc" -g -D__DEBUG -D__MPLAB_DEBUGGER_REAL_ICE=1 -fframe-base-loclist -x c -c -mprocessor=32MX795F512L -Ilegacy_demos -Ilibs -Imax32 -Isrc -Wall -MMD -MF build/default/debug/Main.o.d -o build/default/debug/Main.o Main.c
*** Error in `fixDeps': munmap_chunk(): invalid pointer: 0x084e4598 ***
make[2]: *** [build/default/debug/src/commands.o] Segmentation fault
make[2]: *** Deleting file 'build/default/debug/src/commands.o'
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:431: recipe for target 'build/default/debug/src/commands.o' failed
make[2]: Leaving directory '/home/dbishop/MPLABXProjects/XBF32saveme.X'
make[1]: Leaving directory `/home/dbishop/MPLABXProjects/XBF32saveme.X'
BUILD FAILED (exit value 2, total time: 8s)
Does anyone know if this is a Microchip bug or if it's something I am doing (or not doing)?