Commit Graph

40 Commits

Author SHA1 Message Date
flyingcys 82f30aa54f
rename c906 FPU macro (#9290)
1. 修改 ENABLE_FPU 为 ARCH_RISCV_FPU,与libcpu/common 保持统一
2. 对 bsp/cvitek/cv18xx_risc-v 中增加使能 ARCH_RISCV_FPU 的动作。解决了 issue #9075
2024-08-27 00:46:41 -04:00
Shell 0b6aa5ae0c fixup: using rt_kprintf instead of libc API for kernel source
Signed-off-by: Shell <smokewood@qq.com>
2024-07-29 20:18:19 +08:00
Shell 65ffe4e13e [libcpu/rv64] feat: unify tick.c
The changes unify the tick.c implementations for all risc-v64
architectures, leveraging the CPUTIME feature. This refactoring was
necessary to streamline the codebase, and ensure consistent timer
handling across different platforms.

Changes:
- Updated `Kconfig` in `bsp/cvitek/cv18xx_risc-v` to fix formatting issues.
- Updated .config for BSPs to update `CPUTIME_TIMER_FREQ`
- Updated header of for API `riscv_cputime_init`
- Initialized riscv timer on `rt_hw_tick_init`
- Refactored `tick.c` and `tick.h` in `libcpu/risc-v/t-head/c906` and `libcpu/risc-v/virt64`:
  - Replaced direct use of `rdtime` with `clock_cpu_gettime`.
  - Removed redundant timer frequency definitions.
  - Added static assertions to check the value of `CPUTIME_TIMER_FREQ`.
  - Initialized `tick_cycles` based on `CPUTIME_TIMER_FREQ`.
  - Integrated `ktime` support for tick initialization.

Signed-off-by: Shell <smokewood@qq.com>
Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9164
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-07-15 12:06:39 +08:00
Shell b73396681a
[bsp/allwinner] feat: porting to RT_USING_DEVICE_OPS (#9142)
* [bsp/allwinner] feat: porting to RT_USING_DEVICE_OPS

This patch ports the codebase to use the RT_USING_DEVICE_OPS structure,
which is required by v5.1.0 Smart kernel, improves modularity and makes
it easier to manage device operations by consolidating them into a
single structure, enhancing maintainability and future scalability.

Changes:
- Added RT_USING_DEVICE_OPS conditionals to partition.c and drv_sdmmc.c.
- Defined rt_device_ops structures for partition and sdmmc drivers.
- Updated device initialization to use the ops structure if defined.
- Replaced direct function calls with rt_dev_control, rt_dev_read, and
  rt_dev_write macros where applicable.
- Removed redundant us_delay function from os.c.

Signed-off-by: Shell <smokewood@qq.com>

* feat: update configuration

* feat: fixup compiler warning

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-07-09 13:35:03 +08:00
latercomer fe3c4d456e bsp中option env语句替换为新语句,并同步更新了source "$xxx"语句 2024-06-20 14:40:42 +08:00
Meco Man 3782127116 [bsp] format drivers code 2024-03-24 09:18:25 +08:00
kk 2549b82bd6
[pin] pin_read/write rt_uint8_t to rt_ssize_t 2024-03-23 14:50:31 -04:00
Meco Man 3f26998f9c [bsp] update projects 2024-03-21 11:23:29 +08:00
Yuqiang Wang c6bdee3c50
[ci] open ci check with function declaration warning (#8546) 2024-02-20 22:45:04 -05:00
xqyjlj 1b6f0e88a3
🐞 fix: fix d1s smart build (#8212) 2023-11-02 20:16:02 +08:00
guozhanxin 9e79333512 [project] update mdk/iar project and config. 2023-10-08 11:21:00 +08:00
zbtrs 36b79798bd
feat: support sdl2 (#8048) 2023-09-25 08:40:03 +08:00
Meco Man b08d8672d2 [libc][posix/io/stdio] rename libc.c as posix/stdio.c 2023-08-17 02:22:53 -04:00
wusongjie 8aa4366cb2 Drivers: Support Open Firmware API and model of PIC
We support OFW API to replace fdt old API, and add
IRQ, IO, Platform-Bus, CPUs ... OFW node contorl.
To support work with Device Tree or ACPI in drivers
that use IRQ, we make a programmable interrupt
controller driver's model.

Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
2023-07-05 16:45:16 +08:00
zhkag 33f550cb65
[Kernel] message 可以返回消息的实际大小 (#7709) 2023-06-21 18:22:42 +08:00
flyingcys acb5010e04
[bsp/allwinner]update allwinnter libraries object file path (#7482) 2023-05-12 22:50:21 +08:00
Placebo27 538158bf20
[bsp] fix mismatched function types in rt_pin_ops for all drv_gpio.c (#7457) 2023-05-08 23:35:27 -04:00
palmyzf 8e8fcef7b8
[HUST CSE]avoids null pointer problems (#7233)
* [HUST CSE]avoids null pointer problems

* Update hal_dma.c

* Update hal_dma.c

* Update hal_dma.c
2023-04-14 00:30:28 +08:00
Sparks-Pion accab17fa5
[HUST CSE IoTS&P Lab] [fix] check rt_mutex_create return value (#7169) 2023-04-04 00:33:10 -04:00
shandianchengzi e49140b513
[HUST CSE IoTS&P Lab][bsp] add missing UL suffix to BIT macro to prevent undefined behavior (#7153)
* [bsp] add missing UL suffix to BIT macro to prevent undefined behavior.

* [bsp] add UL suffix to BIT macro for consistency and readability.

* fix toUppercase.

* fix the abnormal character.

* format the file.
2023-04-03 23:05:42 +08:00
sion 7a31ab9115 [bsp]Fix Chinese coding errors in annotations. 2023-04-02 08:02:46 -04:00
shandianchengzi dc5123547c [bsp] Fix many abnormal symbols in annotations. 2023-03-31 23:57:17 -04:00
yangjie11 95e6b69b8e
sync and update all projects (#7138)
* sync and update
2023-03-31 16:49:48 +08:00
yangjie11 b0c247fb59
[components/drivers][touch]删除多余的touch.h (#7090)
* [components/drivers][touch]删除多余的touch.h

* 将touc.h替换为rtdevice.h
2023-03-24 11:47:28 -04:00
Meco Man 0f461e870c [errno code][-RT_ERROR] fix that use RT_ERROR without - 2023-03-20 00:06:16 -04:00
Shell 18a14cc935
[rt-smart] move sys_cacheflush to lwp_syscall.c (#7048)
* [syscall] move sys_cacheflush to lwp_syscall.c

* [syscall] improve assertion

* [format] rename to rt_ctassert

* [debug] modified ct assertion on mm_page.c
2023-03-17 15:11:38 +08:00
Meco Man 2cc9bd876e [error code][-RT_EIO] fix that use RT_EIO without - 2023-03-16 20:20:37 -04:00
wangxiaoyao 484a0d602e [fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
2023-02-21 08:48:49 +08:00
Shell 2d09749086
[rt-smart] PV_OFFSET as a variable (#6904)
* [rt-smart/mem] remove pv_offset

* [rt-smart] list kernel space command

* [rt-smart] restore ioremap region

* [revert] restore kernel space isolation

* [rt-smart/pv_off] code format

* [rt-smart] add get_pvoff()

* [pvoffset] pvoff as constant for C codes

* [pvoff] pvoff as interfaces
2023-02-14 23:08:32 +08:00
Meco Man f58d3c5200 rt_device_write/read return data type as rt_ssize_t
rt_ssize_t can give negative error code, which follows the unix style correctly
2023-02-07 21:43:57 -05:00
Rbb666 65adce2989 [D1s]Add mksdcard.sh 2023-01-19 21:40:49 -05:00
Shell f0dadcb3c3
[rt-smart] porting c906 and D1s to mm (#6848)
* [rv64/bsp] porting to mm

* [mm] report more info for debugging

* [fix] code format

* [libcpu/c906] porting to RTOS

* [fix] using rtdbg api

* [fix] add return

* [fix] report more information for debugging

* [fix] use assert 0 for unrecoverable error
2023-01-16 08:24:03 +08:00
Meco Man ddccef3a64 modify RT_ALIGN_SIZE as 8 by default 2023-01-12 22:47:23 -05:00
Meco Man 592284c66c format link scripts 2023-01-08 22:52:13 -05:00
Meco Man 9bc68d26a4 format Kconfig and sconscript 2023-01-08 22:52:13 -05:00
Shell 7450ef6c4d
[rt-smart] kernel virtual memory management layer (#6809)
synchronize virtual memory system works.
adding kernel virtual memory management layer for page-based MMU enabled architecture
porting libcpu MMU codes
porting lwp memory related codes
2023-01-08 21:08:55 -05:00
Meco Man 20a6f14e89 use PIN_IRQ_PIN_NONE to replace RT_PIN_NONE 2022-12-26 02:10:30 -05:00
guo 68ca9f07a6
[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)
* [dfs] sync cromfs

* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration

* [format] fix some format issue.
2022-12-16 18:38:28 +08:00
Man, Jianting (Meco) 99bdf978d7
[rtdef] use lower-case to define attributes (#6728)
* [rtdef] rename RT_WEAK attribute as rt_weak

* [rtdef] rename RT_USED attribute as rt_used

* [rtdef] rename RT_SECTION attribute as rt_section

* [rtdef] rename ALIGN attribute as rt_align

* [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
2022-12-11 13:12:03 -05:00
guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00