Skip to content

TT_M3HQ fails to compile with mbed-os master #11143

@kimlep01

Description

@kimlep01

Description

Target board TT_M3HQ fails to compile any Greentea tests currently when using mbed-os master. Happens with GCC_ARM, ARM and IAR.

Steps to reproduce:
checkout latest mbed-os master
mbed compile -m TT_M3HQ -t ARM

Compiler error:

Compile [ 95.5%]: i2c_api.c
[Error] i2c_api.c@69,22: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
[Error] i2c_api.c@74,22: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
[Error] i2c_api.c@79,22: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
[Error] i2c_api.c@83,22: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
[Error] i2c_api.c@100,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@100,15: no member named 'CR2' in 'struct i2c_s'
[Error] i2c_api.c@102,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@102,15: no member named 'OP' in 'struct i2c_s'
[Error] i2c_api.c@103,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@103,15: no member named 'IE' in 'struct i2c_s'
[Error] i2c_api.c@137,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@137,15: no member named 'CR1' in 'struct i2c_s'
[Error] i2c_api.c@138,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@138,15: no member named 'PRS' in 'struct i2c_s'
[Error] i2c_api.c@151,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@151,15: no member named 'CR2' in 'struct i2c_s'
[Error] i2c_api.c@152,21: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[Error] i2c_api.c@152,23: no member named 'SR' in 'struct i2c_s'
[Error] i2c_api.c@162,13: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
[ERROR] ./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:69:22: error: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
            obj->i2c = TSB_I2C0;
                     ^ ~~~~~~~~
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:74:22: error: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
            obj->i2c = TSB_I2C1;
                     ^ ~~~~~~~~
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:79:22: error: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
            obj->i2c = TSB_I2C2;
                     ^ ~~~~~~~~
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:83:22: error: assigning to 'struct i2c_s' from incompatible type 'TSB_I2C_TypeDef *'
            obj->i2c = TSB_I2C3;
                     ^ ~~~~~~~~
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:100:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->CR2 = (I2CxCR2_I2CM_ENABLE | I2CxCR2_TRX | I2CxCR2_PIN_CLEAR |
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:100:15: error: no member named 'CR2' in 'struct i2c_s'
    obj->i2c->CR2 = (I2CxCR2_I2CM_ENABLE | I2CxCR2_TRX | I2CxCR2_PIN_CLEAR |
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:102:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->OP  = I2CxOP_INIT;
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:102:15: error: no member named 'OP' in 'struct i2c_s'
    obj->i2c->OP  = I2CxOP_INIT;
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:103:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->IE  = I2CxIE_CLEAR;
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:103:15: error: no member named 'IE' in 'struct i2c_s'
    obj->i2c->IE  = I2CxIE_CLEAR;
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:137:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->CR1 = (I2CxCR1_ACK | clk.sck);
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:137:15: error: no member named 'CR1' in 'struct i2c_s'
    obj->i2c->CR1 = (I2CxCR1_ACK | clk.sck);
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:138:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->PRS = (I2CxPRS_PRCK & clk.prsck);
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:138:15: error: no member named 'PRS' in 'struct i2c_s'
    obj->i2c->PRS = (I2CxPRS_PRCK & clk.prsck);
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:151:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->CR2 = I2CxCR2_STOP_CONDITION;
    ~~~~~~~~^~
            .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:151:15: error: no member named 'CR2' in 'struct i2c_s'
    obj->i2c->CR2 = I2CxCR2_STOP_CONDITION;
    ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:152:21: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    while ((obj->i2c->SR & I2CxSR_BB) == I2CxSR_BB) {
            ~~~~~~~~^~
                    .
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:152:23: error: no member named 'SR' in 'struct i2c_s'
    while ((obj->i2c->SR & I2CxSR_BB) == I2CxSR_BB) {
            ~~~~~~~~  ^
./targets/TARGET_TT/TARGET_TT_M3HQ/i2c_api.c:162:13: error: member reference type 'struct i2c_s' is not a pointer; did you mean to use '.'?
    obj->i2c->CR2 = I2CxCR2_SWRES_10;
    ~~~~~~~~^~
            .
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions