Page 1 of 1

Add checkbox to USBSlave properties screen

Posted: Mon Apr 13, 2009 9:46 pm
by kersing
Hi,

In the USBSlaves SlaveProperty TAB one has to specify a Slave Service Macro Name, even when no slave service is being used. If no macro name is supplied the code generated for FCD_USBSlave0_Start_Slave_Service is invalid. Without a macro name there are a lot of FCM_(...params...) calls in the generated code. When a macro is supplied (dummy_macro) those are FCM_dummy_macro(...parms...) calls.

Adding a checkbox to the tab (with the appropriate #ifdef in the C code) could solve this minor inconvenience.

Best regards,

Jac

Re: Add checkbox to USBSlave properties screen

Posted: Mon Apr 13, 2009 10:02 pm
by Benj
Hi Jac

You are right a use of a #if statement could be used to remove the missing property bug that causes the error in compilation. However I think the current error is actually quite useful as it confirms that the USB component is not configured correctly. As USB is a fairly tricky one to troubleshoot it may take a while for a user to detect that a property is causing their program to run correctly if the program actually compiles correctly.

It may be possible to enhance the USB component to allow for a better method of selecting the run time macro though so I will look into this for you.

Keep the suggestions coming we do appreciate them.