Jump to content

How's The Bit Field Enhancement Coming Along?

Recommended Posts


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;
	unsigned RemoteWakeup:1;// [0]Disabled [1]Enabled: See usbdrv.c,usb9.c
	unsigned ctrl_trf_mem:1;// [0]RAM	  [1]ROM



compile and access it like



usb_stat.ctrl_trf_mem = 1;

Link to post
Share on other sites
  • 3 weeks later...

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.




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.




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.

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.

  • Create New...