Commit Graph

644 Commits

Author SHA1 Message Date
wdfk-prog cef57d006d
[armlibc] 修复AC6更新至6.19后_sys_tmpnam()函数编译报错 (#6647)
* [armlibc] 修复AC6更新至6.19后_sys_tmpnam()函数编译报错

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
2022-11-24 00:12:48 -05:00
Meco Man 3e2beebe43 [libc][musl]解决signal.h报错的问题 2022-11-22 22:18:26 -05:00
Man, Jianting (Meco) bdd663a33f
[libc][musl] support arm-linux-musleabi toolchain
目前基本功能已经可以在QEMU上跑起来,但是pthread和内核signal选中会报冲突。先合并一版本,后续解决这些问题。
2022-11-22 21:40:50 -05:00
Meco Man 721c08dc61 [libc][time] 解决部分编译平台CLOCKS_PER_SEC无法被重新定义的问题 2022-10-28 18:13:15 -04:00
Man, Jianting (Meco) 055267f049
[compiler] 增加SConscript依赖标志 AddDepend (#6534)
* [compiler] 增加SConscript依赖标志 AddDepend

* RT_USING_NEWLIB->RT_USING_NEWLIBC RT_USING_ARM_LIBC->RT_USING_ARMLIBC

* 删除过时的板载测试例程

* [gd32] 移除无用的反汇编文件

* [bsp]移除老旧bsp中对RT_USING_NEWLIBC的手动宏定义
2022-10-25 00:01:37 -04:00
Tangyuxin a4829b1c00
[fix] Fix simulator compilation warnings (#6438)
* [fix] Fix simulator compilation warnings

* Update bsp/simulator/rtconfig_project.h

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
2022-09-20 10:31:11 -04:00
Meco Man 981e721c3b [kernel] add rt_ssize_t data structure 2022-09-16 17:26:07 +08:00
Meco Man b04076d8aa [armlibc] solve the compiling error
report in #6300
2022-08-17 23:48:05 -04:00
Meco Man dd94198bd6 [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM 2022-08-16 09:39:00 +08:00
Meco Man bd33d37bc4 该问题在Keil-MDK中没有一个太好的解决方案。本PR为权衡利弊之后得到的一套解决方案。Keil曾经提供了底层桩函数_sys_ensure,但是目前已经被废弃。因此唯一的解决方案就是每写完一句,就调用fsync去同步一次。
该问题在mbedos社区也进行过讨论,他们也面临和我们相同的两个问题:
1. Keil-MDK无有效的fflush解决方案,mbedos依然在使用淘汰的_sys_ensure桩函数。
2. Keil-MDK没有fileno函数,我方少部分软件包因此而无法使用Keil平台编译。
参考:https://github.com/ARMmbed/mbed-os/issues/1601

issue: https://github.com/RT-Thread/rt-thread/issues/4928


经过进一步测试发现,Keil-MDK中的fflush函数已经退化成服务于STDOUT的函数,Keil-MDK内部有一个buffer可以存放fputc(stdout) 发过来的数据,如果调用fflush,这些数据是可以flush出去的。但是如果是真正的文件数据,fflush函数并没有提供任何桩函数接口可以让文件flush数据出去。
2022-08-16 09:37:24 +08:00
Man, Jianting (Meco) 8da744a750
[exit] 修复_exit函数条件分支未覆盖所有情况的问题 (#6239)
attach #6229
2022-08-08 17:21:29 +08:00
xiangxistu e61d05ca1a
[fix] the risk for function exit() when open pthread support. (#6229)
* [fix] the risk for function exit() when open pthread support.
* [update] modify annotation from "user data" to "pthread_data".
2022-08-07 23:16:17 -04:00
Aligagago 250b3cbc16 使用 AStyle.exe 统一代码格式 2022-07-27 11:45:29 +08:00
Meco Man a924da830e [libc] 修复difftime函数在IAR下的编译错误 2022-07-20 10:07:03 +08:00
liuxianliang a305edd4db [fix] memory leak when the value of posix semaphore is zero. 2022-07-07 16:05:49 +08:00
Meco Man 9623706eff Revert "解决将RT_NULL当做数字0使用的问题"
This reverts commit 6a05ddf63d.
2022-07-01 15:51:28 +08:00
Meco Man 6a05ddf63d 解决将RT_NULL当做数字0使用的问题 2022-07-01 11:39:28 +08:00
xiangxistu c2cdce970d
[fix] use atomic operation to protect pthread conditional variable. (#6113)
* [fix] use atomic operation to protect pthread conditional variable.
2022-07-01 09:36:18 +08:00
Man, Jianting (Meco) e1e1596cbd
[iar] 修复编译错误 (#6126) 2022-07-01 09:15:29 +08:00
Man, Jianting (Meco) 8275e90203
[libc][newlib] format (#6104) 2022-06-23 14:38:26 +08:00
Man, Jianting (Meco) d5afcd7f0d
fix the error return (#6097) 2022-06-22 11:51:49 +08:00
Man, Jianting (Meco) 8bee7a0c23
[libc] implement extension standard C functions (#6044)
* implement extension standard C functions
2022-06-19 21:56:24 +08:00
Meco Man c9878aacd2 [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm
将路径更新为IAR最新版本的路径
2022-06-09 07:01:59 +08:00
Meco Man 83b3aadaa3 [Scons][iar][iccarm] IAR统一使用iccarm作为判断条件而不是是用IDE的名字来进行判断
因为不确定后续IAR是否会像Keil一样内含有不同的编译工具链
此外,将判断条件改为列表方式,这样更方便后续增加其他可能的IAR编译链
2022-06-09 07:01:59 +08:00
Meco Man 50f041f5c2 [Scons] 将GCC判断条件改为列表方式,方便后续增加新的编译工具链 2022-06-09 07:01:59 +08:00
chunyexixiaoyu 37d0be3290 [libc][time] solve the problem which the os tick can be calculated wrongly because the local variable was not initialized. 2022-06-08 14:34:04 +08:00
Tangyuxin f5c88add37
Fix compiler warnings (#6023) 2022-06-08 01:21:50 +08:00
gbcwbz ecde6d2dcf
[libc][time] Fix clock_gettime for CLOCK_CPUTIME_ID (#6029) 2022-06-05 22:51:22 +08:00
Man, Jianting (Meco) fb3f835089
[libc] remove strdup from rtthread.h (#6026)
add __STDC_LIMIT_MACROS macro in Keil
add RT_USING_LIBC in simulator
add _DLIB_ADD_EXTRA_SYMBOLS=0 in IAR
2022-06-04 17:02:35 +08:00
Meco Man c8c24ae7ab [libc] revert back difftime 2022-05-25 10:05:59 +08:00
Man, Jianting (Meco) c147ff417c
[rtdef][libc] solve the conflicts between libc data types and rtdef data types (#5961) 2022-05-19 10:35:32 +08:00
liuxianliang 6dd6929b8e [fix] return "EINVAL" if "count" is zero. 2022-05-18 08:44:30 +08:00
liuxianliang 9f5a9b6bc8 [modify] the recycle logic about resource of pthread. 2022-05-18 08:44:30 +08:00
Meco Man b793b6427a [sal] add draft for docking winsock 2022-05-16 10:02:22 +08:00
Meco Man 19abf927d2 [simulator] avoid conflicts between winsock.h and sys/time.h 2022-05-16 10:02:22 +08:00
陈迎春 f977f07ddf
[fix] fix dlmodule compile 'SEEK_END' undeclared eror (#5909) 2022-05-09 09:37:17 +08:00
Man, Jianting (Meco) 6295ec108e
[kernel] remove the register keyword (#5888) 2022-04-29 06:34:42 +08:00
Man, Jianting (Meco) 6ce4a87492
[fcntl] create new fcntl.h file for vs (#5860)
* [fcntl] create new fcntl.h file for vs
2022-04-24 10:52:57 +08:00
Meco Man 5e8871e1a2 [iar] add CLOCKS_PER_SEC
https://www.iar.com/knowledge/learn/programming/using-c-standard-library-time-and-clock-functions/
2022-04-22 22:32:27 +08:00
Meco Man 2774343d97 [libc][time] 修复IAR版本判断逻辑错误 2022-04-22 22:32:27 +08:00
Man, Jianting (Meco) 43484a201d
[libc] 优化armcc armclang处理 (#5858) 2022-04-22 13:39:44 +08:00
guozhanxin 7a717b094e [fix] building error. 2022-04-21 14:35:11 +08:00
thewon86 f5b0bfd3f4 uniform code writing-disable interrupt 2022-04-20 14:22:43 +08:00
Man, Jianting (Meco) a0f8d43744
[gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM (#5802)
* [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM
2022-04-20 09:56:04 +08:00
Tangyuxin 20f5d934a9
[libc][time] Fix bug (#5831) 2022-04-19 22:47:14 +08:00
Meco Man 5e9f525c41 [kernel] enable RT_DEBUG_DEVICE by default and move weak rt_hw_dealy_us in kservice.c 2022-04-19 11:26:41 +08:00
tyx 87046a1abf [libc][io] Remove definitions that are not in use 2022-04-19 11:22:58 +08:00
Meco Man bda32cdedb [libc] fix that some function cannot be found in unistd.h 2022-04-15 15:40:20 +08:00
Man, Jianting (Meco) de6d7eca5a
[libc] fix the sys/select.h problem (#5790) 2022-04-09 08:46:18 +08:00
Man, Jianting (Meco) 03823b5016
[kconfig] add 64bit default value for stack size. set tick HZ as 1000 by default (#5778)
* [kconfig] add 64bit default value for stack size. set tick HZ as 1000 by default

* 用RT_KSERVICE_USING_STDLIB_MEMXXX代替RT_KSERVICE_USING_STDLIB_MEMCP/MEMSET
将RT_KSERVICE_USING_STDLIB设置为默认开启

* 优化rt_kprintf支持longlong的能力,默认在64位CPU为开启状态
RT_PRINTF_LONGLONG命名不规范,更改为RT_KPRINTF_USING_LONGLONG

* fix commit error

* fix error

* 优化 system 函数

* RT_KSERVICE_USING_STDLIB_MEMXXX->RT_KSERVICE_USING_STDLIB_MEMORY
2022-04-09 00:40:36 +08:00