Renesas RX minor fixes and documentation updates. Fix for malformed GNUC macro causing clock to not be setup properly when building with RX-GCC compiler. Fix warnings with using `%zu` on older GCC.

pull/569/head
David Garske 2025-03-26 13:52:24 -07:00 committed by Daniele Lacamera
parent 60b208e5e1
commit b86d7fc308
5 changed files with 27 additions and 27 deletions

View File

@ -2614,24 +2614,22 @@ Note: This also works on Mac OS, but `objcopy` does not exist. Install with `bre
See instructions in [IDE/pico-sdk/rp2350/README.md](/IDE/pico-sdk/rp2350/README.md)
## Renesas RX65N
Tested on the:
* RX65N-2MB-Starter-Kit-Plus
* RX65N-2MB-Starter-Kit-Plus (RSK+)
* RX65N Target Board (RTK5RX65N0C00000BR) (includes onboard E2 Lite emulator)
Both include an E2 Lite Emulator.
### Renesas Console
Console output is supported with `DEBUG_UART=1`.
RSK+:
* RSK+:
This board includes a USB to Serial port that uses SCI8 and PJ1/PJ2.
This is the wolfBoot HAL default for RX65N.
RX65N target board:
* RX65N target board:
Can route UART Serial output to PC3 via PMOD1-IO0 at Pin 9.
This requires an external TTL UART to USB adapter.
You will need to set `CFLAGS_EXTRA+="-DDEBUG_UART_SCI=3"` in .config.
@ -2689,7 +2687,12 @@ Default Onboard Flash Memory Layout (2MB) (32KB sector):
### Renesas Data Endianess
To switch RX parts to big endian data use:
To switch RX parts to big endian data use the Renesas Flashing Tool:
Download the Renesas Flashing Tool: https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui
Download the Renesas E2 Lite Linux Driver: https://www.renesas.com/us/en/document/swo/e2-emulator-e2-emulator-lite-linux-driver?r=488806
Default location on Windows: `C:\Program Files (x86)\Renesas Electronics\Programming Tools\Renesas Flash Programmer V3.14`.
```sh
# Big Endian
@ -2724,9 +2727,6 @@ TSIP: To enable TSIP use `make PKA=1`. See [docs/Renesas.md](docs/Renesas.md) fo
### Flashing Renesas RX65N
Download the Renesas Flashing Tool: https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui
Download the Renesas E2 Lite Linux Driver: https://www.renesas.com/us/en/document/swo/e2-emulator-e2-emulator-lite-linux-driver?r=488806
Default Flash ID Code: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Flash Using:

View File

@ -377,7 +377,7 @@ void hal_init(void)
#endif
/* For CCRX, mcu_clock_setup() in resetprg.c will set up clocks. */
#if defined(_GNUC_)
#if defined(__GNUC__)
hal_clk_init();
#endif

View File

@ -519,8 +519,8 @@ void keystore_add(uint32_t ktype, uint8_t *key, uint32_t sz, const char *keyfile
sl.pubkey_size = get_pubkey_size(ktype);
if (sl.pubkey_size > sizeof(sl.pubkey)){
printf("error: %s pubkey larger than keystore: %d > %zu\n",
KName[ktype], sl.pubkey_size, sizeof(sl.pubkey));
printf("error: %s pubkey larger than keystore: %d > %d\n",
KName[ktype], sl.pubkey_size, (int)sizeof(sl.pubkey));
exit(1);
}
@ -844,7 +844,7 @@ static void keygen_lms(const char *priv_fname, uint32_t id_mask)
if (pub_len != sizeof(lms_pub)) {
fprintf(stderr, "error: wc_LmsKey_ExportPubRaw returned pub_len=%d\n" \
", expected %zu\n", pub_len, sizeof(lms_pub));
", expected %d\n", pub_len, (int)sizeof(lms_pub));
exit(1);
}
@ -943,7 +943,7 @@ static void keygen_xmss(const char *priv_fname, uint32_t id_mask)
if (pub_len != sizeof(xmss_pub)) {
fprintf(stderr, "error: wc_XmssKey_ExportPubRaw returned pub_len=%d\n" \
", expected %zu\n", pub_len, sizeof(xmss_pub));
", expected %d\n", pub_len, (int)sizeof(xmss_pub));
exit(1);
}

View File

@ -56,8 +56,8 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
n_write = fwrite(priv, 1, privSz, file);
if (n_write != privSz) {
fprintf(stderr, "error: wrote %zu, expected %d: %d\n", n_write, privSz,
ferror(file));
fprintf(stderr, "error: wrote %d, expected %d: %d\n",
(int)n_write, privSz, ferror(file));
return WC_LMS_RC_WRITE_FAIL;
}
@ -80,8 +80,8 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
n_read = fread(buff, 1, n_write, file);
if (n_read != n_write) {
fprintf(stderr, "error: read %zu, expected %zu: %d\n", n_read, n_write,
ferror(file));
fprintf(stderr, "error: read %d, expected %d: %d\n",
(int)n_read, (int)n_write, ferror(file));
return WC_LMS_RC_WRITE_FAIL;
}
@ -122,8 +122,8 @@ static int lms_read_key(byte * priv, word32 privSz, void * context)
n_read = fread(priv, 1, privSz, file);
if (n_read != privSz) {
fprintf(stderr, "error: read %zu, expected %d: %d\n", n_read, privSz,
ferror(file));
fprintf(stderr, "error: read %d, expected %d: %d\n",
(int)n_read, privSz, ferror(file));
return WC_LMS_RC_READ_FAIL;
}

View File

@ -56,8 +56,8 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
n_write = fwrite(priv, 1, privSz, file);
if (n_write != privSz) {
fprintf(stderr, "error: wrote %zu, expected %d: %d\n", n_write, privSz,
ferror(file));
fprintf(stderr, "error: wrote %d, expected %d: %d\n",
(int)n_write, privSz, ferror(file));
return WC_XMSS_RC_WRITE_FAIL;
}
@ -86,8 +86,8 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
n_read = fread(buff, 1, n_write, file);
if (n_read != n_write) {
fprintf(stderr, "error: read %zu, expected %zu: %d\n", n_read, n_write,
ferror(file));
fprintf(stderr, "error: read %d, expected %d: %d\n",
(int)n_read, (int)n_write, ferror(file));
free(buff);
return WC_XMSS_RC_WRITE_FAIL;
}
@ -132,8 +132,8 @@ static enum wc_XmssRc xmss_read_key(byte * priv, word32 privSz, void * context)
n_read = fread(priv, 1, privSz, file);
if (n_read != privSz) {
fprintf(stderr, "error: read %zu, expected %d: %d\n", n_read, privSz,
ferror(file));
fprintf(stderr, "error: read %d, expected %d: %d\n",
(int)n_read, privSz, ferror(file));
return WC_XMSS_RC_READ_FAIL;
}