Skip to content

Bluetooth: can't build with CONFIG_ASSERT disabled when CONFIG_BT_PERIPHERAL is enabled #86855

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

Closed
MeisterBob opened this issue Mar 10, 2025 · 2 comments · May be fixed by #86970
Closed

Bluetooth: can't build with CONFIG_ASSERT disabled when CONFIG_BT_PERIPHERAL is enabled #86855

MeisterBob opened this issue Mar 10, 2025 · 2 comments · May be fixed by #86970
Assignees
Labels
area: Bluetooth LLCP area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale

Comments

@MeisterBob
Copy link
Contributor

Describe the bug
When CONFIG_ASSERT is disabled and CONFIG_BT_PERIPHERAL is enabled the bluetooth subsystem fails to build because connectable and adv only get defined when CONFIG_ASSERT is enabled in ticker_update_op_cb()
https://github.com/zephyrproject-rtos/zephyr/blob/658f9357b87ab3e02351a57183743ec70f92cdd7/subsys/bluetooth/controller/ll_sw/ull_adv.c#L2500C2-L2524C2

To Reproduce
see above

Logs and console output

In file included from /home/.../zephyr/subsys/bluetooth/controller/ll_sw/ull_adv.c:68: 
/home/.../zephyr/subsys/bluetooth/controller/ll_sw/ull_adv.c: In function 'ticker_updat
e_op_cb':                                                                                                        
/home/.../zephyr/subsys/bluetooth/controller/ll_sw/ull_adv.c:2519:20: error: 'connectab
le' undeclared (first use in this function)                                                                      
 2519 |                   (connectable && !adv->lll.conn) ||                                                     
      |                    ^~~~~~~~~~~                                                                           
/home/.../zephyr/subsys/bluetooth/controller/./hal/debug.h:13:23: note: in definition o
f macro 'LL_ASSERT'                                                                                              
   13 |                 if (!(cond)) { \                                                                         
      |                       ^~~~                                                                               
/home/.../zephyr/subsys/bluetooth/controller/ll_sw/ull_adv.c:2519:20: note: each undecl
ared identifier is reported only once for each function it appears in                                            
 2519 |                   (connectable && !adv->lll.conn) ||                                                     
      |                    ^~~~~~~~~~~                                                                           
/home/.../zephyr/subsys/bluetooth/controller/./hal/debug.h:13:23: note: in definition o
f macro 'LL_ASSERT'                                                                                              
   13 |                 if (!(cond)) { \                                                                         
      |                       ^~~~                                                                               
/home/.../zephyr/subsys/bluetooth/controller/ll_sw/ull_adv.c:2519:36: error: 'adv' unde
clared (first use in this function)                                                                              
 2519 |                   (connectable && !adv->lll.conn) ||                                                     
      |                                    ^~~                                                                   
/home/.../zephyr/subsys/bluetooth/controller/./hal/debug.h:13:23: note: in definition o
f macro 'LL_ASSERT'                                                                                              
   13 |                 if (!(cond)) { \                                                                         
      |                       ^~~~  

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK
  • Commit 658f935
@MeisterBob MeisterBob added the bug The issue is a bug, or the PR is fixing a bug label Mar 10, 2025
@MeisterBob MeisterBob changed the title can't build Bluetooth with CONFIG_ASSERT disabled when CONFIG_BT_PERIPHERAL is enabled Bluetooth: can't build with CONFIG_ASSERT disabled when CONFIG_BT_PERIPHERAL is enabled Mar 11, 2025
@fabiobaltieri
Copy link
Member

@MeisterBob any chance you could open a PR to fix it?

Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label May 12, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth LLCP area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants