How do I set the Oscillator module in a DSPIC33E?
Sometimes there is a problem with a linker file or include file.  In any case, the syntax you are trying to use doesn't allow for good commenting on what exactly each of the settings means, and gives no indication at all of what other options might have been that you didn't chose.

I always set the config bits in assembler source, and document each bit.  Below is a section from one of my current projects using the 33EP512GM604, which is almost the same chip.  This section is always re-written for each project, and would have to be carefully inspected if the project was moved to a different part.  I'm therefore not that bothered by the fixed starting location, although that wasn't my first choice.  I vaguely remember that I ran into some linker problem using the pre-defined directives, so set the address and started writing program memory words myself.  Either way, the point is how each bit is carefully documented, what was chosen, and some idea of what other choices might have been.


;*******************************************************************************
;
;   Static processor configuration settings.
;
.section .configbits, code, address(0x557EC)

         .pword  0xFFFFFF    ;reserved
         .pword  0xFFFFFF    ;reserved

         .pword  0b111111111111111111001111 ;FICD
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------1------- reserved, must be set to 1
                 ; -----------------1------ unused
                 ; ------------------0----- disable JTAG
                 ; -------------------0---- reserved, must be set to 0
                 ; --------------------1--- reserved, must be set to 1
                 ; ---------------------1-- unused
                 ; ----------------------11 ICD interface uses PGEC1/PGED1

         .pword  0b111111111111111100111111 ;FPOR
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------00------ WDT window is 75% of period
                 ; ------------------1----- IIC2 uses SDA2/SCL2 pins
                 ; -------------------1---- IIC1 users SDA1/SCL1 pins
                 ; --------------------1--- enable brownout reset
                 ; ---------------------111 unused

         .pword  0b111111111111111101111111 ;FWDT
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------0------- WDT not always enabled
                 ; -----------------1------ WDT in non-window mode
                 ; ------------------1----- enable PLL lock
                 ; -------------------1---- WDT prescalser 128, not 32
                 ; --------------------1111 WDT postscaler to max of 32768

         .pword  0b111111111111111101011110 ;FOSC
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------01------ clock switching enabled, failsafe clk disabled
                 ; ------------------0----- allow multiple PPS changes
                 ; -------------------11--- unused
                 ; ---------------------1-- not used with external crystal oscillator
                 ; ----------------------10 primary oscillator mode is HS

         .pword  0b111111111111111100111010 ;FOSCSEL
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------0------- start with selected osc mode, not FRC
                 ; -----------------0------ don't require key sequence for PWM registers
                 ; ------------------111--- unused
                 ; ---------------------010 start with primary osc, not PLL

         .pword  0b111111111111111111111111 ;FGS
                 ; 1111111111111111-------- unused, all 1s makes NOP instruction
                 ; ----------------111111-- unused
                 ; ----------------------1- disable user memory code protection
                 ; -----------------------1 disable user memory write protection

         .pword  0xFFFFFF    ;reserved
         .pword  0xFFFFFF    ;reserved