mibtool can now generate working Proteus VSM projects for pic24 code based on a template that compiles correctly with the right optimization settings for the mainboard code.