Skip to content

Commit 8877da9

Browse files
committed
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.
1 parent 60b208e commit 8877da9

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

docs/Targets.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,24 +2614,22 @@ Note: This also works on Mac OS, but `objcopy` does not exist. Install with `bre
26142614

26152615
See instructions in [IDE/pico-sdk/rp2350/README.md](/IDE/pico-sdk/rp2350/README.md)
26162616

2617+
26172618
## Renesas RX65N
26182619

26192620
Tested on the:
2620-
* RX65N-2MB-Starter-Kit-Plus
2621+
* RX65N-2MB-Starter-Kit-Plus (RSK+)
26212622
* RX65N Target Board (RTK5RX65N0C00000BR) (includes onboard E2 Lite emulator)
26222623

2623-
Both include an E2 Lite Emulator.
2624-
26252624
### Renesas Console
26262625

26272626
Console output is supported with `DEBUG_UART=1`.
26282627

2629-
RSK+:
2628+
* RSK+:
26302629
This board includes a USB to Serial port that uses SCI8 and PJ1/PJ2.
26312630
This is the wolfBoot HAL default for RX65N.
26322631

2633-
RX65N target board:
2634-
2632+
* RX65N target board:
26352633
Can route UART Serial output to PC3 via PMOD1-IO0 at Pin 9.
26362634
This requires an external TTL UART to USB adapter.
26372635
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):
26892687
26902688
### Renesas Data Endianess
26912689
2692-
To switch RX parts to big endian data use:
2690+
To switch RX parts to big endian data use the Renesas Flashing Tool:
2691+
2692+
Download the Renesas Flashing Tool: https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui
2693+
Download the Renesas E2 Lite Linux Driver: https://www.renesas.com/us/en/document/swo/e2-emulator-e2-emulator-lite-linux-driver?r=488806
2694+
2695+
Default location on Windows: `C:\Program Files (x86)\Renesas Electronics\Programming Tools\Renesas Flash Programmer V3.14`.
26932696
26942697
```sh
26952698
# Big Endian
@@ -2724,9 +2727,6 @@ TSIP: To enable TSIP use `make PKA=1`. See [docs/Renesas.md](docs/Renesas.md) fo
27242727

27252728
### Flashing Renesas RX65N
27262729

2727-
Download the Renesas Flashing Tool: https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui
2728-
Download the Renesas E2 Lite Linux Driver: https://www.renesas.com/us/en/document/swo/e2-emulator-e2-emulator-lite-linux-driver?r=488806
2729-
27302730
Default Flash ID Code: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
27312731

27322732
Flash Using:

hal/renesas-rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ void hal_init(void)
377377
#endif
378378

379379
/* For CCRX, mcu_clock_setup() in resetprg.c will set up clocks. */
380-
#if defined(_GNUC_)
380+
#if defined(__GNUC__)
381381
hal_clk_init();
382382
#endif
383383

tools/keytools/keygen.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ void keystore_add(uint32_t ktype, uint8_t *key, uint32_t sz, const char *keyfile
519519
sl.pubkey_size = get_pubkey_size(ktype);
520520

521521
if (sl.pubkey_size > sizeof(sl.pubkey)){
522-
printf("error: %s pubkey larger than keystore: %d > %zu\n",
523-
KName[ktype], sl.pubkey_size, sizeof(sl.pubkey));
522+
printf("error: %s pubkey larger than keystore: %d > %d\n",
523+
KName[ktype], sl.pubkey_size, (int)sizeof(sl.pubkey));
524524
exit(1);
525525
}
526526

@@ -844,7 +844,7 @@ static void keygen_lms(const char *priv_fname, uint32_t id_mask)
844844

845845
if (pub_len != sizeof(lms_pub)) {
846846
fprintf(stderr, "error: wc_LmsKey_ExportPubRaw returned pub_len=%d\n" \
847-
", expected %zu\n", pub_len, sizeof(lms_pub));
847+
", expected %d\n", pub_len, (int)sizeof(lms_pub));
848848
exit(1);
849849
}
850850

@@ -943,7 +943,7 @@ static void keygen_xmss(const char *priv_fname, uint32_t id_mask)
943943

944944
if (pub_len != sizeof(xmss_pub)) {
945945
fprintf(stderr, "error: wc_XmssKey_ExportPubRaw returned pub_len=%d\n" \
946-
", expected %zu\n", pub_len, sizeof(xmss_pub));
946+
", expected %d\n", pub_len, (int)sizeof(xmss_pub));
947947
exit(1);
948948
}
949949

tools/lms/lms_common.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
5656
n_write = fwrite(priv, 1, privSz, file);
5757

5858
if (n_write != privSz) {
59-
fprintf(stderr, "error: wrote %zu, expected %d: %d\n", n_write, privSz,
60-
ferror(file));
59+
fprintf(stderr, "error: wrote %d, expected %d: %d\n",
60+
(int)n_write, privSz, ferror(file));
6161
return WC_LMS_RC_WRITE_FAIL;
6262
}
6363

@@ -80,8 +80,8 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
8080
n_read = fread(buff, 1, n_write, file);
8181

8282
if (n_read != n_write) {
83-
fprintf(stderr, "error: read %zu, expected %zu: %d\n", n_read, n_write,
84-
ferror(file));
83+
fprintf(stderr, "error: read %d, expected %d: %d\n",
84+
(int)n_read, (int)n_write, ferror(file));
8585
return WC_LMS_RC_WRITE_FAIL;
8686
}
8787

@@ -122,8 +122,8 @@ static int lms_read_key(byte * priv, word32 privSz, void * context)
122122
n_read = fread(priv, 1, privSz, file);
123123

124124
if (n_read != privSz) {
125-
fprintf(stderr, "error: read %zu, expected %d: %d\n", n_read, privSz,
126-
ferror(file));
125+
fprintf(stderr, "error: read %d, expected %d: %d\n",
126+
(int)n_read, privSz, ferror(file));
127127
return WC_LMS_RC_READ_FAIL;
128128
}
129129

tools/xmss/xmss_common.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
5656
n_write = fwrite(priv, 1, privSz, file);
5757

5858
if (n_write != privSz) {
59-
fprintf(stderr, "error: wrote %zu, expected %d: %d\n", n_write, privSz,
60-
ferror(file));
59+
fprintf(stderr, "error: wrote %d, expected %d: %d\n",
60+
(int)n_write, privSz, ferror(file));
6161
return WC_XMSS_RC_WRITE_FAIL;
6262
}
6363

@@ -86,8 +86,8 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
8686
n_read = fread(buff, 1, n_write, file);
8787

8888
if (n_read != n_write) {
89-
fprintf(stderr, "error: read %zu, expected %zu: %d\n", n_read, n_write,
90-
ferror(file));
89+
fprintf(stderr, "error: read %d, expected %d: %d\n",
90+
(int)n_read, (int)n_write, ferror(file));
9191
free(buff);
9292
return WC_XMSS_RC_WRITE_FAIL;
9393
}
@@ -132,8 +132,8 @@ static enum wc_XmssRc xmss_read_key(byte * priv, word32 privSz, void * context)
132132
n_read = fread(priv, 1, privSz, file);
133133

134134
if (n_read != privSz) {
135-
fprintf(stderr, "error: read %zu, expected %d: %d\n", n_read, privSz,
136-
ferror(file));
135+
fprintf(stderr, "error: read %d, expected %d: %d\n",
136+
(int)n_read, privSz, ferror(file));
137137
return WC_XMSS_RC_READ_FAIL;
138138
}
139139

0 commit comments

Comments
 (0)