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

LD Scripts is the best approach for BitBanding with GCC?

I have searched information on Bit-Banding in Cortex-M3 and M4 with the GNU GCC ARM EABI NONE, I have seen basic examples on the internet but none works with GNU GCC also seems that no intention to have such feature implemented.

Can someone tell me if the LD via memory remapping really work? the best approach?

What is the best way?

Parents
  • Hi!

    Liviu (ilg), I'm using to show my students the impact of Bit-Banding when migrating from AVR to ARM and unlike the technique used both for access to bit-fields in IO ports.

    In case I did some testing with their own Arduino IDE, and enter the code below, and made the dump and the code is mixed C and Assembly, did nothing more than the statement of the variable and then assigns the value 1 to she.;

    0008014c <loop>: 
    ;volatile __attribute__((bitband, at(0x20000004))) uint32_t myFlag =0 ; 
    
    ;void loop() { 
    ;  myFlag = B00000001; 
       8014c: 4b01       ldr r3, [pc, #4] ; (80154 <loop+0x8>)
       8014e: 2201       movs r2, #1
       80150: 601a       str r2, [r3, #0]
    ;}
       80152: 4770       bx lr
       80154: 200708f0 .word 0x200708f0
    

    I figured it did not reach the goal because of the memory address that is the variable, and then I search the internet in the ARM GCC site for windows saw the post that is the link to follow that would not be supported yet.

    Question #228758 : Questions : GNU ARM Embedded Toolchain

    Moreover, I suspect that lack a directive in the command, would it? But in issue up says it is not supported.

Reply
  • Hi!

    Liviu (ilg), I'm using to show my students the impact of Bit-Banding when migrating from AVR to ARM and unlike the technique used both for access to bit-fields in IO ports.

    In case I did some testing with their own Arduino IDE, and enter the code below, and made the dump and the code is mixed C and Assembly, did nothing more than the statement of the variable and then assigns the value 1 to she.;

    0008014c <loop>: 
    ;volatile __attribute__((bitband, at(0x20000004))) uint32_t myFlag =0 ; 
    
    ;void loop() { 
    ;  myFlag = B00000001; 
       8014c: 4b01       ldr r3, [pc, #4] ; (80154 <loop+0x8>)
       8014e: 2201       movs r2, #1
       80150: 601a       str r2, [r3, #0]
    ;}
       80152: 4770       bx lr
       80154: 200708f0 .word 0x200708f0
    

    I figured it did not reach the goal because of the memory address that is the variable, and then I search the internet in the ARM GCC site for windows saw the post that is the link to follow that would not be supported yet.

    Question #228758 : Questions : GNU ARM Embedded Toolchain

    Moreover, I suspect that lack a directive in the command, would it? But in issue up says it is not supported.

Children