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
Add checkbox to USBSlave properties screen
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Add checkbox to USBSlave properties screen
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Add checkbox to USBSlave properties screen
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel