Arm Mbed OS support forum

NXP RT1050 EVKB TARGET PinNames in OS 6.10

In mBED OS 6.10 if I change a portion of targets.json for RT1050 to this:

"MIMXRT1050_EVK": {
        "supported_form_factors": [
            "ARDUINO_UNO"
        ],
        "core": "Cortex-M7FD",
        "supported_toolchains": [
            "ARM",
            "GCC_ARM",
            "IAR"
        ],

Changed ARDUINO to ARDUINO_UNO (to avoid warning message in PinNameAliases.h then
the various ARDUINO_UNO_xxx defines are missing.

Compile [  2.7%]: AT_CellularSMS.cpp
Compile [  2.8%]: Base64.cpp
Compile [  2.9%]: main.cpp
[Error] main.cpp@16,21: unknown type name 'ARDUINO_UNO_D7'
[Error] main.cpp@17,19: unknown type name 'ARDUINO_UNO_D6'
[ERROR] .\main.cpp:16:21: error: unknown type name 'ARDUINO_UNO_D7'
DigitalOut greenLED(D7);
^
./mbed-os/hal/include\hal/PinNameAliases.h:44:13: note: expanded from macro 'D7'
#define D7  ARDUINO_UNO_D7
^
.\main.cpp:17:19: error: unknown type name 'ARDUINO_UNO_D6'
DigitalOut redLED(D6);
^
./mbed-os/hal/include\hal/PinNameAliases.h:43:13: note: expanded from macro 'D6'
#define D6  ARDUINO_UNO_D6
^

However, if I don’t change targets.json and keep supported form factors set at ARDUINO then everything compiles, but of course then I get many warnings about how we shouldn’t be using ARDUINO form factor anymore.

Compile [ 16.6%]: pppcrypt.c
Compile [ 16.7%]: pppoe.c
Compile [ 16.8%]: ESP8266.cpp
[Warning] PinNameAliases.h@58,2: ARDUINO form factor should not be used any more => use ARDUINO_UNO [-W#warnings]
Compile [ 16.9%]: ESP8266Interface.cpp
[Warning] PinNameAliases.h@58,2: ARDUINO form factor should not be used any more => use ARDUINO_UNO [-W#warnings]
Compile [ 17.1%]: pppos.cpp
Compile [ 17.2%]: pppol2tp.c
Compile [ 17.3%]: upap.c
Compile [ 17.4%]: utils.c
Compile [ 17.5%]: vj.c
Compile [ 17.6%]: LoRaMacCrypto.cpp
Compile [ 17.7%]: LoRaMacChannelPlan.cpp
Compile [ 17.8%]: ppp_service_if.cpp
[Warning] PinNameAliases.h@58,2: ARDUINO form factor should not be used any more => use AR

I have a proposed fix in my reply below.

Actually, it seems like the fix for this is to change a portion of PinNames.h from this:

// Arduino Headers
D0 = GPIO_AD_B1_07,
D1 = GPIO_AD_B1_06,
D2 = GPIO_AD_B0_11,
D3 = GPIO_AD_B1_08,
D4 = GPIO_AD_B0_09,
D5 = GPIO_AD_B0_10,
D6 = GPIO_AD_B1_02,
D7 = GPIO_AD_B1_03,
D8 = GPIO_AD_B0_03,
D9 = GPIO_AD_B0_02,
D10 = GPIO_SD_B0_01,
D11 = GPIO_SD_B0_02,
D12 = GPIO_SD_B0_03,
D13 = GPIO_SD_B0_00,
D14 = GPIO_AD_B0_01,
D15 = GPIO_AD_B0_00,

A0 = GPIO_AD_B1_10,
A1 = GPIO_AD_B1_11,
A2 = GPIO_AD_B1_04,
A3 = GPIO_AD_B1_05,
A4 = GPIO_AD_B1_01,
A5 = GPIO_AD_B1_00,

I2C_SCL = A5,
I2C_SDA = A4,

to this:

// Arduino Headers
ARDUINO_UNO_D0 = GPIO_AD_B1_07,
ARDUINO_UNO_D1 = GPIO_AD_B1_06,
ARDUINO_UNO_D2 = GPIO_AD_B0_11,
ARDUINO_UNO_D3 = GPIO_AD_B1_08,
ARDUINO_UNO_D4 = GPIO_AD_B0_09,
ARDUINO_UNO_D5 = GPIO_AD_B0_10,
ARDUINO_UNO_D6 = GPIO_AD_B1_02,
ARDUINO_UNO_D7 = GPIO_AD_B1_03,
ARDUINO_UNO_D8 = GPIO_AD_B0_03,
ARDUINO_UNO_D9 = GPIO_AD_B0_02,
ARDUINO_UNO_D10 = GPIO_SD_B0_01,
ARDUINO_UNO_D11 = GPIO_SD_B0_02,
ARDUINO_UNO_D12 = GPIO_SD_B0_03,
ARDUINO_UNO_D13 = GPIO_SD_B0_00,
ARDUINO_UNO_D14 = GPIO_AD_B0_01,
ARDUINO_UNO_D15 = GPIO_AD_B0_00,

ARDUINO_UNO_A0 = GPIO_AD_B1_10,
ARDUINO_UNO_A1 = GPIO_AD_B1_11,
ARDUINO_UNO_A2 = GPIO_AD_B1_04,
ARDUINO_UNO_A3 = GPIO_AD_B1_05,
ARDUINO_UNO_A4 = GPIO_AD_B1_01,
ARDUINO_UNO_A5 = GPIO_AD_B1_00,

I2C_SCL = ARDUINO_UNO_A5,
I2C_SDA = ARDUINO_UNO_A4,

Did my PinNames.h not get updated because I modified it from stock form?

Regards,
Jim

Do any ARM engineers or partner engineers read and participate in these forums?
I’m using MBED OS in a commercial product so I’d like to know how best to get support.

Should I just assume it’s best to buy support from a supplier?

And does ARM provide support packages for commercial product development using mBED OS?

It seems like NOBODY reads these forums?

hi Jim,

You’re indeed getting a warning, as the MIMXRT1050_EVK target hasn’t yet been updated to use the standard Arduino Uno pin names (see blog post).

Feel free to raise a PR on Github and we’ll ask the NXP team to review. Thanks

@MarceloSalazar

Thank you. I’ve never submitted a PR. I will read up on how to do it.
I guess the first step is to fork the repo into my own GitHub account and make a commit of the change(s)?

Thank you @MarceloSalazar.
Pull request #14628 has been created. First time I’ve created one, so I hope I didn’t miss anything.

1 Like