Skip to content

Commit 16659f3

Browse files
committed
add printf code
1 parent af21354 commit 16659f3

File tree

2 files changed

+14
-34
lines changed

2 files changed

+14
-34
lines changed

bsp/renesas/ra4e2-ek/ra/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ void Reset_Handler (void)
5050
SystemInit();
5151

5252
/* Call user application. */
53+
#ifdef __ARMCC_VERSION
5354
main();
55+
#elif defined(__GNUC__)
56+
extern int entry(void);
57+
entry();
58+
#endif
5459

5560
while (1)
5661
{

bsp/renesas/ra4e2-ek/src/hal_entry.c

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,21 @@ void hal_entry(void)
1212
{
1313
/* TODO: add your own code here */
1414

15+
rt_kprintf("\nHello RT-Thread!\n");
16+
17+
while (1)
18+
{
19+
// rt_pin_write(LED1_PIN, PIN_HIGH);
20+
// rt_thread_mdelay(500);
21+
// rt_pin_write(LED1_PIN, PIN_LOW);
22+
// rt_thread_mdelay(500);
23+
}
1524
#if BSP_TZ_SECURE_BUILD
1625
/* Enter non-secure code */
1726
R_BSP_NonSecureEnter();
1827
#endif
1928
}
2029

21-
/*******************************************************************************************************************//**
22-
* This function is called at various points during the startup process. This implementation uses the event that is
23-
* called right before main() to set up the pins.
24-
*
25-
* @param[in] event Where at in the start up process the code is currently at
26-
**********************************************************************************************************************/
27-
void R_BSP_WarmStart (bsp_warm_start_event_t event)
28-
{
29-
if (BSP_WARM_START_RESET == event)
30-
{
31-
#if BSP_FEATURE_FLASH_LP_VERSION != 0
32-
33-
/* Enable reading from data flash. */
34-
R_FACI_LP->DFLCTL = 1U;
35-
36-
/* Would normally have to wait tDSTOP(6us) for data flash recovery. Placing the enable here, before clock and
37-
* C runtime initialization, should negate the need for a delay since the initialization will typically take more than 6us. */
38-
#endif
39-
}
40-
41-
if (BSP_WARM_START_POST_C == event)
42-
{
43-
/* C runtime environment and system clocks are setup. */
44-
45-
/* Configure pins. */
46-
R_IOPORT_Open(&IOPORT_CFG_CTRL, &IOPORT_CFG_NAME);
47-
48-
#if BSP_CFG_SDRAM_ENABLED
49-
50-
/* Setup SDRAM and initialize it. Must configure pins first. */
51-
R_BSP_SdramInit(true);
52-
#endif
53-
}
54-
}
5530

5631
#if BSP_TZ_SECURE_BUILD
5732

0 commit comments

Comments
 (0)