Bit field

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bit field

259 Views
Aswin_5232
Contributor II

Hi,

I am using MC9S12DG256 controller and IDE is CodeWarrior 5.2. When I am disabling the option bit field size reduction , the memory allocation starts from mid instead of start. for example my variable is of type int it starts from 8 instead of 0. I want to start from 0. Please find the screen shot attached.

Tags (1)
0 Kudos
Reply
1 Reply

236 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

the game you are playing is related to the defined sizes of bitfield elements (unsigned char, unsigned int) and then MSB. LSB order, MSb, LSb order. I suggest you to test combinations simply with different options after reading the help ....

lama_0-1776099462232.png

If you want more info about bitfields I suggest to go through all appearnces in

lama_2-1776099768901.png

 

Plus when you select an item it can show more options with the same name. Open each of them because each of them direct to different contet.

lama_3-1776099895547.png

 

... or go to your instalation dir c:\Program Files (x86)\Freescale\CWS12v5.2\Help\pdf\

open file Compiler_HC12.pdf

and search for each existence of bitfield keyword.

 

Best regards,

Ladislav

 

 

 

 

 




0 Kudos
Reply