Skip to content

Commit

Permalink
babblesim: Fix build errors
Browse files Browse the repository at this point in the history
that occurred after recent updates (nordic-nrfx v3.3.0.)
  • Loading branch information
mkasenberg authored and sjanc committed Feb 14, 2024
1 parent ae9273d commit 4080f94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 2 additions & 0 deletions babblesim/core/include/core_cm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
extern void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
extern void NVIC_EnableIRQ(IRQn_Type IRQn);
extern void NVIC_DisableIRQ(IRQn_Type IRQn);
extern void NVIC_SetPendingIRQ(IRQn_Type IRQn);
extern void NVIC_ClearPendingIRQ(IRQn_Type IRQn);

void __WFI(void);

Expand Down
4 changes: 3 additions & 1 deletion babblesim/core/src/main_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
uint global_device_nbr;
struct nrf52_bsim_args_t *args;

extern int mynewt_main(int argc, char **argv);

void
bst_tick(bs_time_t time)
{
Expand All @@ -46,7 +48,7 @@ main_clean_up_trace_wrap(void)
return inner_main_clean_up(0);
}

void
int
main(int argc, char** argv)
{
setvbuf(stdout, NULL, _IOLBF, 512);
Expand Down
13 changes: 2 additions & 11 deletions babblesim/edtt/hci_test/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "os/mynewt.h"
#include "ble_hci_edtt.h"

static int
main_fn(int argc, char **argv)
int
mynewt_main(int argc, char **argv)
{
sysinit();

Expand All @@ -34,12 +34,3 @@ main_fn(int argc, char **argv)
}
return 0;
}

int
main(int argc, char **argv)
{
extern void bsim_init(int argc, char** argv, void *main_fn);
bsim_init(argc, argv, main_fn);

return 0;
}
4 changes: 3 additions & 1 deletion babblesim/hw/mcu/nordic/nrf52_bsim/src/hal_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,9 @@ hal_timer_config(int timer_num, uint32_t freq_hz)
nrf_timer_task_trigger(hwtimer, NRF_TIMER_TASK_CLEAR);

/* Put the timer in timer mode using 32 bits. */
nrf_timer_mode_set(hwtimer, NRF_TIMER_MODE_TIMER);
hwtimer->MODE = (hwtimer->MODE & ~TIMER_MODE_MODE_Msk) |
((NRF_TIMER_MODE_TIMER << TIMER_MODE_MODE_Pos) &
TIMER_MODE_MODE_Msk);
hwtimer->BITMODE = TIMER_BITMODE_BITMODE_32Bit;

/* Set the pre-scalar */
Expand Down

0 comments on commit 4080f94

Please sign in to comment.