This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using sbit on MCB2100 - LPC2129

Hi,
I'm using a MCB2100 dev board with LPC2129 chip. I am used to using a 8051 based chip and have used the sbit declaration for pin assignment previously. However it doesn't really like it with my new board. How do I go about reading from an individual pin?
thanks
Andy

Parents
  • sbit is a proprietary extension introduced by Keil specifically to take advantage of a specific architectural feature of the 8051 - it should come as no surprise at all to find that it doesn't work on an ARM!!

    When it comes to language extensions implemented by a specific compiler, you must always refer to the Manual for that specific compiler.

    Similarly, you must not assume that any of the C51 implementation-defined details will be the same for the ARM compiler; ie, byte ordering, data type sizes, calling conventions, stack usage, etc, etc, etc,...
    Now that you're on a 32-bit processor, you must also watch out for data alignment...

    You can't even assume that this stuff will be the same for the Keil & GNU ARM compilers...

Reply
  • sbit is a proprietary extension introduced by Keil specifically to take advantage of a specific architectural feature of the 8051 - it should come as no surprise at all to find that it doesn't work on an ARM!!

    When it comes to language extensions implemented by a specific compiler, you must always refer to the Manual for that specific compiler.

    Similarly, you must not assume that any of the C51 implementation-defined details will be the same for the ARM compiler; ie, byte ordering, data type sizes, calling conventions, stack usage, etc, etc, etc,...
    Now that you're on a 32-bit processor, you must also watch out for data alignment...

    You can't even assume that this stuff will be the same for the Keil & GNU ARM compilers...

Children