You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/10/14 11:47:10 UTC

[GitHub] [mynewt-nimble] haukepetersen opened a new pull request #1054: npl/riot: update syscfg/syscfg.h

haukepetersen opened a new pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054


   With eed4389851fcf96922a2e429376808f2dfddc912 the new config variable `MYNEWT_VAL_BLE_LL_SCAN_AUX_SEGMENT_CNT` was introduced to the controller. As the current generated `syscfg.h` for the RIOT port does not contain this value, selected builds that use extended advertising feature fail under RIOT.
   
   This PR fixes this by updating the `porting/npl/riot/include/syscfg/syscfg.h` file with new version freshly generated from master (fbd0a8c24d369a17dc04281f58a17ed7392e7f22).
   
   **NOTE** It took me once more some convincing of the newt tool in order to build the `riot` target properly. I tried to follow the steps given in https://github.com/apache/mynewt-nimble/pull/755#issuecomment-586203511, but when just calling `newt build riot` from the newly created project directory, all I get is `Error: Could not resolve target name: riot`.
   
   My workaround was to copy `repos/apache-mynewt-nimble/porting/targets/riot` and `repos/apache-mynewt-nimble/porting/targets/dummy_app` into the `targets/` folder of the project repo and adapt `pkg.name` for both accordingly. 
   
   This was properly badly hacked and maybe someone can refresh my memory on how to do this properly again? Much appreciated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] haukepetersen merged pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
haukepetersen merged pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] haukepetersen commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
haukepetersen commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-943405884


   indeed it does, thanks a lot. 
   
   I updated the PR using the generated file from the `@apache-mynewt-nimble/porting/targets/riot` target, the diff now looks a little bit cleaner than before.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-948605391


   @haukepetersen porting code was done so far having host in mind, controller is not really that much portable and as you know it still has some hacks to make it work on RIOT. I hope it will change in the future, but probably not too soon, so the workaround for hfxo code is the way to go for now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] haukepetersen commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
haukepetersen commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-947689650


   As it seems, the `MYNEWT_VAL_MCU_HFCLK_SOURCE` option that was automatically added to the syscfg.h makes some trouble when building for RIOT, as it leads to the `nrf52_clock_hfxo_release() / nrf52_clock_hfxo_request()` function calls to be included in `hal_timer.c`:
   ```
   /home/hauke/repos/ip-over-ble_adv/ext/RIOT/build/pkg/nimble/porting/nimble/src/hal_timer.c: In function 'hal_timer_config':
   /home/hauke/repos/ip-over-ble_adv/ext/RIOT/build/pkg/nimble/porting/nimble/src/hal_timer.c:660:5: error: implicit declaration of function 'nrf52_clock_hfxo_request' [-Werror=implicit-function-declaration]
     660 |     nrf52_clock_hfxo_request();
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
   /home/hauke/repos/ip-over-ble_adv/ext/RIOT/build/pkg/nimble/porting/nimble/src/hal_timer.c: In function 'hal_timer_deinit':
   /home/hauke/repos/ip-over-ble_adv/ext/RIOT/build/pkg/nimble/porting/nimble/src/hal_timer.c:724:9: error: implicit declaration of function 'nrf52_clock_hfxo_release' [-Werror=implicit-function-declaration]
     724 |         nrf52_clock_hfxo_release();
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   ```
   
   Now I am wondering, what in NimBLE has changed so that the riot new target now includes these `MCU_HFCLK_SOURCE__x` configuration values. I can't find them in any syscfg.yml, nor can I find any hint in the nimble source when doing a `git grep HFCLK`. So has anyone an idea where these options come from? I would rather fix the configuration then starting to put workarounds in the code itself...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-943332940


   `newt build @apache-mynewt-nimble/porting/targets/riot` should work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] haukepetersen commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
haukepetersen commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-947781002


   Found the sources for those config values in the NimBLE core tree... As I see it, there is not much from the configuration side to be done to prevent the issue at hand. So I decided to simply map the missing `nrf52_clock_hfxo_request()` and `nrf52_clock_hfxo_release()` functions to their RIOT counterpart in the RIOT specific `nimble_npl_os.h` header.
   
   I also re-generated the `syscfg.h` once more to include the latest NimBLE changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] haukepetersen commented on pull request #1054: npl/riot: update syscfg/syscfg.h

Posted by GitBox <gi...@apache.org>.
haukepetersen commented on pull request #1054:
URL: https://github.com/apache/mynewt-nimble/pull/1054#issuecomment-949453457


   Yes I know, but there is always some hope in finding a more generic soution - sometimes its possible, sometimes not :-)
   
   All green -> lets go.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org