Skip to content

Commit 9fb8b70

Browse files
committed
[v0.1] 完成在CubeIDE运行RT-Thread
1 parent 8778c2e commit 9fb8b70

77 files changed

Lines changed: 19411 additions & 116 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.cyclo

Whitespace-only changes.

bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.cyclo

Whitespace-only changes.

bsp/stm32/libraries/HAL_Drivers/drv_common.c

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -175,47 +175,47 @@ void rt_hw_us_delay(rt_uint32_t us)
175175
*/
176176
rt_weak void rt_hw_board_init(void)
177177
{
178-
// #ifdef BSP_SCB_ENABLE_I_CACHE
179-
// /* Enable I-Cache---------------------------------------------------------*/
180-
// SCB_EnableICache();
181-
// #endif
178+
#ifdef BSP_SCB_ENABLE_I_CACHE
179+
/* Enable I-Cache---------------------------------------------------------*/
180+
SCB_EnableICache();
181+
#endif
182182

183-
// #ifdef BSP_SCB_ENABLE_D_CACHE
184-
// /* Enable D-Cache---------------------------------------------------------*/
185-
// SCB_EnableDCache();
186-
// #endif
183+
#ifdef BSP_SCB_ENABLE_D_CACHE
184+
/* Enable D-Cache---------------------------------------------------------*/
185+
SCB_EnableDCache();
186+
#endif
187187

188188
/* HAL_Init() function is called at the beginning of the program */
189-
// HAL_Init();
189+
HAL_Init();
190190

191-
// /* System clock initialization */
192-
// SystemClock_Config();
191+
/* System clock initialization */
192+
SystemClock_Config();
193193

194194
#if defined(RT_USING_HEAP)
195195
/* Heap initialization */
196196
rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
197197
#endif
198198

199-
// #ifdef RT_USING_PIN
200-
// rt_hw_pin_init();
201-
// #endif
199+
#ifdef RT_USING_PIN
200+
rt_hw_pin_init();
201+
#endif
202202

203-
// #ifdef RT_USING_SERIAL
204-
// rt_hw_usart_init();
205-
// #endif
203+
#ifdef RT_USING_SERIAL
204+
rt_hw_usart_init();
205+
#endif
206206

207-
// #if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
208-
// /* Set the shell console output device */
209-
// rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
210-
// #endif
207+
#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
208+
/* Set the shell console output device */
209+
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
210+
#endif
211211

212-
// #if defined(RT_USING_CONSOLE) && defined(RT_USING_NANO)
213-
// extern void rt_hw_console_init(void);
214-
// rt_hw_console_init();
215-
// #endif
212+
#if defined(RT_USING_CONSOLE) && defined(RT_USING_NANO)
213+
extern void rt_hw_console_init(void);
214+
rt_hw_console_init();
215+
#endif
216216

217-
// #ifdef RT_USING_COMPONENTS_INIT
218-
// /* Board underlying hardware initialization */
219-
// rt_components_board_init();
220-
// #endif
217+
#ifdef RT_USING_COMPONENTS_INIT
218+
/* Board underlying hardware initialization */
219+
rt_components_board_init();
220+
#endif
221221
}

bsp/stm32/stm32n657-st-nucleo/board/N6/.mxproject

Lines changed: 55 additions & 30 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
4+
5+
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
6+
<events>
7+
</events>
8+
9+
</component_viewer>

0 commit comments

Comments
 (0)