NordicPlayground / nrf-doom

38 stars 6 forks source link

NRFX build error NRFX_SPIM_DEFAULT_CONFIG; #2

Open dovoto opened 3 years ago

dovoto commented 3 years ago

First, this is awesome. It was very difficult to find an example that was close to bare metal and allowed me to build from the command line for the 5340!

In building the application I get the following error:

$(SDK_PATH)/nRF5_SDK/integration/nrfx/legacy/nrf_drv_spi.c:111:42: error: 'NRFX_SPIM_DEFAULT_CONFIG'

I replaced the nrfx from the repo recommended in the readme.

[edit, I realize I am using 2.5 vice the tested 2.4 and shall investigate]

[edit 2] Upon investigation I had to change nrf_drv_spi.c:111-116 as follows:

        nrfx_spim_config_t config_spim = NRFX_SPIM_DEFAULT_CONFIG(p_config->sck_pin,p_config->mosi_pin,p_config->miso_pin,p_config->ss_pin);

        // config_spim.sck_pin        = p_config->sck_pin;
        // config_spim.mosi_pin       = p_config->mosi_pin;
        // config_spim.miso_pin       = p_config->miso_pin;
        // config_spim.ss_pin         = p_config->ss_pin;

I believe this is due to the integration/nrfx and module/nrfx being out of sync. I am not sure if this is an error in the release or if its just my own user error.

Both projects now build and flash with this change and nrfx 2.5

(unable to test as i dont have any of the hardware but the dk setup yet)

[/edit]

auwi-nordic commented 3 years ago

Thanks for testing!

Yeah, the nRF5 SDK / nrfx setup is a bit hacky. nRF5 SDK does not really support nRF53, and I don't think there are plans to add support unfortunately. I should probably add that disclaimer to the readme. The only reason it was used here was that the project started on nRF52, and we don't need a Bluetooth stack yet.

dovoto commented 3 years ago

Thanks for the response. Its a shame they are not supporting the SDK, it feels much cleaner than the new nrf connect stuff.

auwi-nordic commented 3 years ago

Yeah, with multi-core I think the nRF5 SDK and SoftDevice code architecture was getting a bit outdated. Need that RTOS to handle all those concurrency challenges, and it's more up to the challenges faced by the larger customers I suppose.

I can kind of agree, I'm experimenting with nRF Connect SDK and Zephyr myself now to open up the option of using Bluetooth keyboard and mouse, and maybe Thread for multiplayer. It's daunting, and a lot of different concepts/scripts/tools, but when it works it works and you can take on bigger tasks, like simultaneous Bluetooth and Thread.

I hope to write some Blog posts on porting Doom to Zephyr/nRF Connect SDK to get a more practical guide to getting started with a real project. We'll see what comes of that.

dovoto commented 3 years ago

Definitely will keep an eye out for that. My product sort of relies on an approachable development environment on the application side (the network side can be mostly static and so is not as critical). Not quite arduino level of dumbed down but that level of getting started would be nice.