[baremetal] Avoid narrow loop counters etc

Use `uint_fast8_t` instead of `unsigned char` in various loop-type
situations. This avoids the need for a 16 or 32-bit system to insert
explicit narrow-to-8-bit instructions.

Not the result of an exhaustive source analysis, rather inspecting
the disassembly output for a cut-down Cortex-M0+ build looking for
UXTB etc instructions, so there could well be more in the complete
configuration.

Signed-off-by: Kevin Bracey <kevin.bracey@arm.com>
diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c
index ba4a3ac..a6c8467 100644
--- a/tinycrypt/ecc.c
+++ b/tinycrypt/ecc.c
@@ -160,7 +160,7 @@
 		0x76, 0x0a, 0xe2, 0xbc, 0xce, 0x2a, 0xa2, 0xc6,
 		0x38, 0xf2, 0x19, 0x1d, 0x76, 0x72, 0x93, 0x49,
 	};
-	unsigned char diff = 0;
+	int diff = 0;
 	unsigned char tmp1, tmp2;
 	volatile unsigned i;
 
@@ -177,7 +177,7 @@
 
 	/* i should be 32 */
 	mbedtls_platform_random_delay();
-	diff |= (unsigned char) i ^ 32;
+	diff |= i ^ 32;
 
 	return diff;
 }