Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【nimble】解决该issue #296

Open
chenyingchun0312 opened this issue Jan 22, 2022 · 14 comments
Open

【nimble】解决该issue #296

chenyingchun0312 opened this issue Jan 22, 2022 · 14 comments
Assignees

Comments

@chenyingchun0312
Copy link
Collaborator

RT-Thread-packages/nimble#13

@chenyingchun0312
Copy link
Collaborator Author

gcc相关的汇编代码做了一些注释,以及替换后,这一块倒是没有报错了,但是ble uart的service编译报错

  1. lastest版本中ble_phy_rxpdu_copy函数使用同名的v1.0.0版本中的函数替换
  2. 注释掉其他报错的汇编代码

image

@chenyingchun0312
Copy link
Collaborator Author

jrand48 报错问题
image

NIMBLE PR 链接: apache/mynewt-nimble#883

jrand48是Linux的系统调用,并不是标准的C库接口,暂时使用rand替换该函数

jrand48 man手册: https://linux.die.net/man/3/jrand48

image

@chenyingchun0312
Copy link
Collaborator Author

还有好几个错误:

image

@chenyingchun0312
Copy link
Collaborator Author

@supperthomas 涛哥,最后的报错问题,我看了下,是ble uart的service报错了,在gcc 平台也测试出错了,这个之前在哪个平台编译通过了么?

image

@supperthomas
Copy link
Owner

@chenyingchun0312 可以换个sample试下。比如peripheral。

@supperthomas
Copy link
Owner

https://github.com/RT-Thread-packages/nimble/issues/11

@supperthomas
Copy link
Owner

@chenyingchun0312 我刚才试了下,很多sample都可以用的哦。比如peripheral_heart_rate。用scons是可以编译通过的,你可以试试其他sample.

@chenyingchun0312
Copy link
Collaborator Author

chenyingchun0312 commented Feb 14, 2022

@supperthomas 涛哥,我看了一下,报错的console_init等函数是在host文件列表中,不管哪个sample,目前都会参与到编译,因此你看到的gcc上编译通过,是因为,你选的sample,没有使用到这个函数,gcc中检查比较不严格一些,因此没有报错,只是报了警告,但是在MDK平台上,即使没有使用到这个函数,也会报错,目前去掉了这个文件,不参与编译

我目前对nimble还比较不熟悉,因此只是暂时解决编译错误,但简单粗暴,肯定会有潜在问题,有待深入研究后才能解决问题

修改patch如附件:0001-.txt

image
image

image

@supperthomas
Copy link
Owner

@chenyingchun0312 直接PR吧。

@chenyingchun0312
Copy link
Collaborator Author

涛哥,这个nimble的问题,我应该只能协助调查原因,真正解决,我觉得,还需要换一个对nimble比较熟悉的ownner,因为我的解决比较粗暴。

@supperthomas
Copy link
Owner

@chenyingchun0312 可以讲讲你的理解。

@supperthomas
Copy link
Owner

@chenyingchun0312 建议,改动不大,先PR,我可以来讲讲。

@chenyingchun0312
Copy link
Collaborator Author

chenyingchun0312 commented Feb 25, 2022

(时间有点长了,后续再测试下)
测试不充分,我只测试了bleuart的demo

https://github.com/supperthomas/supperthomas_doc/files/8061766/0001-.txt

手机发送,透传到设备正常; 设备发送,透传到手机也是正常的
image

@supperthomas
Copy link
Owner

@chenyingchun0312 PR吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants