diff options
| author | ZhangJing <[email protected]> | 2025-05-30 13:32:58 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-05-30 14:06:33 +0800 |
| commit | 97893c004c65760c638fd7eb571a08fc987a55e5 (patch) | |
| tree | 71c7c743e10a1281a104bfac56307e3d338a9818 /bsp/ultrarisc/ur_dp1000_evb/applications | |
| parent | 93cc80e461d1e6d81e84c16caee4358f229e80f3 (diff) | |
[bsp]增加超睿DP1000 bsp支持v5.2.1
Diffstat (limited to 'bsp/ultrarisc/ur_dp1000_evb/applications')
| -rw-r--r-- | bsp/ultrarisc/ur_dp1000_evb/applications/SConscript | 18 | ||||
| -rw-r--r-- | bsp/ultrarisc/ur_dp1000_evb/applications/main.c | 20 | ||||
| -rw-r--r-- | bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c | 21 |
3 files changed, 59 insertions, 0 deletions
diff --git a/bsp/ultrarisc/ur_dp1000_evb/applications/SConscript b/bsp/ultrarisc/ur_dp1000_evb/applications/SConscript new file mode 100644 index 0000000000..4cd1f6f04a --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/applications/SConscript @@ -0,0 +1,18 @@ +from building import * +import os + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] + +if not GetDepend('BSP_USING_DW_SPI'): + SrcRemove(src, ['mnt.c']) + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + +Return('group') diff --git a/bsp/ultrarisc/ur_dp1000_evb/applications/main.c b/bsp/ultrarisc/ur_dp1000_evb/applications/main.c new file mode 100644 index 0000000000..b7d85ca10a --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/applications/main.c @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2006-2025 RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2025-01-22 ZhangJing first version + */ + +#include <stdio.h> +#include <string.h> +#include <rtthread.h> + +int main(void) +{ + rt_kprintf("Hello RT-Thread\n"); + + return 0; +}
\ No newline at end of file diff --git a/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c b/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c new file mode 100644 index 0000000000..2df64daa45 --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c @@ -0,0 +1,21 @@ + +#include <rtthread.h> +#include <rtconfig.h> +#include <dev_spi_msd.h> +#include <dfs_fs.h> + +int mnt_init(void) +{ + msd_init("sd0", "spi00"); + + if (dfs_mount("sd0", "/", "ext", 0, 0) == 0) + { + rt_kprintf("Mount \"/dev/sd0p1\" on \"/\"\n"); + } + else if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) + { + rt_kprintf("Mount \"/dev/sd0p1\" on \"/\"\n"); + } + return 0; +} +INIT_ENV_EXPORT(mnt_init);
\ No newline at end of file |
