I found the culprit - targetlibs/nrf5x_15/modules/nrfx/mdk/nrf.h contains the following:
targetlibs/nrf5x_15/modules/nrfx/mdk/nrf.h
/* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */ [#if](https://forum.espruino.com/search/?q=%23if) defined (NRF52) [#ifndef](https://forum.espruino.com/search/?q=%23ifndef) NRF52832_XXAA [#define](https://forum.espruino.com/search/?q=%23define) NRF52832_XXAA [#endif](https://forum.espruino.com/search/?q=%23endif) [#endif](https://forum.espruino.com/search/?q=%23endif)
This defines NRF52832_XXAA, and thus causing both nrf52832_peripherals.h and nrf52840_peripherals.h to be included, and then the fun begins...
NRF52832_XXAA
nrf52832_peripherals.h
nrf52840_peripherals.h
After commenting this out, I am finally able to use the GPIO1 pins. @gordon do you want me to add a new SDK patch and send a PR?
@urish started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I found the culprit -
targetlibs/nrf5x_15/modules/nrfx/mdk/nrf.h
contains the following:This defines
NRF52832_XXAA
, and thus causing bothnrf52832_peripherals.h
andnrf52840_peripherals.h
to be included, and then the fun begins...After commenting this out, I am finally able to use the GPIO1 pins. @gordon do you want me to add a new SDK patch and send a PR?