When you're building something that has different number of SPI_COUNTS from the expect SPI_COUNTS you get a lot of errors. Enough errors that it makes the terminal hard to tell what's happens.
You can see this when you build for the NRF52832DK
make BOARD=NRF52832DK -j8
Your screen gets covered with redefinition errors
In file included from targetlibs/nrf5x_12/components/drivers_nrf/hal/nrf_peripherals.h:59,
from targetlibs/nrf5x_12/components/drivers_nrf/hal/nrf_gpio.h:44,
from targets/nrf5x/nrf5x_utils.h:22,
from targets/nrf5x/bluetooth.c:26:
targetlibs/nrf5x_12/components/device/nrf52832_peripherals.h:144: warning: "SPI_COUNT" redefined
144 | #define SPI_COUNT 3
|
In file included from /home/brendena/code/newCode/Espruino/src/jsutils.h:17,
from /home/brendena/code/newCode/Espruino/src/jspin.h:21,
from /home/brendena/code/newCode/Espruino/libs/bluetooth/jswrap_bluetooth.h:14,
from targets/nrf5x/bluetooth.c:18:
gen/platform_config.h:40: note: this is the location of the previous definition
40 | #define SPI_COUNT 1
This is because the nordic SDK also uses the same define.
So my thought is either changing the name of the SPI_COUNT.
Or putting if defines around the nordic SDK files. Which since there not getting updated anymore. Would also be a easy fix.
I think it's best to rename SPI_COUNT to ESPR_SPI_COUNT (but to do the same for I2C_COUNT and USART_COUNT) and then at least the chances of name conflicts are much less...
When you're building something that has different number of SPI_COUNTS from the expect SPI_COUNTS you get a lot of errors. Enough errors that it makes the terminal hard to tell what's happens.
You can see this when you build for the NRF52832DK
Your screen gets covered with redefinition errors
This is because the nordic SDK also uses the same define.
So my thought is either changing the name of the SPI_COUNT. Or putting if defines around the nordic SDK files. Which since there not getting updated anymore. Would also be a easy fix.