MPLAB XC16 not generating .HEX file after successful build
It's only creating the .a because your project type is a static library, change the project type to be an Application and it will generate the hex file.