Jump to content
Sign in to follow this  
ppulle

How's The Bit Field Enhancement Coming Along?

Recommended Posts

Hi,

Has there been any progress in implementing bit fields in the latest releases of Sourceboost.

 

I'd basically like to drop in Microchip CDC USB stack without major surgery....ie have something like

 

typedef union _USB_DEVICE_STATUS2
{
byte _byte;
struct
{	
	unsigned RemoteWakeup:1;// [0]Disabled [1]Enabled: See usbdrv.c,usb9.c
	unsigned ctrl_trf_mem:1;// [0]RAM	  [1]ROM
};

} USB_DEVICE_STATUS2;

 

compile and access it like

USB_DEVICE_STATUS usb_stat;

 

usb_stat.ctrl_trf_mem = 1;

Share this post


Link to post
Share on other sites

If the response to this thread is any indication I would say its not coming any time in the foreseeable future. It would however be a nice feature to have., if nothing else it would bring SourceBoostC closer to ANSI/ISO C compatibility.

Share this post


Link to post
Share on other sites

We didn't do any work in this area except of some thinking how this can be implemented. This likely means that bitfields won't be supported in any near future. Sorry if that's not what you expected to hear.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

oh well, perhaps someday. Keep up the good work on Sourceboost, it's a great compiler.

 

As an alternative, perhaps easier...perhaps not. Would it be possible to link to libraries created with MPLAB? The idea being a blob of code such as the much desired CDC stack can be created with MPLAB then linked to a sourceboost codebase.

 

Even a manual process of static linking would help. Surely it's just a matter of getting the right function locations, making sure sourceboost doesn't clobber MPLAB variables and getting call stack conventions right. A shim of sourceboost code could surround the calls.

 

 

Phil

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...