This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue using SDK 11 and 13 simultaneously (nRF SPIM Errors)

Hello, when I try to compile old working projects in SDK 11.0 with both Device Family Pack 8.5.0 and 8.11.1 (which I am using for SDK 13), I am running into the following issue:

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'nrf51422_xxac_s130' compiling ads1291-2.c... ............\components\drivers_nrf\hal\nrf_spim.h(45): error: #20: identifier "NRF_SPIM_Type" is undefined NRF_SPIM_TASK_START = ffsetof(NRF_SPIM_Type, TASKS_START), ///< Start SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(45): error: #29: expected an expression NRF_SPIM_TASK_START = ffsetof(NRF_SPIM_Type, TASKS_START), ///< Start SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(45): error: #18: expected a ")" NRF_SPIM_TASK_START = ffsetof(NRF_SPIM_Type, TASKS_START), ///< Start SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(46): error: #29: expected an expression NRF_SPIM_TASK_STOP = ffsetof(NRF_SPIM_Type, TASKS_STOP), ///< Stop SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(46): error: #18: expected a ")" NRF_SPIM_TASK_STOP = ffsetof(NRF_SPIM_Type, TASKS_STOP), ///< Stop SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(47): error: #29: expected an expression NRF_SPIM_TASK_SUSPEND = ffsetof(NRF_SPIM_Type, TASKS_SUSPEND), ///< Suspend SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(47): error: #18: expected a ")" NRF_SPIM_TASK_SUSPEND = ffsetof(NRF_SPIM_Type, TASKS_SUSPEND), ///< Suspend SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(48): error: #29: expected an expression NRF_SPIM_TASK_RESUME = ffsetof(NRF_SPIM_Type, TASKS_RESUME) ///< Resume SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(48): error: #18: expected a ")" NRF_SPIM_TASK_RESUME = ffsetof(NRF_SPIM_Type, TASKS_RESUME) ///< Resume SPI transaction. ............\components\drivers_nrf\hal\nrf_spim.h(58): error: #29: expected an expression NRF_SPIM_EVENT_STOPPED = ffsetof(NRF_SPIM_Type, EVENTS_STOPPED), ///< SPI transaction has stopped. ............\components\drivers_nrf\hal\nrf_spim.h(58): error: #18: expected a ")" NRF_SPIM_EVENT_STOPPED = ffsetof(NRF_SPIM_Type, EVENTS_STOPPED), ///< SPI transaction has stopped. ............\components\drivers_nrf\hal\nrf_spim.h(59): error: #29: expected an expression NRF_SPIM_EVENT_ENDRX = ffsetof(NRF_SPIM_Type, EVENTS_ENDRX), ///< End of RXD buffer reached. ............\components\drivers_nrf\hal\nrf_spim.h(59): error: #18: expected a ")" NRF_SPIM_EVENT_ENDRX = ffsetof(NRF_SPIM_Type, EVENTS_ENDRX), ///< End of RXD buffer reached. ............\components\drivers_nrf\hal\nrf_spim.h(63): error: #29: expected an expression NRF_SPIM_EVENT_ENDTX = ffsetof(NRF_SPIM_Type, EVENTS_ENDTX), ///< End of TXD buffer reached. ............\components\drivers_nrf\hal\nrf_spim.h(63): error: #18: expected a ")" NRF_SPIM_EVENT_ENDTX = ffsetof(NRF_SPIM_Type, EVENTS_ENDTX), ///< End of TXD buffer reached. ............\components\drivers_nrf\hal\nrf_spim.h(64): error: #29: expected an expression NRF_SPIM_EVENT_STARTED = ffsetof(NRF_SPIM_Type, EVENTS_STARTED) ///< Transaction started. ............\components\drivers_nrf\hal\nrf_spim.h(64): error: #18: expected a ")" NRF_SPIM_EVENT_STARTED = ffsetof(NRF_SPIM_Type, EVENTS_STARTED) ///< Transaction started. ............\components\drivers_nrf\hal\nrf_spim.h(83): error: #20: identifier "SPIM_INTENSET_STOPPED_Msk" is undefined NRF_SPIM_INT_STOPPED_MASK = SPIM_INTENSET_STOPPED_Msk, ///< Interrupt on STOPPED event. ............\components\drivers_nrf\hal\nrf_spim.h(84): error: #20: identifier "SPIM_INTENSET_ENDRX_Msk" is undefined NRF_SPIM_INT_ENDRX_MASK = SPIM_INTENSET_ENDRX_Msk, ///< Interrupt on ENDRX event. ............\components\drivers_nrf\hal\nrf_spim.h(88): error: #20: identifier "SPIM_INTENSET_ENDTX_Msk" is undefined NRF_SPIM_INT_ENDTX_MASK = SPIM_INTENSET_ENDTX_Msk, ///< Interrupt on ENDTX event. ............\components\drivers_nrf\hal\nrf_spim.h(89): error: #20: identifier "SPIM_INTENSET_STARTED_Msk" is undefined NRF_SPIM_INT_STARTED_MASK = SPIM_INTENSET_STARTED_Msk ///< Interrupt on STARTED event. ............\components\drivers_nrf\hal\nrf_spim.h(97): error: #20: identifier "SPIM_FREQUENCY_FREQUENCY_K125" is undefined NRF_SPIM_FREQ_125K = SPIM_FREQUENCY_FREQUENCY_K125, ///< 125 kbps. ............\components\drivers_nrf\hal\nrf_spim.h(98): error: #20: identifier "SPIM_FREQUENCY_FREQUENCY_K250" is undefined NRF_SPIM_FREQ_250K = SPIM_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. ............\components\drivers_nrf\hal\nrf_spim.h(99): error: #20: identifier "SPIM_FREQUENCY_FREQUENCY_K500" is undefined NRF_SPIM_FREQ_500K = SPIM_FREQUENCY_FREQUENCY_K500, ///< 500 kbps. ............\components\drivers_nrf\hal\nrf_spim.h(100): error: #20: identifier

Well... You get the idea. If I uninstall the newest device family pack (8.11.1) and have 8.5.0 running alone, it compiles fine. The problem seems to be that nrf_spim is pulling nrf.h and nrf51_bitfields.h from the 8.11.1 device family pack and not 8.5.0, which for some reason is not compatible. I cannot seem to fix this, even if I manually 'fix' device family pack to 8.5 in the Select Software Pack for Target thing.

Can I simultaneously use both SDKs with their corresponding device family packs?

How do I prevent conflicts from arising?

Related