Przeglądaj źródła

[bsp/nrf5x] update config file

chenyingchun0312 3 lat temu
rodzic
commit
0acbc36e4a

+ 0 - 1
bsp/nrf5x/libraries/drivers/drv_uart.c

@@ -250,5 +250,4 @@ int rt_hw_uart_init(void)
 #endif  /* BSP_USING_UART0 */
 
 }
-INIT_BOARD_EXPORT(rt_hw_uart_init);
 #endif /* BSP_USING_UART */

+ 1 - 2
bsp/nrf5x/libraries/drivers/drv_uart.h

@@ -11,8 +11,7 @@
 
 #define UART0_RB_SIZE        1024
 
-// #define USE_UART0_1         0
-
+int rt_hw_uart_init(void);
 
 #endif
 

+ 3 - 3
bsp/nrf5x/nrf52832/.config

@@ -383,9 +383,9 @@ CONFIG_RT_LIBC_FIXED_TIMEZONE=8
 # CONFIG_PKG_USING_NRF5X_SDK is not set
 CONFIG_PKG_USING_NRFX=y
 CONFIG_PKG_NRFX_PATH="/packages/peripherals/nrfx"
-CONFIG_PKG_USING_NRFX_V210=y
-# CONFIG_PKG_USING_NRFX_LATEST_VERSION is not set
-CONFIG_PKG_NRFX_VER="v2.1.0"
+# CONFIG_PKG_USING_NRFX_V210 is not set
+CONFIG_PKG_USING_NRFX_LATEST_VERSION=y
+CONFIG_PKG_NRFX_VER="latest"
 # CONFIG_PKG_USING_WM_LIBRARIES is not set
 # CONFIG_PKG_USING_KENDRYTE_SDK is not set
 # CONFIG_PKG_USING_INFRARED is not set

+ 8 - 7
bsp/nrf5x/nrf52832/.vscode/launch.json

@@ -2,14 +2,15 @@
     "version": "0.2.0",
     "configurations": [
         {
-            "type": "cortex-debug",
-            "request": "launch",
-            "servertype": "jlink",
             "cwd": "${workspaceRoot}",
             "executable": "rt-thread.elf",
-            "name": "Cortex Debug",
-            "device": "nrf52",
-            "interface": "swd"
-        }
+            "name": "Debug MAX",
+            "request": "launch",
+            "type": "cortex-debug",
+            "servertype": "jlink",
+            "interface": "swd",
+            "device": "NRF52832_XXAA",
+            "runToMain": true
+        },
     ]
 }

+ 1 - 1
bsp/nrf5x/nrf52832/rtconfig.h

@@ -149,7 +149,7 @@
 /* peripheral libraries and drivers */
 
 #define PKG_USING_NRFX
-#define PKG_USING_NRFX_V210
+#define PKG_USING_NRFX_LATEST_VERSION
 
 /* miscellaneous packages */
 

+ 1 - 1
bsp/nrf5x/nrf52832/rtconfig.py

@@ -13,7 +13,7 @@ if os.getenv('RTT_CC'):
 
 if  CROSS_TOOL == 'gcc':
     PLATFORM    = 'gcc'
-    EXEC_PATH   = r'D:\RT-ThreadStudio\repo\Extract\ToolChain_Support_Packages\ARM\GNU_Tools_for_ARM_Embedded_Processors\5.4.1\bin'
+    EXEC_PATH   = 'D:/SourceryGCC/bin'
 elif CROSS_TOOL == 'keil':
     PLATFORM    = 'armcc'
     EXEC_PATH   = 'C:/Keil_v5'

+ 6 - 2
bsp/nrf5x/nrf52840/board/board.c

@@ -61,14 +61,18 @@ void rt_hw_board_init(void)
     rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
 #endif
 
-#ifdef RT_USING_COMPONENTS_INIT
-    rt_components_board_init();
+#ifdef RT_USING_SERIAL
+    rt_hw_uart_init();
 #endif
 
 #ifdef RT_USING_CONSOLE
     rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
 #endif
 
+#ifdef RT_USING_COMPONENTS_INIT
+    rt_components_board_init();
+#endif
+
 
 #ifdef BSP_USING_SOFTDEVICE
     extern uint32_t  Image$$RW_IRAM1$$Base;