Error in pins_arduino.h found in folder C:\Users\<userName>\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.4.1\variants\PORTENTA_H7_M4.
YES, sure!
u... is a new name which is not defined. u16 is just a simple string (it starts with a non-value character), like myVariable15.
16u is a value: it starts with a number (not taken as a name, names cannot start with a number).
u just means: take it as unsigned value.
Is this your code or code inside Arduino? (cannot imagine: nobody would use values starting with a "not-a-number", even 0x.... starts with a number as a value, and \0123 for octal numbers).
The file in question is definitely Arduino code (not my code at all or ever will be) running on Windows 10. That is why I gave the path, aka, C:\Users\<userName>\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.4.1\variants\PORTENTA_H7_M4\pins_arduino.h
@tjaekel Given your definition of what it means to have a #define *value* begin with u, how on earth is it possible for an Arduino DIO pin to be defined as a string and not an integer value. What am I missing here?
I don't have a Portenta board package installed so can't be sure. I would run a grep over the installed Portenta boards package and search for e.g. u20; I'm reasonably sure that you will find that it's defined somewhere, either as a #define or as a const or a variable.
< edit >
Does seem to be an error, compiling using one of those pins gives an error:
/home/testuser/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/variants/PORTENTA_H7_M4/pins_arduino.h:67:14: error: 'u17' was not declared in this scope
#define D17 (u17)
Oh, I see also in my downloaded repository (3.1.1):
The D16 ... D21 seem to have a "typo", a flip for this u. It cannot be right.
But you can fix it yourself (and tell Arduino team about it).
It just wrong in the H4 file, in H7 file it looks correct:
#define D10 (10u)
#define D11 (11u)
#define D12 (12u)
#define D13 (13u)
#define D14 (14u)
#define D15 #error Pin cannot be used as digital pin.
#define D16 #error Pin cannot be used as digital pin.
#define D17 #error Pin cannot be used as digital pin.
#define D18 #error Pin cannot be used as digital pin.
#define D19 (19u)
#define D20 (20u)
#define D21 (21u)